/* ============================================
   Pricing (/pricing) — coin packs + rates
   ============================================
   Hero (title + what's free), beta notice, 4 pack cards (pricing.js renders them),
   rates table and footnotes. Reuses base.css tokens and ui.css buttons/panels.
   ============================================ */

.pricing-page {
    max-width: 1080px;
    padding-bottom: var(--space-4);
}

/* .ui-btn sets display, which would beat the [hidden] attribute */
.pricing-page [hidden] {
    display: none !important;
}

.pricing-return {
    margin: var(--space-2) 0 var(--space-4);
}

/* ---------- Hero ---------- */
.pricing-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: var(--space-2) 0 var(--space-5);
    padding: 32px 36px;
    border-radius: 28px;
    border: 1px solid var(--line-2);
    background:
        radial-gradient(55% 120% at 0% 0%, rgba(252, 211, 77, 0.14) 0%, transparent 60%),
        linear-gradient(135deg, #17132f 0%, #110d26 100%);
    box-shadow: var(--shadow-card);
}

.pricing-hero__eyebrow {
    font-family: var(--font-display);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-gold);
}

.pricing-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(28px, 2.8vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

.pricing-hero__intro {
    max-width: 680px;
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.pricing-hero__intro strong {
    color: var(--text-primary);
}

/* ---------- Beta notice + feedback ---------- */
.pricing-beta {
    margin: 0 0 var(--space-4);
    padding: 12px 16px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line-accent);
    background: var(--accent-soft);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--text-primary);
}

.pricing-status,
.pricing-error {
    margin: 0 0 var(--space-4);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.pricing-status {
    color: var(--accent-green);
}

.pricing-error {
    color: var(--accent-red);
}

/* ---------- Pack cards ---------- */
.pricing-packs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
}

.pricing-pack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
    padding: 22px 20px 20px;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--line-1);
    background: var(--surface-1);
    box-shadow: var(--shadow-card);
}

.pricing-pack__notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--line-accent);
    background: var(--accent-soft);
    font-size: 12.5px;
    line-height: 1.5;
}

.pricing-pack__badge {
    display: inline-block;
    margin: 0 0 10px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--line-accent);
    background: var(--accent-soft);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-pack__name {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-tertiary);
}

.pricing-pack__price {
    margin: 8px 0 0;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.pricing-pack__vat {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.pricing-pack__body {
    flex: 1;
}

.pricing-pack__coins {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fde68a;
}

.pricing-pack__bonus {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-300);
}

.pricing-pack__btn {
    width: 100%;
    height: auto;
    min-height: 42px;
    padding: 10px 14px;
    line-height: 1.3;
    white-space: normal;
    text-align: center;
}

/* ---------- Rates ---------- */
.pricing-rates {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-12);
}

.pricing-rates__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.pricing-rates__table-wrap {
    overflow: hidden;
}

.pricing-rates__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pricing-rates__table th,
.pricing-rates__table td {
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line-1);
}

.pricing-rates__table th {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.pricing-rates__table td {
    color: var(--text-secondary);
}

.pricing-rates__table td:last-child {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    white-space: nowrap;
}

.pricing-rates__table td.is-free {
    color: var(--accent-green);
}

.pricing-rates__table tbody tr:last-child td {
    border-bottom: none;
}

.pricing-note {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-tertiary);
}

.pricing-note a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pricing-note a:hover {
    color: var(--text-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .pricing-packs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pricing-hero {
        padding: 24px 20px;
    }

    .pricing-rates__table th,
    .pricing-rates__table td {
        padding: 10px 14px;
    }
}

@media (max-width: 520px) {
    .pricing-packs {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Pay modal (adapters that render inside our page, e.g. the Toss widget) ---------- */
.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--bg-overlay);
}

.pay-modal[hidden] {
    display: none;
}

/* Two columns (methods | agreement + actions) so the widget fits the screen without scrolling;
   below 760px it stacks and only the methods column scrolls. */
.pay-modal__box {
    --pay-modal-gap: 32px;          /* overlay padding, top + bottom */
    --pay-modal-chrome: 72px;       /* box padding + head */
    display: flex;
    flex-direction: column;
    width: min(920px, 100%);
    max-height: calc(100vh - var(--pay-modal-gap));
    padding: 16px 20px;
    border-radius: var(--radius-xl);
    background: #ffffff;   /* the Toss widget is drawn for a light background */
    color: #191f28;
    overflow: hidden;
}

.pay-modal__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    min-height: 0;
}

.pay-modal__body {
    min-height: 0;
    max-height: calc(100vh - var(--pay-modal-gap) - var(--pay-modal-chrome));
    overflow-y: auto;
}

.pay-modal__side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 760px) {
    .pay-modal__box {
        --pay-modal-chrome: 210px;  /* + agreement and actions under the methods */
    }

    .pay-modal__main {
        grid-template-columns: 1fr;
    }
}

.pay-modal__head {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pay-modal__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}

.pay-modal__test {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: #fff4d6;
    color: #8a5a00;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.pay-modal__actions {
    flex: none;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ui.css buttons are drawn for the dark shell; the secondary one needs light-box colors here */
.pay-modal .ui-btn:not(.ui-btn--primary) {
    color: #191f28;
    background: #f2f4f6;
    border-color: #d1d6db;
}
