/* ───────────────────────────────────────────────────────────────
   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-active-pill {
    align-self: flex-start;
    padding: 0.18rem 0.55rem;
    background-color: var(--rw-accent-light, rgba(13, 95, 63, 0.1));
    color: var(--rw-accent);
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
.v2-theme .bill-tier-active-pill--filled {
    background-color: var(--rw-accent);
    color: var(--rw-white, #ffffff);
}

.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;
}

/* Testimonials block on /pricing. Section wrapper is namespaced to
   the pricing page; the card markup inside reuses pg-story-* from
   static-v2.css so /stories and /pricing render identical cards. The
   items shown here mirror the Product JSON-LD review[] embedded by
   server/routes/views/pricing.js — Google requires schema reviews to
   also appear on the page. */
.v2-theme .pricing-testimonials {
    max-width: 1200px;
    margin: 4rem auto 0;
}
.v2-theme .pricing-testimonials > 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.75rem;
}
.v2-theme .pricing-testimonials-cta {
    text-align: center;
    margin-top: 2rem;
}

.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;
}

/* ───────────────────────────────────────────────────────────────
   Billing-state classes used by the hirer wallet (/hire/wallet)
   and any other surface that loads pricing-tiers.css and needs
   the active-state UI primitives. Minimal styling — kept in lock-
   step with the equivalent rules in dashboard-v2.css so pages can
   load either stylesheet and render consistently.
   ─────────────────────────────────────────────────────────────── */

