/**
 * Callback Popup & WhatsApp Sticky Button
 * SpaceBlack Adsorbents - Corporate Design System
 * Brand: #ec7d1b (orange) | Charcoal #1a1a1a | Typography: Exo, Lato
 */

/* Popup overlay - professional backdrop */
.sb-callback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.sb-callback-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Popup modal - corporate card */
.sb-callback-popup {
    position: relative;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.08);
    max-width: 560px;
    width: 94%;
    transform: scale(0.96);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    font-family: 'Lato', sans-serif;
}
.sb-callback-overlay.is-visible .sb-callback-popup {
    transform: scale(1);
}

/* Brand strip - corporate header */
.sb-callback-brand-strip {
    background: #1a1a1a;
    padding: 20px 48px 20px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid #ec7d1b;
}
.sb-callback-brand-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.sb-callback-logo {
    display: block;
    flex-shrink: 0;
}
.sb-callback-logo img {
    max-height: 44px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
.sb-callback-brand-name {
    font-family: 'Exo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Close button - refined */
.sb-callback-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}
.sb-callback-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Header - typography hierarchy */
.sb-callback-header {
    padding: 28px 32px 20px;
    text-align: center;
}
.sb-callback-header h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Exo', sans-serif;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.sb-callback-intro {
    margin: 0;
    font-size: 15px;
    color: #555;
    line-height: 1.65;
}
.sb-callback-intro strong {
    color: #ec7d1b;
    font-weight: 600;
}

/* Visual - full-bleed edge-to-edge image */
.sb-callback-visual {
    margin: 0;
    padding: 0;
    min-height: 160px;
    overflow: hidden;
    display: block;
}
.sb-callback-img {
    width: 100%;
    height: auto;
    min-height: 160px;
    max-height: 220px;
    object-fit: scale-down;
    object-position: center;
    display: block;
}
.sb-callback-img-fallback {
    width: 100%;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}
.sb-callback-img-fallback svg {
    width: 72px;
    height: 72px;
    opacity: 0.5;
}

/* Body - form section */
.sb-callback-body {
    padding: 24px 32px 32px;
    text-align: center;
}

/* Form - corporate inputs */
.sb-callback-field {
    margin-bottom: 16px;
}
.sb-callback-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 0.02em;
}
.sb-callback-field .required {
    color: #c0392b;
}

.sb-callback-input-row {
    display: flex;
    gap: 12px;
    max-width: 100%;
    justify-content: center;
}
.sb-callback-country {
    width: 150px;
    flex-shrink: 0;
}
.sb-callback-country select,
.sb-callback-phone input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Lato', sans-serif;
}
.sb-callback-country select:focus,
.sb-callback-phone input:focus {
    border-color: #ec7d1b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(236, 125, 27, 0.2);
}
.sb-callback-phone {
    flex: 1;
    min-width: 0;
    max-width: 280px;
}

/* CTA - corporate primary action */
.sb-callback-submit {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    padding: 16px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Exo', sans-serif;
    color: #fff;
    cursor: pointer;
    display: block;
    background: #ec7d1b;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.sb-callback-submit:hover {
    background: #d96e15;
    box-shadow: 0 4px 12px rgba(236, 125, 27, 0.35);
    transform: translateY(-1px);
}
.sb-callback-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Error message */
.sb-callback-error {
    display: none;
    padding: 12px 16px;
    background: #fdf2f2;
    border: 1px solid #f5c6c6;
    border-radius: 4px;
    color: #c0392b;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
}
.sb-callback-error.is-visible {
    display: block;
}

/* WhatsApp sticky button */
.sb-whatsapp-sticky {
    position: fixed;
    bottom: 90px;
    left: 24px;
    z-index: 9996;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sb-whatsapp-sticky:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
    color: #fff;
}
.sb-whatsapp-sticky svg {
    width: 30px;
    height: 30px;
}

@keyframes sb-wa-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4); }
    50%  { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6); }
}
.sb-whatsapp-sticky {
    animation: sb-wa-pulse 2s ease-in-out infinite;
}

/* Mobile - refined */
@media (max-width: 480px) {
    .sb-callback-popup {
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    .sb-callback-brand-strip {
        padding: 16px 40px 16px 20px;
    }
    .sb-callback-logo img {
        max-height: 36px;
    }
    .sb-callback-brand-name {
        font-size: 12px;
    }
    .sb-callback-header {
        padding: 24px 20px 16px;
    }
    .sb-callback-header h3 {
        font-size: 20px;
    }
    .sb-callback-intro {
        font-size: 14px;
    }
    .sb-callback-visual,
    .sb-callback-img {
        min-height: 120px;
        max-height: 160px;
    }
    .sb-callback-body {
        padding: 20px 20px 24px;
    }
    .sb-callback-input-row {
        flex-direction: column;
    }
    .sb-callback-country {
        width: 100%;
    }
    .sb-callback-phone {
        max-width: none;
    }
    .sb-whatsapp-sticky {
        bottom: 85px;
        left: 20px;
        width: 52px;
        height: 52px;
    }
}
