/* NEWSLETTER MODAL - ELE-14 PREMIUM BRANDING */

.newsletter-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: none !important; /* Controlled by JS */
    opacity: 0;
    z-index: 10000;
    pointer-events: none; /* GOLD STANDARD: Ensures clicks pass through when invisible */
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.newsletter-modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* Re-enable clicks when visible */
}

.newsletter-modal {
    background: #ffffff !important;
    max-width: 400px;
    width: 90%;
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
    z-index: 10001; /* Higher than overlay */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    opacity: 1 !important; /* Ensure content is visible */
    visibility: visible !important;
}

.newsletter-modal-overlay.active .newsletter-modal {
    transform: scale(1) translateY(0);
}

.newsletter-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.newsletter-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.newsletter-modal h2 {
    font-family: 'Outfit', sans-serif;
    color: #0f172a;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.newsletter-modal p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-input {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 2px solid #f1f5f9;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: #38bdf8; /* Elevate Sky Blue */
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.newsletter-submit {
    background: #38bdf8; /* Elevate Sky Blue */
    color: #ffffff;
    font-weight: 600;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(56, 189, 248, 0.39);
}

.newsletter-submit:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.23);
}

.newsletter-submit:active {
    transform: translateY(0);
}

.newsletter-privacy {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 1.5rem;
}

/* Success State */
.newsletter-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.newsletter-success.active {
    display: flex;
}

.newsletter-success i {
    font-size: 3rem;
    color: #10b981;
}

.newsletter-success h3 {
    color: #0f172a;
    font-weight: 700;
    margin: 0;
}
