/* pricing.css — Credits & Pricing page styles */

/* Fallback variables */
:root {
    --pricing-text-secondary: #64748b;
    --pricing-border: rgba(15, 23, 42, 0.12);
    --pricing-primary: #7f68ff;
    --pricing-card-hover: rgba(15, 23, 42, 0.04);
    --pricing-radius-sm: 6px;
    --pricing-radius-md: 12px;
    --pricing-space-2: 8px;
    --pricing-space-3: 12px;
    --pricing-space-4: 16px;
}

html.dark :root {
    --pricing-text-secondary: #94a3b8;
    --pricing-border: rgba(71, 85, 105, 0.45);
    --pricing-primary: #a5b4fc;
    --pricing-card-hover: rgba(255, 255, 255, 0.04);
}

.pricing-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(99, 102, 241, 0.12), transparent 32%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

html.dark .pricing-page {
    background:
        radial-gradient(circle at top, rgba(99, 102, 241, 0.18), transparent 30%),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.pricing-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Hero */
.pricing-hero {
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    padding: 32px;
}

html.dark .pricing-hero {
    border-color: rgba(71, 85, 105, 0.45);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.36);
}

.pricing-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

html.dark .pricing-hero__eyebrow {
    background: rgba(129, 140, 248, 0.16);
    color: #c7d2fe;
}

.pricing-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.06;
    font-weight: 800;
    color: #0f172a;
}

html.dark .pricing-hero h1 {
    color: #f1f5f9;
}

.pricing-hero p {
    margin: 0;
    max-width: 820px;
    color: #475569;
    font-size: 15px;
    line-height: 1.75;
}

html.dark .pricing-hero p {
    color: #94a3b8;
}

/* Surfaces / cards */
.pricing-surface {
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    padding: 28px;
}

html.dark .pricing-surface {
    border-color: rgba(71, 85, 105, 0.45);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.36);
}

.pricing-surface h2 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

html.dark .pricing-surface h2 {
    color: #f1f5f9;
}

/* Info card */
.pricing-info-card {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
}

.pricing-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pricing-info-label {
    font-size: 13px;
    color: var(--pricing-text-secondary);
}

.pricing-info-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

html.dark .pricing-info-value {
    color: #f1f5f9;
}

/* Tier legend */
.pricing-tier-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pricing-tier-badge {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 160px;
    min-width: 140px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: rgba(248, 250, 252, 0.9);
}

html.dark .pricing-tier-badge {
    background: rgba(15, 23, 42, 0.6);
}

.pricing-tier-badge strong {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

html.dark .pricing-tier-badge strong {
    color: #f1f5f9;
}

.pricing-tier-badge span {
    font-size: 13px;
    color: var(--pricing-text-secondary);
}

.pricing-tier--free {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
}

.pricing-tier--free strong {
    color: #047857;
}

html.dark .pricing-tier--free strong {
    color: #6ee7b7;
}

.pricing-tier--personal {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
}

.pricing-tier--personal strong {
    color: #1d4ed8;
}

html.dark .pricing-tier--personal strong {
    color: #93c5fd;
}

.pricing-tier--team {
    background: rgba(127, 104, 255, 0.1);
    border-color: rgba(127, 104, 255, 0.25);
}

.pricing-tier--team strong {
    color: #5b21b6;
}

html.dark .pricing-tier--team strong {
    color: #c4b5fd;
}

.pricing-tier--company {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
}

.pricing-tier--company strong {
    color: #b45309;
}

html.dark .pricing-tier--company strong {
    color: #fcd34d;
}

/* Table */
.pricing-table-wrapper {
    overflow-x: auto;
    border-radius: var(--pricing-radius-md);
    border: 1px solid var(--pricing-border);
    margin-top: 8px;
}

.pricing-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 14px;
}

.pricing-table th,
.pricing-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--pricing-border);
    white-space: nowrap;
}

.pricing-table th {
    background: rgba(15, 23, 42, 0.04);
    font-weight: 600;
    color: #475569;
    position: sticky;
    top: 0;
    z-index: 1;
}

html.dark .pricing-table th {
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
}

.pricing-table td {
    color: #334155;
}

html.dark .pricing-table td {
    color: #cbd5e1;
}

.pricing-table tbody tr:last-child td {
    border-bottom: none;
}

.pricing-table tbody tr:hover td {
    background: var(--pricing-card-hover);
}

.pricing-table th:nth-child(4),
.pricing-table td:nth-child(4),
.pricing-table th:nth-child(5),
.pricing-table td:nth-child(5),
.pricing-table th:nth-child(6),
.pricing-table td:nth-child(6),
.pricing-table th:nth-child(7),
.pricing-table td:nth-child(7) {
    text-align: right;
}

/* Tier column headers */
.pricing-table__head--free {
    color: #047857;
}

html.dark .pricing-table__head--free {
    color: #6ee7b7;
}

.pricing-table__head--personal {
    color: #1d4ed8;
}

html.dark .pricing-table__head--personal {
    color: #93c5fd;
}

.pricing-table__head--team {
    color: #5b21b6;
}

html.dark .pricing-table__head--team {
    color: #c4b5fd;
}

.pricing-table__head--company {
    color: #b45309;
}

html.dark .pricing-table__head--company {
    color: #fcd34d;
}

/* Current tier highlight */
.pricing-table th.is-current-tier,
.pricing-table td.is-current-tier {
    background: rgba(127, 104, 255, 0.08);
}

html.dark .pricing-table th.is-current-tier,
html.dark .pricing-table td.is-current-tier {
    background: rgba(165, 180, 252, 0.1);
}

.pricing-table th.is-current-tier::after {
    content: attr(data-current-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.8;
}

/* CTA */
.pricing-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 36px 28px;
}

.pricing-cta p {
    margin: 0;
    font-size: 1.05rem;
    color: #334155;
}

html.dark .pricing-cta p {
    color: #cbd5e1;
}

.pricing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 26px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #7f68ff, #ff6f58);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.18s ease;
}

.pricing-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(127, 104, 255, 0.24);
}

/* Monospaced credit values */
.pricing-credits {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Loading / empty helpers */
.pricing-empty {
    padding: 24px;
    text-align: center;
    color: var(--pricing-text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .pricing-hero,
    .pricing-surface {
        padding: 20px;
        border-radius: 22px;
    }

    .pricing-info-card {
        flex-direction: column;
        gap: 14px;
    }

    .pricing-tier-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pricing-tier-badge {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .pricing-tier-legend {
        grid-template-columns: 1fr;
    }
}
