/**
 * AlertOwl - Pricing Page Styles
 * Version: 0.3.0
 * Matches the existing dashboard/auth design system
 */

/* ===========================================
   HEADER / NAV
   =========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo svg {
    width: 32px;
    height: 32px;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent-teal) 0%, #5eead4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.nav-link.active {
    color: var(--accent-teal);
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
    padding: 140px 24px 60px;
    text-align: center;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(20, 184, 166, 0.1) 0%, transparent 50%),
        var(--bg-primary);
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 20px;
    font-size: 14px;
    color: var(--accent-teal);
    margin-bottom: 24px;
}

/* ===========================================
   PRICING SECTION
   =========================================== */
.pricing-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===========================================
   PRICING TOGGLE
   =========================================== */
.pricing-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
}

.toggle-btn {
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: white;
}

.toggle-btn:hover:not(.active) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ===========================================
   PRICING GRID
   =========================================== */
.pricing-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.pricing-grid.active {
    display: grid;
}

/* Modules Grid - 5 cards, 3 columns on desktop */
.pricing-grid.modules {
    grid-template-columns: repeat(3, 1fr);
}

/* Bundles Grid - 2 columns centered */
.pricing-grid.bundles {
    max-width: 700px;
    margin: 0 auto;
    grid-template-columns: repeat(2, 1fr);
}

/* ===========================================
   PRICING CARD
   =========================================== */
.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.pricing-card.popular {
    border-color: var(--accent-teal);
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.15);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: var(--accent-teal);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

.price-period {
    color: var(--text-muted);
    font-size: 14px;
}

.card-savings {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-green);
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 16px;
}

.card-features {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.card-features li svg {
    width: 16px;
    height: 16px;
    color: var(--accent-teal);
    flex-shrink: 0;
    margin-top: 2px;
}

.card-btn {
    width: 100%;
    margin-top: auto;
}

/* ===========================================
   HOW IT WORKS
   =========================================== */
.how-it-works {
    background: var(--bg-secondary);
    padding: 80px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.steps-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.step {
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-teal);
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===========================================
   FAQ SECTION
   =========================================== */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 24px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    padding: 20px 0;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-question:hover {
    color: var(--accent-teal);
}

.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding-bottom: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    display: block;
}

/* ===========================================
   CTA SECTION
   =========================================== */
.cta-section {
    text-align: center;
    padding: 80px 24px;
    background: 
        radial-gradient(ellipse at 50% 100%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

.cta-section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===========================================
   LOADING OVERLAY
   =========================================== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 11, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.loading-overlay.show {
    display: flex;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===========================================
   TOAST NOTIFICATIONS
   =========================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    z-index: 1001;
    max-width: 400px;
}

.toast.show {
    display: flex;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(100px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.toast.error {
    border-color: var(--accent-red);
}

.toast.success {
    border-color: var(--accent-green);
}

.toast svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success svg {
    color: var(--accent-green);
}

.toast.error svg {
    color: var(--accent-red);
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
    .pricing-grid.modules {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .pricing-grid.modules,
    .pricing-grid.bundles {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-link:not(.btn) {
        display: none;
    }

    .pricing-toggle {
        flex-direction: column;
        align-items: center;
    }

    .toggle-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 16px 40px;
    }

    .pricing-section {
        padding: 24px 16px 60px;
    }

    .pricing-card {
        padding: 24px 20px;
    }

    .nav {
        padding: 12px 16px;
    }
}
