/**
 * CAISSA Premium Page - Minimal White/Gray Theme (Chessvia-inspired)
 * Clean, modern, spacious design with soft lines and clear typography
 */

/* ========================================
   CSS VARIABLES - LIGHT THEME
   ======================================== */

:root {
    /* Backgrounds - Light */
    --prm-bg-page: #f7f8fb;
    --prm-bg-white: #ffffff;
    --prm-bg-light: #f1f3f7;
    --prm-bg-hover: #ebedf2;

    /* Borders */
    --prm-border: #e6e8ee;
    --prm-border-light: #f0f1f5;

    /* Text - Dark for readability */
    --prm-text-primary: #111827;
    --prm-text-secondary: #4b5563;
    --prm-text-muted: #6b7280;
    --prm-text-light: #9ca3af;

    /* CAISSA Accent (Orange) */
    --prm-accent: #ff9800;
    --prm-accent-hover: #f57c00;
    --prm-accent-light: rgba(255, 152, 0, 0.1);

    /* Status colors */
    --prm-success: #10b981;
    --prm-warning: #f59e0b;
    --prm-info: #3b82f6;
    --prm-locked: #6b7280;

    /* Popular badge */
    --prm-popular-bg: #1f2937;
    --prm-popular-text: #ffffff;

    /* Shadows */
    --prm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --prm-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --prm-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --prm-container: 1140px;
    --prm-gutter: 20px;
    --prm-radius: 12px;
    --prm-radius-sm: 8px;
}

/* ========================================
   BASE STYLES
   ======================================== */

.premium-page-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--prm-bg-page);
    color: var(--prm-text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   NAVIGATION HEADER
   ======================================== */

.premium-nav-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--prm-bg-white);
    border-bottom: 1px solid var(--prm-border);
}

.premium-nav-content {
    max-width: var(--prm-container);
    margin: 0 auto;
    padding: 0 var(--prm-gutter);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.premium-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--prm-text-primary);
    font-weight: 600;
    font-size: 18px;
}

.premium-nav-brand i {
    color: var(--prm-accent);
    font-size: 24px;
}

.premium-nav-links {
    display: flex;
    gap: 4px;
}

