/**
 * Stylesheet for the native VivreFR Newsletter Popup
 */

/* Overlay backdrop */
.vfr-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(8, 15, 30, 0.6) !important; /* Rich ink overlay with opacity */
    backdrop-filter: blur(4px) !important;
    z-index: 999999 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Active overlay state */
.vfr-popup-overlay.vfr-active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Center popup container */
.vfr-popup-overlay .vfr-popup-container {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -46%) scale(0.96) !important;
    opacity: 0;
    display: flex !important;
    flex-direction: row !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    max-width: 760px !important;
    width: 90% !important;
    box-shadow: 0 30px 60px rgba(8, 15, 30, 0.25) !important;
    border: 1px solid rgba(220, 214, 204, 0.4) !important;
    box-sizing: border-box !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Active container state */
.vfr-popup-overlay.vfr-active .vfr-popup-container {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
}

/* Close Button styling */
.vfr-popup-close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    background: #ffffff !important;
    border: 1px solid rgba(220, 214, 204, 0.4) !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important; /* --vf-muted */
    cursor: pointer !important;
    z-index: 10 !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(8, 15, 30, 0.05) !important;
}

.vfr-popup-close:hover {
    color: #c8321a !important; /* --vf-red-ui */
    border-color: rgba(200, 50, 26, 0.2) !important;
    transform: rotate(90deg) !important;
}

.vfr-popup-close svg {
    width: 18px !important;
    height: 18px !important;
}

/* Left Image Area */
.vfr-popup-image {
    flex: 1 !important;
    background-color: #f6f2ec !important; /* --vf-bg */
    background-image: url('https://images.unsplash.com/photo-1499856871958-5b9627545d1a?auto=format&fit=crop&q=80&w=600') !important; 
    background-size: cover !important;
    background-position: center !important;
    min-height: 420px !important;
    position: relative !important;
}

.vfr-popup-image::after {
    content: '' !important;
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(28, 50, 129, 0.08), transparent) !important;
    pointer-events: none !important;
}

/* Right Content Area */
.vfr-popup-content {
    flex: 1.25 !important;
    padding: 50px 40px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    background: radial-gradient(circle at top left, #ffffff, #fcfbf9) !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* Free Guide Badge */
.vfr-popup-badge {
    align-self: flex-start !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    border-radius: 100px !important;
    background: rgba(28, 50, 129, 0.08) !important; /* Soft --vf-navy */
    color: #1c3281 !important; /* --vf-navy */
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    margin-bottom: 18px !important;
    line-height: 1 !important;
}

/* Heading Typography */
.vfr-popup-title {
    margin: 0 0 12px 0 !important;
    color: #0c1a40 !important; /* --vf-navy-deep */
    font-family: 'Clash Display', 'Plus Jakarta Sans', sans-serif !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
}

.vfr-popup-title span {
    color: #c8321a !important; /* --vf-red-ui */
}

/* Description Text */
.vfr-popup-desc {
    color: #64748b !important; /* --vf-muted */
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 0 28px 0 !important;
}

/* Form block */
.vfr-popup-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Input Fields */
.vfr-popup-input-wrapper {
    width: 100% !important;
}

.vfr-popup-input {
    width: 100% !important;
    padding: 16px 20px !important;
    border: 1.5px solid rgba(20, 36, 92, 0.12) !important;
    border-radius: 12px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    color: #080f1e !important; /* --vf-ink */
    outline: none !important;
    background-color: #fbfaf8 !important;
    box-sizing: border-box !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: auto !important;
}

.vfr-popup-input:focus {
    border-color: #1c3281 !important; /* --vf-navy */
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(28, 50, 129, 0.08) !important;
}

.vfr-popup-input::placeholder {
    color: #8a99ad !important;
}

/* Action Button */
.vfr-popup-button {
    width: 100% !important;
    background: linear-gradient(135deg, #c8321a 0%, #e1000f 100%) !important; /* UI to Flag Red */
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    box-shadow: 0 8px 20px rgba(200, 50, 26, 0.22) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: center !important;
    box-sizing: border-box !important;
    height: auto !important;
}

.vfr-popup-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 26px rgba(200, 50, 26, 0.32) !important;
    filter: brightness(1.05) !important;
}

.vfr-popup-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 10px rgba(200, 50, 26, 0.22) !important;
}

/* Success State View */
.vfr-popup-success {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    animation: fadeIn 0.4s ease-out forwards !important;
}

.vfr-success-icon {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background-color: rgba(28, 50, 129, 0.08) !important;
    color: #1c3281 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 20px !important;
}

.vfr-success-icon svg {
    width: 28px !important;
    height: 28px !important;
}

.vfr-popup-success h3 {
    margin: 0 0 10px 0 !important;
    color: #0c1a40 !important;
    font-family: 'Clash Display', sans-serif !important;
    font-size: 26px !important;
    font-weight: 700 !important;
}

.vfr-popup-success p {
    color: #64748b !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Error banner */
.vfr-popup-error {
    background-color: rgba(200, 50, 26, 0.08) !important;
    color: #c8321a !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-top: 15px !important;
    border: 1px solid rgba(200, 50, 26, 0.15) !important;
    text-align: left !important;
}

/* Fade in keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Mobile Responsiveness (UX/UI Fixes)
   ========================================== */
@media (max-width: 680px) {
    /* Hide the image completely on mobile to save vertical space */
    .vfr-popup-image {
        display: none !important;
    }

    /* Content wrapper takes 100% width and has tighter padding */
    .vfr-popup-content {
        flex: 1 !important;
        padding: 35px 25px !important;
    }

    /* Scale typography down for mobile screens */
    .vfr-popup-title {
        font-size: 26px !important;
        margin-bottom: 10px !important;
    }

    .vfr-popup-desc {
        font-size: 14px !important;
        margin-bottom: 20px !important;
    }

    /* Reduce vertical padding slightly on inputs/buttons for smaller screens */
    .vfr-popup-input {
        padding: 14px 16px !important;
        font-size: 14px !important;
    }

    .vfr-popup-button {
        padding: 14px 16px !important;
        font-size: 15px !important;
    }
}