/* Loading skeleton */
.v2-theme .bill-loading {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0;
}
.v2-theme .bill-skel {
    height: 14px;
    background: linear-gradient(90deg, var(--rw-surface) 0%, color-mix(in srgb, var(--rw-surface) 60%, var(--rw-card-bg)) 50%, var(--rw-surface) 100%);
    background-size: 200% 100%;
    border-radius: 6px;
    animation: bill-skel-shine 1.4s ease-in-out infinite;
}
@keyframes bill-skel-shine {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Status banner above the billing card (post-checkout flash, errors). */
.v2-theme .bill-banner {
    margin: 0 0 1rem;
    padding: 0.85rem 1.1rem;
    border-radius: 0.65rem;
    font-size: 0.95rem;
    line-height: 1.4;
    border: 1px solid var(--rw-border);
}
.v2-theme .bill-banner--success { background: var(--rw-accent-light, rgba(13,95,63,0.08)); border-color: var(--rw-accent); color: var(--rw-text); }
.v2-theme .bill-banner--error   { background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.4); color: #b91c1c; }
.v2-theme .bill-banner--warning { background: rgba(234,179,8,0.10); border-color: rgba(234,179,8,0.5); color: #92400e; }
.v2-theme .bill-banner--info    { background: var(--rw-surface); }

.v2-theme .bill-pro-interval {
    color: var(--rw-muted);
    font-weight: 500;
    margin-left: 0.4rem;
}

/* Pro-state usage block (messages this period, credits balance). */
.v2-theme .bill-usage {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rw-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.v2-theme .bill-usage-head {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rw-muted);
}
.v2-theme .bill-usage-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.v2-theme .bill-usage-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.v2-theme .bill-usage-label { font-weight: 600; color: var(--rw-text); }
.v2-theme .bill-usage-count { color: var(--rw-muted); font-variant-numeric: tabular-nums; }
.v2-theme .bill-usage-bar {
    width: 100%;
    height: 6px;
    background: var(--rw-surface);
    border-radius: 9999px;
    overflow: hidden;
}
.v2-theme .bill-usage-fill {
    display: block;
    height: 100%;
    background: var(--rw-accent);
    border-radius: 9999px;
    width: 0%;
    transition: width 0.25s ease;
}
.v2-theme .bill-usage-foot {
    margin: 0;
    font-size: 0.85rem;
    color: var(--rw-muted);
}

.v2-theme .bill-actions { margin-top: 1.25rem; }

/* Founding-hirer banner — pitch element in the free state. */
.v2-theme .bill-founding-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    margin: 0 0 1.25rem;
    background: color-mix(in srgb, var(--rw-accent) 8%, var(--rw-card-bg));
    border: 1px solid var(--rw-accent);
    border-radius: 0.65rem;
    font-size: 0.95rem;
    line-height: 1.4;
}
.v2-theme .bill-founding-icon {
    color: var(--rw-accent);
    font-weight: 700;
}
.v2-theme .bill-founding-counter {
    margin-left: auto;
    padding: 0.18rem 0.55rem;
    background: var(--rw-accent);
    color: var(--rw-white, #ffffff);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
/* Founding badge inside the active-pro card (when this hirer
   has a locked rate). */
.v2-theme .bill-tier-founding-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: var(--rw-accent-light, rgba(13,95,63,0.1));
    color: var(--rw-accent);
    border-radius: 0.45rem;
    font-size: 0.85rem;
    align-self: flex-start;
}

/* À la carte add-on cards (placeholders in this commit). */
.v2-theme .bill-addons {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rw-border);
}
.v2-theme .bill-addons-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rw-text);
}
.v2-theme .bill-addons-sub {
    margin: 0 0 1rem;
    color: var(--rw-muted);
    font-size: 0.92rem;
}
.v2-theme .bill-addons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) {
    .v2-theme .bill-addons-grid { grid-template-columns: 1fr 1fr; }
}
.v2-theme .bill-addon-card {
    padding: 1.1rem;
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.v2-theme .bill-addon-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rw-text);
}
.v2-theme .bill-addon-price {
    margin: 0;
    color: var(--rw-text);
    font-size: 0.95rem;
}
.v2-theme .bill-addon-price strong {
    font-size: 1.15rem;
    color: var(--rw-text);
}
.v2-theme .bill-addon-detail {
    margin: 0 0 0.5rem;
    color: var(--rw-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}
.v2-theme .bill-addon-card button {
    align-self: flex-start;
}

/* Credit-bundle button row inside the Message Credits add-on card. */
.v2-theme .bill-credit-bundles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* Featured-listing job picker modal (hirer wallet add-on). */
.v2-theme .bill-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.v2-theme .bill-modal[hidden] { display: none; }
.v2-theme .bill-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.v2-theme .bill-modal-panel {
    position: relative;
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 0.85rem;
    padding: 1.5rem;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.v2-theme .bill-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--rw-muted);
    cursor: pointer;
    padding: 0.35rem 0.55rem;
    border-radius: 0.4rem;
}
.v2-theme .bill-modal-close:hover { background: var(--rw-surface); color: var(--rw-text); }
.v2-theme .bill-modal-title {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rw-text);
    padding-right: 2rem;
}
.v2-theme .bill-modal-sub {
    margin: 0 0 1rem;
    color: var(--rw-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}
.v2-theme .bill-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.v2-theme .bill-modal-empty {
    margin: 0;
    color: var(--rw-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem 0;
}
.v2-theme .bill-modal-job {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
    padding: 0.7rem 0.85rem;
    background: var(--rw-surface);
    border: 1px solid var(--rw-border);
    border-radius: 0.55rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    font-family: inherit;
}
.v2-theme .bill-modal-job:hover {
    border-color: var(--rw-accent);
    background: var(--rw-card-bg);
}
.v2-theme .bill-modal-job-title {
    font-weight: 600;
    color: var(--rw-text);
    font-size: 0.95rem;
}
.v2-theme .bill-modal-job-meta {
    color: var(--rw-muted);
    font-size: 0.82rem;
}

/* Hirer-pricing section embedded at the bottom of /pricing. Shares
   the bill-tier grid + addons styling above; this block just gives
   the header room to breathe and a clear visual break from the
   worker tier cards. */
.v2-theme .hirer-pricing-section {
    max-width: 1200px;
    margin: 5rem auto 0;
    padding-top: 4rem;
    border-top: 1px solid var(--rw-border);
}
.v2-theme .hirer-pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.v2-theme .hirer-pricing-header h2 {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--rw-text);
    letter-spacing: -0.01em;
    margin: 0 0 0.85rem;
}
.v2-theme .hirer-pricing-header p {
    margin: 0 auto;
    max-width: 640px;
    font-size: 1rem;
    color: var(--rw-muted);
    line-height: 1.55;
}
