/* =====================================================================================
   Landing page pricing: monthly / yearly switch (CSS only, no JavaScript).
   The two radios are siblings placed before .lp-billing, .lp-plans and .lp-addons; the checked one decides
   which prices show. Monthly is the default, also without CSS support for the switch.
   ===================================================================================== */

.lp-billing-input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

.lp-billing {
    display: flex; width: fit-content; margin: 0 auto clamp(20px, 4vw, 32px); padding: 4px; gap: 4px;
    border: 1px solid var(--lp-border); border-radius: 999px; background: var(--lp-card);
}
.lp-billing label {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px;
    font-size: 15px; font-weight: 600; color: var(--lp-text-2); cursor: pointer; user-select: none;
}
.lp-billing label:hover { color: var(--lp-text); }
.lp-save {
    padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: color-mix(in srgb, var(--ds-success-fg, var(--lp-brand-fg)) 14%, transparent);
    color: var(--ds-success-fg, var(--lp-brand-fg));
}

/* Selected option */
#lp-billing-monthly:checked ~ .lp-billing label[for="lp-billing-monthly"],
#lp-billing-yearly:checked ~ .lp-billing label[for="lp-billing-yearly"] {
    background: var(--lp-brand); color: var(--lp-on-brand);
}
#lp-billing-yearly:checked ~ .lp-billing label[for="lp-billing-yearly"] .lp-save {
    background: color-mix(in srgb, var(--lp-on-brand) 22%, transparent); color: var(--lp-on-brand);
}
#lp-billing-monthly:focus-visible ~ .lp-billing label[for="lp-billing-monthly"],
#lp-billing-yearly:focus-visible ~ .lp-billing label[for="lp-billing-yearly"] {
    outline: 2px solid var(--lp-brand-fg); outline-offset: 2px;
}

/* Which prices show */
.lp-yearly { display: none; }
#lp-billing-yearly:checked ~ .lp-plans .lp-monthly,
#lp-billing-yearly:checked ~ .lp-addons .lp-monthly { display: none; }
#lp-billing-yearly:checked ~ .lp-plans .lp-yearly { display: block; }
#lp-billing-yearly:checked ~ .lp-addons .lp-yearly { display: inline; }

/* Compare-all-features table: one price row per period */
.lp-yearly-row { display: none; }
#lp-billing-yearly:checked ~ .lp-compare .lp-monthly-row { display: none; }
#lp-billing-yearly:checked ~ .lp-compare .lp-yearly-row { display: table-row; }

.lp-yearly .lp-price { margin-bottom: 4px; }
.lp-price-note { margin: 0 0 14px; font-size: 13px; color: var(--lp-text-3); }
.lp-addons li .lp-monthly, .lp-addons li .lp-yearly { font-weight: 600; white-space: nowrap; }
