/* ───────────────────────────────────────────────────────────────
   Pricing-tier card styles.
   Loaded by the public /pricing page (not the dashboard).

   Why a separate file:
   The dashboard billing tab already has these rules in
   client/public/css/dashboard-v2.css. Loading dashboard-v2.css on
   the public marketing page would ship ~100KB of dashboard-only
   chrome (sidebar, app-shell, dashboard widgets) for nothing.
   This file is the marketing-page subset.

   Caveat: the rules below are duplicated with the bill-* block in
   dashboard-v2.css. Keeping them in lockstep is a known cost. A
   future cleanup can delete the duplicates from dashboard-v2.css
   and have both pages link this file — once we're confident it's
   visually identical to the dashboard (smoke-tested across
   light/dark themes + responsive breakpoints).

   Hand-maintained (like dashboard-v2.css). Not in client/build:css.
   ─────────────────────────────────────────────────────────────── */

.v2-theme .bill-tier-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
    margin-top: 1rem;
}
@media (min-width: 880px) {
    .v2-theme .bill-tier-grid { grid-template-columns: 1fr 1fr; }
}

.v2-theme .bill-tier-grid--three {
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .v2-theme .bill-tier-grid--three { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
    .v2-theme .bill-tier-grid--three { grid-template-columns: 1fr 1fr 1fr; }
}

.v2-theme .bill-tier {
    position: relative;
    background-color: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 1rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.v2-theme .bill-tier--pro {
    border-color: var(--rw-accent);
    box-shadow: 0 0 0 1px var(--rw-accent);
}

.v2-theme .bill-tier--max {
    border-color: color-mix(in srgb, var(--rw-accent) 60%, var(--rw-border));
    background-color: color-mix(in srgb, var(--rw-accent-light, rgba(13, 95, 63, 0.06)) 50%, var(--rw-card-bg));
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.v2-theme .bill-tier--max:hover {
    border-color: var(--rw-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.v2-theme .bill-tier-recommended {
    position: absolute;
    top: -0.65rem;
    left: 1.5rem;
    padding: 0.25rem 0.65rem;
    background-color: var(--rw-accent);
    color: var(--rw-white, #ffffff);
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.v2-theme .bill-tier-head {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.v2-theme .bill-tier-name {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--rw-text);
    letter-spacing: -0.01em;
    margin: 0;
}

.v2-theme .bill-tier-tagline {
    margin: 0;
    color: var(--rw-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.v2-theme .bill-tier-price {
    margin: 0.5rem 0 0;
    color: var(--rw-text);
    font-size: 1rem;
    min-height: 3.25rem;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.v2-theme .bill-tier-price strong {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--rw-text);
    letter-spacing: -0.02em;
}

.v2-theme .bill-tier-price span {
    color: var(--rw-muted);
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.v2-theme .bill-tier-price .bill-price-monthly,
.v2-theme .bill-tier-price .bill-price-annual {
    display: none;
}

.v2-theme .bill-tier-price.show-monthly .bill-price-monthly,
.v2-theme .bill-tier-price.show-annual .bill-price-annual {
    display: inline-block;
}

.v2-theme .bill-tier-price:not(.show-monthly):not(.show-annual) .bill-price-annual {
    display: inline-block;
}

.v2-theme .bill-tier-price.is-swapping {
    opacity: 0;
    transform: translateY(4px);
}

.v2-theme .bill-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.v2-theme .bill-feature {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--rw-text);
}

.v2-theme .bill-feature-icon {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

.v2-theme .bill-feature-icon--ok {
    background-color: var(--rw-accent-light, rgba(13, 95, 63, 0.1));
    color: var(--rw-accent);
}

.v2-theme .bill-feature-icon--no {
    color: var(--rw-muted);
    font-weight: 700;
}

.v2-theme .bill-feature-note {
    color: var(--rw-muted);
    font-size: 0.82rem;
    margin-left: 0.4rem;
    padding: 0.05rem 0.45rem;
    background-color: var(--rw-surface);
    border-radius: 0.4rem;
    white-space: nowrap;
}

.v2-theme .bill-feature-text { flex: 1; min-width: 0; }

.v2-theme .bill-tier-foot { margin-top: auto; }

.v2-theme .bill-tier-cta {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.v2-theme .bill-tier-cta--max {
    background-color: var(--rw-accent);
}

.v2-theme .bill-fineprint {
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    color: var(--rw-muted);
    line-height: 1.5;
}

.v2-theme .bill-fineprint--centered { text-align: center; }

/* Stripe-style monthly/annual cycle toggle (same as dashboard). */
.v2-theme .bill-cycle-wrap {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0 1.5rem;
}

.v2-theme .bill-cycle-toggle {
    position: relative;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0;
    padding: 4px;
    background-color: var(--rw-surface);
    border: 1px solid var(--rw-border);
    border-radius: 9999px;
    overflow: hidden;
}

.v2-theme .bill-cycle-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background-color: var(--rw-card-bg);
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.v2-theme .bill-cycle-toggle.is-annual .bill-cycle-thumb {
    transform: translateX(100%);
}

.v2-theme .bill-cycle-opt {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--rw-muted);
    transition: color 0.15s ease;
    white-space: nowrap;
}

.v2-theme .bill-cycle-opt.is-active {
    color: var(--rw-text);
}

.v2-theme .bill-cycle-opt:focus-visible {
    outline: 2px solid var(--rw-accent);
    outline-offset: 2px;
    border-radius: 9999px;
}

.v2-theme .bill-cycle-save {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    background-color: var(--rw-accent-light, rgba(13, 95, 63, 0.12));
    color: var(--rw-accent);
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
    .v2-theme .bill-cycle-thumb { transition: none; }
    .v2-theme .bill-tier-price,
    .v2-theme .bill-tier--max,
    .v2-theme .bill-tier-cta {
        transition: none;
    }
}

/* ───────────────────────────────────────────────────────────────
   Pricing-page-specific layout — wraps the tier grid + page hero
   + FAQ section on /pricing only.
   ─────────────────────────────────────────────────────────────── */

.v2-theme .pricing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.25rem 4rem;
}

.v2-theme .pricing-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.v2-theme .pricing-hero h1 {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--rw-text);
    letter-spacing: -0.02em;
    margin: 0 0 0.85rem;
}

.v2-theme .pricing-hero p {
    margin: 0 auto;
    max-width: 640px;
    font-size: 1.05rem;
    color: var(--rw-muted);
    line-height: 1.55;
}

.v2-theme .pricing-faq {
    max-width: 760px;
    margin: 4rem auto 0;
}

.v2-theme .pricing-faq h2 {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rw-text);
    letter-spacing: -0.01em;
    text-align: center;
    margin: 0 0 1.5rem;
}

.v2-theme .pricing-faq-item {
    border-bottom: 1px solid var(--rw-border);
    padding: 1rem 0;
}
.v2-theme .pricing-faq-item:first-of-type { border-top: 1px solid var(--rw-border); }

.v2-theme .pricing-faq-item summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--rw-text);
    font-size: 1rem;
    padding-right: 1.5rem;
    position: relative;
    user-select: none;
}
.v2-theme .pricing-faq-item summary::-webkit-details-marker { display: none; }
.v2-theme .pricing-faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--rw-muted);
    transition: transform 0.15s ease;
}
.v2-theme .pricing-faq-item[open] summary::after {
    content: '−';
}

.v2-theme .pricing-faq-item p {
    margin: 0.75rem 0 0;
    color: var(--rw-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
