/* ============================================
   Email Popup & Modal Styles
   ============================================ */

/* Overlay */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.active {
    display: flex;
}

/* Popup Container */
.popup-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--gray-600);
    transition: var(--transition);
    z-index: 10;
}

.popup-close:hover {
    background: var(--gray-200);
    color: var(--dark);
}

/* Popup Header */
.popup-header {
    background: var(--gradient-1);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    color: var(--white);
}

.popup-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.popup-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.popup-header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Popup Body */
.popup-body {
    padding: 2rem;
}

.popup-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.popup-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 0.9375rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.popup-benefits li:last-child {
    border-bottom: none;
}

.popup-benefits .benefit-icon {
    width: 28px;
    height: 28px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Email Form */
.popup-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popup-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    font-family: inherit;
}

.popup-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.popup-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.popup-disclaimer {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
    margin-top: 1rem;
}

/* Success State */
.popup-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.popup-success.active {
    display: block;
}

.popup-success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.popup-success h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.popup-success p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Dark Mode Styles */
body.dark-mode {
    --white: #1a1a2e;
    --gray-50: #16213e;
    --gray-100: #1a1a2e;
    --gray-200: #2a2a4e;
    --gray-700: #e5e7eb;
    --gray-600: #d1d5db;
    --gray-500: #9ca3af;
    --dark: #f9fafb;
    background: #0f0f1a;
}

body.dark-mode .navbar {
    background: rgba(26, 26, 46, 0.95);
    border-color: var(--gray-200);
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 50%, #16213e 100%);
}

body.dark-mode .quote-selector,
body.dark-mode .hero-card,
body.dark-mode .type-card,
body.dark-mode .comparison-card,
body.dark-mode .resource-card,
body.dark-mode .testimonial-card {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

body.dark-mode .footer {
    background: #0a0a14;
}

/* Inline Email Signup */
.inline-signup {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin: 3rem 0;
    text-align: center;
}

.inline-signup h3 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.inline-signup p {
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.inline-signup-form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
}

.inline-signup-form input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 1rem;
}

.inline-signup-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.inline-signup-form button {
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .inline-signup-form {
        flex-direction: column;
    }

    .popup-container {
        max-width: 100%;
        margin: 1rem;
    }
}