/* Newsletter Popup Styles */
.newsletter-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.newsletter-popup.popup-show {
    opacity: 1;
}

.popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.popup-container {
    position: relative;
    z-index: 10;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.newsletter-popup.popup-show .popup-container {
    transform: scale(1) translateY(0);
}

.popup-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background-color: #f8f9fa;
    color: #dc3545;
}

.popup-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.popup-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.popup-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.popup-header p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.newsletter-popup-form .form-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.newsletter-popup-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.newsletter-popup-form input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-popup-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 120px;
}

.btn-popup-submit:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-popup-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-popup-close {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-popup-close:hover {
    background: #5a6fd8;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.popup-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #495057;
    font-size: 0.9rem;
}

.benefit-item i {
    color: #28a745;
    font-size: 1rem;
}

.popup-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-item strong {
    display: block;
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
}

.stat-item span {
    font-size: 0.8rem;
    color: #6c757d;
}

.popup-disclaimer {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.popup-disclaimer a {
    color: #667eea;
    text-decoration: none;
}

.popup-disclaimer a:hover {
    text-decoration: underline;
}

.popup-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.popup-error i {
    color: #dc3545;
}

.popup-success {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #d4edda;
    color: #155724;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.popup-success h3 {
    color: #155724;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.popup-success p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Timed popup specific styles */
.newsletter-popup-timed .popup-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Mobile responsive */
@media (max-width: 576px) {
    .popup-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .popup-header h3 {
        font-size: 1.25rem;
    }
    
    .newsletter-popup-form .form-group {
        flex-direction: column;
    }
    
    .btn-popup-submit {
        width: 100%;
    }
    
    .popup-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .popup-benefits {
        gap: 0.5rem;
    }
    
    .benefit-item {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .popup-container {
        width: 95%;
    }
    
    .popup-content {
        padding: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .newsletter-popup,
    .popup-container,
    .btn-popup-submit,
    .popup-close {
        transition: none;
    }
    
    .spin {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .popup-content {
        border: 2px solid #000;
    }
    
    .newsletter-popup-form input[type="email"] {
        border-color: #000;
    }
    
    .btn-popup-submit {
        background: #000;
        border: 2px solid #000;
    }
}