/* Promo Popup Styles */

/* Overlay */
#promo-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 10000;
    display: none;
    transition: background 0.4s ease;
}
#promo-popup-overlay.active {
    background: rgba(0, 0, 0, 0.6);
}

/* Popup Container */
#promo-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    z-index: 10001;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}
#promo-popup.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Close Button */
.popup-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.popup-close-btn:hover {
    transform: rotate(90deg);
    background: #fff;
}

/* Shared Form Styles */
.popup-form-group {
    margin-bottom: 0.65rem;
}
.popup-form-group .form-control {
    width: 100%;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 0 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafafa;
}
.popup-form-group .form-control:focus {
    border-color: #16A34A;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
    outline: none;
    background: #fff;
}
.popup-form-group .form-control::placeholder {
    color: #aaa;
}
.popup-cta-btn {
    width: 100%;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.popup-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
}
.popup-cta-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.popup-error {
    color: #e44b4b;
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Shared Success State */
.popup-success {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
}
.success-checkmark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #16A34A;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.success-checkmark svg {
    width: 32px;
    height: 32px;
    stroke: #fff;
    stroke-width: 3;
    fill: none;
}
.popup-success h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}
.popup-success p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}
@keyframes scaleIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ===================== */
/* DESKTOP POPUP (>=769px) */
/* ===================== */
.popup-desktop {
    display: flex;
}
.popup-desktop .popup-left {
    width: 40%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.popup-desktop .popup-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.popup-desktop .popup-right {
    width: 60%;
    padding: 2rem 1.75rem;
    padding-top: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.popup-desktop .popup-right h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.4rem 0;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.popup-desktop .popup-right .popup-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 1rem 0;
}
.popup-desktop .popup-form-group .form-control {
    height: 40px;
    font-size: 0.85rem;
}
.popup-desktop .popup-cta-btn {
    padding: 0.2rem 1.25rem;
    font-size: 0.95rem;
    margin-top: 0.35rem;
}

/* ===================== */
/* MOBILE POPUP (<=768px) */
/* ===================== */
.popup-mobile {
    display: none;
    flex-direction: column;
}
.popup-mobile .popup-img-banner {
    width: 100%;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}
.popup-mobile .popup-img-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.popup-mobile .popup-form-area {
    padding: 1.25rem;
    padding-top: 1.5rem;
}
.popup-mobile .popup-form-area h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.3px;
    white-space: normal;
}
.popup-mobile .popup-form-area .popup-desc {
    font-size: 0.78rem;
    color: #666;
    line-height: 1.4;
    margin: 0 0 0.85rem 0;
}
.popup-mobile .popup-form-group {
    margin-bottom: 0.5rem;
}
.popup-mobile .popup-form-group .form-control {
    height: 38px;
    font-size: 0.8rem;
}
.popup-mobile .popup-cta-btn {
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Breakpoint: show desktop, hide mobile */
@media (min-width: 769px) {
    #promo-popup {
        max-width: 780px;
        width: 90%;
    }
    .popup-desktop { display: flex; }
    .popup-mobile { display: none; }
}

/* Breakpoint: show mobile, hide desktop */
@media (max-width: 768px) {
    #promo-popup {
        width: 92%;
        max-height: 90vh;
        overflow-y: auto;
    }
    .popup-desktop { display: none !important; }
    .popup-mobile { display: flex; }
}

/* Small Mobile tweaks */
@media (max-width: 400px) {
    .popup-mobile .popup-img-banner {
        height: 130px;
    }
    .popup-mobile .popup-form-area {
        padding: 1rem;
    }
    .popup-mobile .popup-form-area h3 {
        font-size: 1rem;
    }
    .popup-mobile .popup-form-group .form-control {
        height: 36px;
        font-size: 0.78rem;
    }
    .popup-mobile .popup-cta-btn {
        padding: 0.3rem 0.75rem;
        font-size: 0.82rem;
    }
}
