/* ===========================================================================
   Plan cards, allowance lists and the checkout stepper.

   Plain CSS on purpose: the committed tailwind.css is a stale build without
   arbitrary-value utilities, so anything expressed as h-[calc(...)] or
   max-md:* silently does nothing. See static/css/agent_cards.css for the same
   reasoning.
   =========================================================================== */

.plan-card {
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease;
}
.plan-card:hover { border-color: var(--border-strong); }

/* The recommended tier is lifted rather than recoloured, so the accent stays
   meaningful for actions instead of decoration. */
.plan-card-featured {
    border-color: rgb(var(--primary-rgb) / .5);
    box-shadow: var(--shadow-lg);
}
@media (min-width: 1280px) {
    .plan-card-featured { transform: none; }
    .plan-card-featured:hover { transform: none; }
}

/* ── Allowance block ────────────────────────────────────────────────────── */

.plan-allow {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: .85rem .95rem;
    background: var(--sunken);
}
.plan-allow-h {
    font-size: 10.5px;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: .5rem;
}
.plan-allow ul {
    display: grid;
    gap: .3rem;
    margin: 0 0 .55rem;
    padding: 0;
    list-style: none;
}
.plan-allow li {
    font-size: 11.5px;
    color: var(--color-text-main);
    display: flex;
    align-items: baseline;
    gap: .4rem;
}
/* Leading marker instead of list-style so RTL alignment stays correct. */
.plan-allow li::before {
    content: '';
    flex: 0 0 auto;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgb(var(--primary-rgb) / .75);
    transform: translateY(-2px);
}
.plan-allow li b { font-variant-numeric: tabular-nums; }
.plan-allow-f {
    font-size: 10px;
    line-height: 1.7;
    color: var(--color-text-muted);
    opacity: .8;
    padding-top: .5rem;
    border-top: 1px solid var(--border-subtle);
}

/* ── Checkout stepper ───────────────────────────────────────────────────── */

.ck-steps {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 2.25rem;
}
.ck-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 11.5px;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.ck-step i {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    font-size: 11px;
    font-style: normal;
    font-variant-numeric: tabular-nums;
}
.ck-step.is-on { color: var(--color-text-main); }
.ck-step.is-on i {
    background: rgb(var(--primary-rgb));
    border-color: rgb(var(--primary-rgb));
    color: var(--color-text-on-primary);
    font-weight: 700;
}
.ck-step.is-done i {
    border-color: rgb(var(--primary-rgb) / .5);
    color: rgb(var(--primary-ink-rgb));
}
.ck-bar {
    flex: 1 1 auto;
    height: 1px;
    min-width: .75rem;
    background: var(--border-strong);
}

/* Hide the step labels on phones; the numbers alone carry the progress. */
@media (max-width: 639px) {
    .ck-step span { display: none; }
    .ck-steps { gap: .35rem; }
}

/* ── Add-on option rows ─────────────────────────────────────────────────── */

.ck-opt {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .95rem 1.05rem;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.ck-opt:hover { border-color: rgb(var(--primary-rgb) / .4); }
.ck-opt input { margin-top: .2rem; accent-color: rgb(var(--primary-rgb)); }
/* :has() lets the whole row react to its radio without any JS. */
.ck-opt:has(input:checked) {
    border-color: rgb(var(--primary-rgb) / .6);
    background: rgb(var(--primary-rgb) / .07);
}
.ck-opt-t { font-size: 12.5px; color: var(--color-text-main); font-weight: 700; }
.ck-opt-d { font-size: 10.5px; color: var(--color-text-muted); line-height: 1.7; margin-top: .15rem; }
.ck-opt-p { margin-inline-start: auto; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* "recommended" badge next to an option title (agent creation wizard). */
.ck-opt-tag {
    display: inline-block;
    margin-inline-start: .4rem;
    padding: .1rem .45rem;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 700;
    background: rgb(var(--primary-rgb) / .15);
    color: rgb(var(--primary-ink-rgb));
}

/* ── Review totals ──────────────────────────────────────────────────────── */

.ck-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 12.5px;
}
.ck-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .9rem;
    font-size: 15px;
    font-weight: 800;
}
.ck-total b { font-variant-numeric: tabular-nums; }

/* ── Storage term tabs (storefront) ─────────────────────────────────────── */

.term-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
}
.term-tab {
    padding: .5rem 1.1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-text-muted);
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.term-tab:hover { border-color: rgb(var(--primary-rgb) / .4); }
/* Tailwind's .grid would otherwise beat the [hidden] attribute. */
[data-term-panel][hidden] { display: none !important; }
.term-tab[aria-selected="true"] {
    border-color: rgb(var(--primary-rgb) / .6);
    background: rgb(var(--primary-rgb) / .1);
    color: var(--color-text-main);
}

/* ── Storage size + term picker (checkout add-ons) ──────────────────────── */

/* Two mode cards side by side ("gift only" / "more"); they stack on phones. */
.ck-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 379px) { .ck-modes { grid-template-columns: minmax(0, 1fr); } }

/* Tailwind's preflight [hidden] rule is weaker than the display below. */
.ck-more[hidden] { display: none; }
.ck-more {
    display: grid;
    gap: 1.1rem;
    margin-top: 1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-subtle);
    animation: ck-reveal .18s ease-out;
}
@keyframes ck-reveal { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .ck-more { animation: none; } }

.ck-field { display: grid; gap: .5rem; }
.ck-field-l { font-size: 11px; font-weight: 700; color: var(--color-text-muted); }

.ck-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
@media (max-width: 379px) { .ck-chips-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ck-chip {
    display: grid;
    justify-items: center;
    gap: .15rem;
    min-height: 44px;
    padding: .55rem .3rem;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    font-size: 12px;
    color: var(--color-text-muted);
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.ck-chip b { font-size: 12.5px; color: var(--color-text-main); }
.ck-chip small { font-size: 10.5px; font-variant-numeric: tabular-nums; }
.ck-chip:hover:not(:disabled) { border-color: rgb(var(--primary-rgb) / .4); }
.ck-chip:focus-visible { outline: 2px solid rgb(var(--primary-rgb) / .6); outline-offset: 2px; }
.ck-chip:disabled { opacity: .4; cursor: not-allowed; }
.ck-chip[aria-checked="true"] {
    border-color: rgb(var(--primary-rgb) / .7);
    background: rgb(var(--primary-rgb) / .1);
    color: var(--color-text-main);
}
.ck-chip[aria-checked="true"] small { color: rgb(var(--primary-ink-rgb)); }

/* What will be added to the order, restated in one line before "continue". */
.ck-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem .75rem;
    padding: .8rem 1rem;
    border-radius: 12px;
    background: rgb(var(--primary-rgb) / .07);
    border: 1px solid rgb(var(--primary-rgb) / .25);
}
.ck-sum-l { font-size: 12.5px; font-weight: 700; color: var(--color-text-main); }
.ck-sum-p { font-size: 12px; color: var(--color-text-muted); }
.ck-sum-p b { font-size: 15px; font-weight: 800; color: var(--color-text-main); font-variant-numeric: tabular-nums; }
.ck-sum-d { flex-basis: 100%; font-size: 10.5px; color: var(--color-text-muted); }
.ck-sum-d:empty { display: none; }