.premium-nav-link {
    padding: 8px 16px;
    border-radius: var(--prm-radius-sm);
    text-decoration: none;
    color: var(--prm-text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-nav-link:hover {
    color: var(--prm-text-primary);
    background: var(--prm-bg-hover);
}

.premium-nav-link.active {
    color: var(--prm-accent);
    background: var(--prm-accent-light);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.premium-main {
    flex: 1;
    max-width: var(--prm-container);
    margin: 0 auto;
    padding: 0 var(--prm-gutter);
    width: 100%;
    box-sizing: border-box;
}

/* ========================================
   HERO SECTION
   ======================================== */

.premium-hero {
    text-align: center;
    padding: 64px 0 48px;
}

.premium-hero-icon {
    display: none; /* Hidden in new design */
}

.premium-hero-title {
    margin: 0 0 16px;
    font-size: 48px;
    font-weight: 700;
    color: var(--prm-text-primary);
    letter-spacing: -0.02em;
}

.premium-hero-subtitle {
    margin: 0 auto 32px;
    font-size: 18px;
    color: var(--prm-text-secondary);
    max-width: 540px;
    line-height: 1.6;
}

.premium-hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.btn-primary-hero {
    padding: 14px 32px;
    background: var(--prm-accent);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--prm-radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary-hero:hover {
    background: var(--prm-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--prm-shadow-md);
}

.btn-secondary-hero {
    padding: 14px 32px;
    background: transparent;
    color: var(--prm-text-secondary);
    font-size: 16px;
    font-weight: 500;
    border: 1px solid var(--prm-border);
    border-radius: var(--prm-radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary-hero:hover {
    background: var(--prm-bg-hover);
    border-color: var(--prm-text-muted);
}

.premium-hero-note {
    font-size: 13px;
    color: var(--prm-text-muted);
}

/* ========================================
   BILLING TOGGLE
   ======================================== */

.premium-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 0 48px;
    padding: 16px;
    background: var(--prm-bg-white);
    border-radius: var(--prm-radius);
    box-shadow: var(--prm-shadow-sm);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.billing-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--prm-text-muted);
    transition: color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.billing-label.active {
    color: var(--prm-text-primary);
    font-weight: 600;
}

.billing-save-badge {
    padding: 4px 10px;
    background: var(--prm-success);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.billing-switch {
    width: 48px;
    height: 26px;
    background: var(--prm-bg-light);
    border: 1px solid var(--prm-border);
    border-radius: 13px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.billing-switch:hover {
    border-color: var(--prm-text-muted);
}

.billing-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--prm-text-muted);
    border-radius: 50%;
    transition: all 0.2s;
}

.billing-switch.annual .billing-switch-thumb {
    left: 24px;
    background: var(--prm-accent);
}

/* ========================================
   COMPARISON TABLE
   ======================================== */

.premium-comparison-section {
    margin-bottom: 64px;
}

.comparison-table-wrapper {
    background: var(--prm-bg-white);
    border: 1px solid var(--prm-border);
    border-radius: var(--prm-radius);
    overflow: hidden;
    box-shadow: var(--prm-shadow-sm);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid var(--prm-border-light);
}

.comparison-table th {
    background: var(--prm-bg-white);
    font-weight: 600;
    color: var(--prm-text-primary);
    position: sticky;
    top: 64px;
    z-index: 10;
}

.comparison-table th:first-child {
    text-align: left;
    width: 280px;
    background: var(--prm-bg-light);
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--prm-text-primary);
    background: var(--prm-bg-white);
}

.comparison-table tbody tr:hover td {
    background: var(--prm-bg-light);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* Plan headers */
.plan-header {
    padding: 24px 16px !important;
    vertical-align: top;
}

.plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--prm-text-primary);
    margin-bottom: 4px;
}

.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--prm-text-primary);
    margin: 8px 0 4px;
}

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

.plan-cta {
    margin-top: 16px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--prm-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.plan-cta-free {
    background: var(--prm-bg-light);
    color: var(--prm-text-secondary);
    border: 1px solid var(--prm-border);
}

.plan-cta-free:hover {
    background: var(--prm-bg-hover);
}

.plan-cta-upgrade {
    background: var(--prm-text-primary);
    color: white;
}

.plan-cta-upgrade:hover {
    background: #374151;
}

.plan-cta-popular {
    background: var(--prm-accent);
    color: white;
}

.plan-cta-popular:hover {
    background: var(--prm-accent-hover);
}

/* Popular badge */
.plan-popular-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--prm-popular-bg);
    color: var(--prm-popular-text);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* Category rows */
.category-row td {
    background: var(--prm-bg-light) !important;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--prm-text-muted);
    padding: 12px 20px !important;
}

.category-row td:first-child {
    color: var(--prm-accent);
}

/* Feature icons */
.feature-check {
    color: var(--prm-success);
    font-size: 16px;
}

.feature-limited {
    color: var(--prm-warning);
    font-size: 14px;
}

.feature-locked {
    color: var(--prm-locked);
    font-size: 14px;
}

.feature-coming {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--prm-bg-light);
    color: var(--prm-text-muted);
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

.feature-coming i {
    font-size: 10px;
}

/* Platinum column highlight */
.plan-platinum {
    background: rgba(255, 152, 0, 0.03) !important;
}

/* ========================================
   TRUST BADGES SECTION
   ======================================== */

.premium-trust-section {
    margin-bottom: 64px;
}

.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--prm-bg-white);
    border: 1px solid var(--prm-border);
    border-radius: var(--prm-radius);
}

.trust-badge-icon {
    width: 48px;
    height: 48px;
    background: var(--prm-bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trust-badge-icon i {
    font-size: 20px;
    color: var(--prm-text-secondary);
}

.trust-badge-text h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--prm-text-primary);
}

.trust-badge-text p {
    margin: 0;
    font-size: 13px;
    color: var(--prm-text-muted);
}

/* ========================================
   FAQ SECTION
   ======================================== */

.premium-faq-section {
    margin-bottom: 64px;
}

