/**
 * ICC-Service — CTA Banner Section
 *
 * Полноширинный баннер с gradient-фоном, кнопкой + popup формой.
 * CSS-переменные: --icc-cta-bg, --icc-cta-bg2, --icc-cta-btn-bg,
 *                 --icc-cta-btn-color, --icc-cta-radius
 *
 * @version 1.0.0
 */

/* ============================================
   1. SECTION
   ============================================ */
.icc-cta {
    --_bg: var(--icc-cta-bg, #0069a8);
    --_bg2: var(--icc-cta-bg2, #004a7c);
    --_btn-bg: var(--icc-cta-btn-bg, #ffffff);
    --_btn-color: var(--icc-cta-btn-color, #0069a8);
    --_radius: var(--icc-cta-radius, 16px);
    --_font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    padding: 0 0;
    position: relative;
}

.icc-cta-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 40px;
}

/* ============================================
   2. BANNER
   ============================================ */
.icc-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: linear-gradient(135deg, var(--_bg) 0%, var(--_bg2) 100%);
    border-radius: var(--_radius);
    padding: 40px 52px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.12),
        0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Decorative circle */
.icc-cta-banner::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.icc-cta-banner::after {
    content: '';
    position: absolute;
    left: -30px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

/* ============================================
   3. TEXT
   ============================================ */
.icc-cta-text {
    flex: 1;
    min-width: 0;
}

.icc-cta-title {
    font-family: var(--_font);
    font-weight: 800;
    font-size: clamp(14px, 1.5vw, 20px);
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
}

.icc-cta-subtitle {
    font-family: var(--_font);
    font-size: clamp(13px, 1.1vw, 15px);
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    line-height: 1.5;
    max-width: 500px;
}

/* ============================================
   4. ACTIONS (button + phone)
   ============================================ */
.icc-cta-actions {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-shrink: 0;
}

/* ── Button ──────────────────────────────── */
.icc-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--_font);
    font-size: 15px;
    font-weight: 600;
    color: var(--_btn-color);
    background: var(--_btn-bg);
    border: 2px solid var(--_btn-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.icc-cta-btn i {
    font-size: 14px;
}

.icc-cta-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    background: var(--icc-cta-btn-color);
    color: #ffffff;
    border-color: #ffffff;
}

.icc-cta-btn:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.1s;
}

/* ── Phone ───────────────────────────────── */
.icc-cta-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.icc-cta-phone-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--_font);
    font-weight: 700;
    font-size: clamp(18px, 1.6vw, 22px);
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.icc-cta-phone-number i {
    font-size: 16px;
    opacity: 0.7;
}

.icc-cta-phone-number:hover {
    opacity: 0.85;
    color: #fff;
}

.icc-cta-phone-note {
    font-family: var(--_font);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    padding-left: 24px;
}

/* ============================================
   5. POPUP OVERLAY
   ============================================ */
.icc-cta-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.icc-cta-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   6. POPUP CARD
   ============================================ */
.icc-cta-popup {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px 36px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.icc-cta-overlay.active .icc-cta-popup {
    transform: translateY(0) scale(1);
}

/* Close button */
.icc-cta-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6b7280;
    transition: all 0.2s;
}

.icc-cta-popup-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Icon */
.icc-cta-popup-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--_bg, #0069a8), var(--_bg2, #004a7c));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 16px rgba(0, 105, 168, 0.3);
}

.icc-cta-popup-title {
    font-family: var(--_font);
    font-weight: 700;
    font-size: 22px;
    color: #1a1a2e;
    text-align: center;
    margin: 0 0 6px;
}

.icc-cta-popup-desc {
    font-family: var(--_font);
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 24px;
}

/* ── Form ────────────────────────────────── */
.icc-cta-popup-field {
    margin-bottom: 16px;
}

.icc-cta-popup-field label {
    display: block;
    font-family: var(--_font);
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.icc-cta-popup-field input {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--_font);
    font-size: 15px;
    color: #1f2937;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.icc-cta-popup-field input:focus {
    border-color: var(--_bg, #0069a8);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 105, 168, 0.1);
}

.icc-cta-popup-field input.icc-cta-error {
    border-color: #ef4444;
    background: #fef2f2;
    animation: icc-cta-shake 0.4s;
}

@keyframes icc-cta-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Submit button */
.icc-cta-popup-submit {
    width: 100%;
    padding: 14px 24px;
    font-family: var(--_font);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--_bg, #0069a8), var(--_bg2, #004a7c));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 2px 12px rgba(0, 105, 168, 0.3);
}

.icc-cta-popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 105, 168, 0.4);
}

.icc-cta-popup-submit:active {
    transform: translateY(0);
}

.icc-cta-popup-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ── Success state ───────────────────── */
.icc-cta-popup-success {
    text-align: center;
    padding: 20px 0 10px;
}

.icc-cta-popup-success-icon {
    font-size: 52px;
    color: #10b981;
    margin-bottom: 12px;
    animation: icc-cta-popIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes icc-cta-popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.icc-cta-popup-success h4 {
    font-family: var(--_font);
    font-weight: 700;
    font-size: 20px;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.icc-cta-popup-success p {
    font-family: var(--_font);
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ============================================
   7. RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .icc-cta-container {
        padding: 12px 28px;
    }

    .icc-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 32px 36px;
        gap: 24px;
    }

    .icc-cta-subtitle {
        max-width: none;
    }

    .icc-cta-actions {
        flex-direction: column;
        gap: 18px;
        width: 100%;
    }

    .icc-cta-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .icc-cta-phone {
        align-items: center;
    }

    .icc-cta-phone-note {
        padding-left: 0;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .icc-cta-container {
        padding: 10px 16px;
    }

    .icc-cta-banner {
        padding: 24px 20px;
        border-radius: 12px;
        gap: 20px;
    }

    .icc-cta-title {
        font-size: 13px;
    }

    .icc-cta-subtitle {
        font-size: 13px;
    }

    .icc-cta-btn {
        padding: 12px 24px;
        font-size: 14px;
        max-width: none;
    }

    .icc-cta-phone-number {
        font-size: 18px;
    }

    /* Popup */
    .icc-cta-popup {
        margin: 16px;
        padding: 28px 20px 24px;
        border-radius: 16px;
        max-width: none;
    }

    .icc-cta-popup-title {
        font-size: 19px;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .icc-cta-banner {
        padding: 20px 16px;
    }

    .icc-cta-actions {
        gap: 14px;
    }
}

/* ============================================
   8. REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .icc-cta-btn,
    .icc-cta-popup,
    .icc-cta-overlay,
    .icc-cta-popup-submit,
    .icc-cta-popup-success-icon {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   9. PRINT
   ============================================ */
@media print {
    .icc-cta {
        display: none;
    }
    .icc-cta-overlay {
        display: none;
    }
}
