/* ==========================================================================
   BASIC / PLUS / PRIME, in the three colours of the shop: Basic green, Plus deep blue, Prime plum (violet).
   Solid pills with white words so they read from across a screen; three dots that fill up (1, 2, 3) so they also read without colour.
   Used on the Shop pages (cards and the "what do they mean?" box), on the Offer page (the packages) and on the product page (the options).
   Loaded by src/js/ui/layout.js only on those pages.
   ========================================================================== */
:root {
  --tier-basic: #0B7A3B;   /* 5.4:1 with white */
  --tier-plus: #0D3B9E;    /* 9.8:1 */
  --tier-prime: #6B1F82;   /* 9.8:1 */
  --tier-recommended: var(--kt-yellow);
}
.tier { display: inline-flex; align-items: center; gap: 0.45rem; width: fit-content; min-height: 1.9rem; margin: 0; padding: 0.2rem; padding-inline: 0.7rem 0.85rem; border-radius: var(--radius-pill); background: var(--tier-c, var(--kt-black)); color: var(--kt-white); font-size: var(--step--1); font-weight: 800; line-height: 1; letter-spacing: 0.01em; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28); }
.tier__dots { display: inline-flex; gap: 0.2rem; }
.tier__dots i { width: 0.46rem; height: 0.46rem; border-radius: 50%; background: currentColor; opacity: 0.35; }
.tier__dots i.on { opacity: 1; }
.tier--basic { --tier-c: var(--tier-basic); }
.tier--plus { --tier-c: var(--tier-plus); }
.tier--prime { --tier-c: var(--tier-prime); }
.tier__rec { display: inline-flex; align-items: center; min-height: 1.5rem; padding: 0.15rem 0.6rem; border-radius: var(--radius-pill); background: var(--tier-recommended); color: var(--kt-black); font-size: var(--step--1); font-weight: 800; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }

/* on a product card of the Shop pages: the pill sits on the bottom corner of the picture */
.product-card__media .tier { position: absolute; inset-inline-start: 0.6rem; bottom: 0.6rem; z-index: 2; }

/* "What do Basic, Plus and Prime mean?" */
.tier-guide { margin-block: var(--space-4); border-radius: var(--radius-md); background: var(--kt-paper); }
.tier-guide__summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 44px; padding: var(--space-3) var(--space-4); font-weight: 700; cursor: pointer; list-style: none; border-radius: inherit; }
.tier-guide__summary::-webkit-details-marker { display: none; }
.tier-guide__summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--kt-white); font-size: 1.1rem; line-height: 1; }
.tier-guide[open] > .tier-guide__summary::after { content: '\2212'; }
.tier-guide__summary:focus-visible { outline-offset: -3px; }
.tier-guide__list { display: grid; gap: var(--space-3); padding: 0 var(--space-4) var(--space-4); }
.tier-guide__item { display: grid; gap: 0.35rem; padding: var(--space-3); border-radius: var(--radius-md); background: var(--kt-white); border-inline-start: 0.35rem solid var(--tier-c, var(--kt-black)); }
.tier-guide__item--basic { --tier-c: var(--tier-basic); }
.tier-guide__item--plus { --tier-c: var(--tier-plus); }
.tier-guide__item--prime { --tier-c: var(--tier-prime); }
.tier-guide__text { font-size: var(--step--1); color: var(--color-text-muted); max-width: 40rem; }

/* the packages of an offer (the Offer page): a coloured band with the tier, and "Recommended" on Plus */
.option-card--tier { position: relative; border-top: 0.5rem solid var(--tier-c); padding-top: var(--space-4); }
.option-card--basic { --tier-c: var(--tier-basic); }
.option-card--plus { --tier-c: var(--tier-plus); }
.option-card--prime { --tier-c: var(--tier-prime); }

.option-card--plus { box-shadow: 0 0 0 3px var(--tier-plus), 0 10px 28px rgba(13, 59, 158, 0.22); }

/* the options of a product (the product page): three tier buttons; Plus carries "Recommended" */
.chips--tiers { gap: 0.9rem 0.6rem; padding-top: 0.8rem; }
.chip--tier > span { gap: 0.45rem; min-height: 48px; padding-inline: 1rem; background: var(--kt-white); color: var(--tier-c); box-shadow: inset 0 0 0 2.5px var(--tier-c); font-weight: 800; }
.chip--tier:hover input:not(:checked) + span { background: color-mix(in srgb, var(--tier-c) 10%, var(--kt-white)); }
.chip--tier input:checked + span { background: var(--tier-c); color: var(--kt-white); }
.chip--basic { --tier-c: var(--tier-basic); }
.chip--plus { --tier-c: var(--tier-plus); }
.chip--prime { --tier-c: var(--tier-prime); }
.chip__rec { position: absolute; top: -0.8rem; inset-inline-end: 0.4rem; z-index: 1; pointer-events: none; }
.option-card--tier .option-card__media { aspect-ratio: 4 / 5; background: #0B0B0B; } /* the pack posters (28 Nov) */
/* the pack page (30 Nov 2026): each level's items alone, on the dark of the home slide, 4:3, so the three cards compare in less scroll */
.option-card--tier .option-card__media--items { aspect-ratio: 4 / 3; background: radial-gradient(120% 90% at 50% 20%, #1b2a6b, #0B0B0B 75%); }
.option-card--tier .option-card__media--items img { object-fit: contain; }