.faq-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--prm-text-primary);
    margin: 0 0 32px;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--prm-bg-white);
    border: 1px solid var(--prm-border);
    border-radius: var(--prm-radius-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    color: var(--prm-text-primary);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--prm-bg-light);
}

.faq-question i {
    color: var(--prm-text-muted);
    font-size: 14px;
    transition: transform 0.3s;
}

.faq-item.open .faq-question {
    background: var(--prm-bg-light);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    margin: 0;
    padding: 0 24px 20px;
    font-size: 14px;
    color: var(--prm-text-secondary);
    line-height: 1.7;
}

/* ========================================
   FINAL CTA SECTION
   ======================================== */

.premium-final-cta {
    text-align: center;
    padding: 64px 40px;
    background: var(--prm-bg-white);
    border: 1px solid var(--prm-border);
    border-radius: var(--prm-radius);
    margin-bottom: 64px;
}

.final-cta-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--prm-text-primary);
    margin: 0 0 12px;
}

.final-cta-subtitle {
    font-size: 16px;
    color: var(--prm-text-secondary);
    margin: 0 0 32px;
}

.final-cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   FOOTER
   ======================================== */

.premium-footer {
    background: var(--prm-bg-white);
    border-top: 1px solid var(--prm-border);
    padding: 32px var(--prm-gutter);
    text-align: center;
}

.premium-footer-content p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--prm-text-muted);
}

.premium-footer-content p:last-child {
    margin-bottom: 0;
}

.premium-footer-content a {
    color: var(--prm-accent);
    text-decoration: none;
}

.premium-footer-content a:hover {
    text-decoration: underline;
}

/* ========================================
   MOBILE PLAN CARDS (for responsive)
   ======================================== */

.mobile-plan-cards {
    display: none;
}

.mobile-plan-card {
    background: var(--prm-bg-white);
    border: 1px solid var(--prm-border);
    border-radius: var(--prm-radius);
    padding: 24px;
    margin-bottom: 16px;
}

.mobile-plan-card.popular {
    border-color: var(--prm-accent);
    box-shadow: 0 0 0 1px var(--prm-accent);
}

.mobile-plan-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--prm-border-light);
}

.mobile-plan-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--prm-text-secondary);
    border-bottom: 1px solid var(--prm-border-light);
}

.mobile-plan-features li:last-child {
    border-bottom: none;
}

.mobile-plan-features li i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-plan-header .plan-cta {
    margin-top: 16px;
    display: inline-block;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 1024px) {
    .comparison-table th:first-child,
    .comparison-table td:first-child {
        width: 200px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 14px 12px;
        font-size: 13px;
    }

    .plan-price {
        font-size: 28px;
    }

    .trust-badges {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .trust-badge {
        padding: 20px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    .premium-hero {
        padding: 48px 0 32px;
    }

    .premium-hero-title {
        font-size: 32px;
    }

    .premium-hero-subtitle {
        font-size: 16px;
    }

    .premium-billing-toggle {
        padding: 12px;
    }

    /* Hide desktop table, show mobile cards */
    .comparison-table-wrapper {
        display: none;
    }

    .mobile-plan-cards {
        display: block;
    }

    .premium-final-cta {
        padding: 40px 24px;
    }

    .final-cta-title {
        font-size: 24px;
    }

    .faq-question {
        padding: 16px 20px;
        font-size: 14px;
    }

    .faq-answer p {
        padding: 0 20px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .premium-nav-brand span {
        display: none;
    }

    .premium-nav-link span {
        display: none;
    }

    .btn-primary-hero,
    .btn-secondary-hero {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .billing-save-badge {
        display: none;
    }
}

/* ========================================
   HIDDEN LEGACY ELEMENTS
   ======================================== */

/* Hide old sections that are replaced */
.premium-subscription-section,
.premium-credits-section,
.premium-referrals-section,
.premium-wallet-banner {
    display: none !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.premium-hero,
.premium-billing-toggle,
.premium-comparison-section,
.premium-trust-section,
.premium-faq-section,
.premium-final-cta {
    animation: fadeIn 0.4s ease-out;
}
