/* Plan picker (modules/plan_picker.php) on the brand page and in the home's bottom sheet (home.js, plans.js):
   radio rows, the balance before / after, the total and "Order now" pinned to the bottom. The selection colour is
   the accent in the sheet and the brand's own colour on the brand page (brand.css sets --pick). */
.pk { --pick: var(--accent); --pick-ink: var(--accent-ink); display: grid; }
.pk-list { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pk-label { float: inline-start; width: 100%; margin-bottom: 4px; padding: 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.pk-row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 16px; border: 2px solid transparent; border-radius: 20px;
  background: var(--panel); cursor: pointer; transition: border-color .2s, background-color .2s, transform .15s var(--ease); }
.pk-row:active { transform: scale(.99); }
.pk-row input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.pk-dot { position: relative; display: grid; flex: none; place-items: center; width: 26px; height: 26px; border: 2px solid var(--line-2); border-radius: 50%; transition: background-color .2s, border-color .2s; }
.pk-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pick-ink); transform: scale(0); transition: transform .2s var(--ease); }
.pk-row:has(input:checked) { border-color: var(--pick); background: color-mix(in srgb, var(--pick) 9%, var(--panel)); }
.pk-row:has(input:checked) .pk-dot { border-color: var(--pick); background: var(--pick); }
.pk-row:has(input:checked) .pk-dot::after { transform: scale(1); }
.pk-row:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.pk-row.is-off { opacity: .45; cursor: not-allowed; }
.pk-main { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; line-height: 1.35; }
.pk-main strong { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.pk-main small { color: var(--muted); font-size: 13.5px; font-weight: 600; }
html[dir="rtl"] .pk-main { text-align: right; }
.pk-price { display: grid; flex: none; justify-items: end; line-height: 1.2; }
.mn { white-space: nowrap; }
.mn b { font: 700 19px var(--font); font-variant-numeric: tabular-nums; }
.mn small { margin-inline: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.pk-price s { color: var(--muted); font: 600 13px var(--font); }
.pk-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.pk-note .ic { color: var(--accent); }
.pk-perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 13.5px; font-weight: 700; text-align: center; }
.pk-perks span { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 8px; border-radius: 50%; background: var(--panel); color: var(--accent); }
.pk-details { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin-top: 18px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.pk-details:hover { color: var(--text); }
.pk-foot { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 18px; margin: 22px -16px 0;
  padding: 14px 16px max(14px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: rgb(var(--bg-rgb) / .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.pk-bal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--muted); font-size: 13.5px; }
.pk-bal b { color: var(--text); font-family: var(--font); font-weight: 700; }
.pk-bal .is-short b { color: var(--danger); }
.pk-total { display: grid; line-height: 1.2; }
.pk-total small { color: var(--muted); font-size: 13px; font-weight: 600; }
.pk-total strong { font: 700 24px var(--font); white-space: nowrap; }
.pk-go { min-height: 58px; border-radius: 20px; font-size: 17px; font-weight: 800; }
.pk-go[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.pk-go-price { display: none; align-items: center; gap: 12px; font-family: var(--font); }
.pk-go-price i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .45; }
@media (min-width: 901px) {
  .bp-body .pk-foot { margin-inline: 0; padding-inline: 4px; }
}

/* —— Home bottom sheet (home.js): the brand page's [data-sheet] block in a <dialog> —— */
.sheet { position: fixed; inset: auto 0 0; display: none; width: 100%; max-width: 560px; max-height: calc(100dvh - 48px); margin: 0 auto; padding: 0; border: 0;
  border-radius: 28px 28px 0 0; background: var(--panel); color: var(--text); overflow: hidden; box-shadow: 0 -20px 60px -20px rgb(0 0 0 / .6); }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .32s var(--ease); }
html:has(.sheet[open]) { overflow: hidden; }
.sheet::backdrop { background: rgb(0 0 0 / .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-grab { flex: none; width: 44px; height: 5px; margin: 10px auto 2px; border-radius: 3px; background: var(--line-2); }
.sheet-body { flex: 1 1 auto; min-height: 0; padding: 10px 18px 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sheet-title { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.sheet-title strong { overflow: hidden; font: 800 28px/1.15 var(--font); letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.sheet-title small { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--accent); font-size: 14px; font-weight: 800; }
.sheet-x { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--panel-3); color: var(--text-2); cursor: pointer; }
.sheet-x:hover { color: var(--text); }
.sheet .pk-row { background: var(--panel-2); }
.sheet .pk-perks, .sheet .pk-total { display: none; }
.sheet .pk-foot { margin-inline: -18px; padding-inline: 18px; background: rgb(var(--panel-rgb) / .94); }
.sheet .pk-go { grid-column: 1 / -1; }
.sheet .pk-go-price { display: inline-flex; }
.sheet-skel { height: 76px; margin-bottom: 10px; border-radius: 20px; background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%;
  animation: sheet-shimmer 1.2s linear infinite; }
.sheet-skel:first-child { width: 60%; height: 66px; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-shimmer { to { background-position: -200% 0; } }
@media (min-width: 700px) {
  .sheet { inset: 0; max-height: min(86vh, 820px); margin: auto; border-radius: 28px; }
  .sheet[open] { animation: sheet-pop .25s var(--ease); }
  .sheet-grab { visibility: hidden; }
  @keyframes sheet-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
}
@media (prefers-reduced-motion: reduce) {
  .sheet[open], .sheet-skel { animation: none; }
}
