/* ==========================================================================================
   BarcoderX website: presale reservation page layer. Author: BarcoderX.
   Pages: /presale/ and /es/preventa/.
   Loaded after site.css, inner.css, faq.css and article.css. The page frame (hero, split sections, steps, deflist, note, accordion,
   form embed) already exists in those files; this file adds the three presale price tables and the presale form-frame heights.
   Tokens only: every colour, space, radius and type size comes from /brand/tokens.css through site.css.
   Light theme only. Mobile first. Breakpoint: 48rem (768), the same switch point as the .atab tables in article.css.
   ========================================================================================== */

/* ============================== PRICE GROUPS ============================== */
/* Three tables (Basic, Ultimate, editor add-on), each with its own short heading and one-line caption, spaced like sections inside a section. */
.pt-group + .pt-group { margin-top: var(--bx-space-12); }
.pt-group h3 { font-size: var(--bx-text-xl); }
.pt-group > .cap { max-width: 62ch; margin-bottom: var(--bx-space-4); }
.pt-note { max-width: 62ch; margin-top: var(--bx-space-8); }
.pt-cta { margin-top: var(--bx-space-6); max-width: none; }

/* ============================== PRICE TABLE ============================== */
/* Builds on .atab (article.css), which already reflows to labeled cards below 48rem through data-label. Wide screens: numbers are
   right-aligned in mono with tabular figures so the digits line up down each column; the presale column is the one that carries weight. */
.atab-price tbody th { width: auto; }
/* A table this wide would leave the row name and its prices far apart on large screens, so it stops at 60rem. */
.atab-price { max-width: 60rem; }
/* Column headers keep the small mono caps from .atab; only their alignment and padding follow the figures below them. */
.atab-price thead th:not(:first-child) { text-align: right; padding-right: var(--bx-space-4); white-space: nowrap; }
.atab-price td { text-align: right; padding-right: var(--bx-space-4); font: 500 var(--bx-text-md)/1.3 var(--bx-font-mono); font-variant-numeric: tabular-nums; color: var(--bx-gray-700); white-space: nowrap; }
.atab-price td.pt-sale { font-weight: 700; color: var(--bx-ink); background: var(--bx-green-50); }
.atab-price td.pt-save { color: var(--bx-green-600); font-weight: 600; padding-right: 0; }
.atab-price thead th:last-child { padding-right: 0; }
/* The tinted presale column also gets the header cell, so it reads as one band. */
.atab-price thead th:nth-child(3) { background: var(--bx-green-50); color: var(--bx-green-700); }
/* Row name plus its sub-label (developer count, or "for redistribution") in the same small mono as other tables on the site. */
.pt-sub { display: block; margin-top: var(--bx-space-1); font: 500 var(--bx-text-xs)/1.3 var(--bx-font-mono); color: var(--bx-gray-600); }

/* ============================== PHONES ============================== */
/* Below 48rem article.css turns each row into a block and prints data-label above each value. Here the label sits on the left and
   the value on the right of one line, which is easier to scan for three short money values. The presale line keeps its tint. */
@media (max-width: 47.999rem) {
  .atab.atab-price td { display: flex; justify-content: space-between; align-items: baseline; gap: var(--bx-space-4); text-align: right; padding: var(--bx-space-2) 0; }
  .atab.atab-price td + td { margin-top: 0; }
  .atab.atab-price td::before { display: block; margin: 0; text-align: left; }
  .atab.atab-price tbody td.pt-sale { padding-inline: var(--bx-space-3); margin-inline: calc(var(--bx-space-3) * -1); }
  .atab.atab-price tbody td.pt-save { padding-right: 0; }
  .atab-price .pt-sub { margin-top: var(--bx-space-1); }
}

/* ============================== FORM FRAME HEIGHT ============================== */
/* The embedded reservation form is longer than the contact form, so the shared --form-h values in inner.css cut it off and
   leave a scrollbar inside the frame. These values are presale-only (this file loads on the two presale pages only).
   Measured on the published form with the document height at the frame widths this page produces (viewport minus page
   gutters and a 15px scrollbar, the narrowest case; overlay scrollbars give a wider frame and a shorter form, so a little
   blank space at the end is the worst outcome). Measured form heights, English / Spanish:
     frame 273px 2220 / 2287   frame 313px 2051 / 2099   frame 433px 1850 / 1954   frame 553-587px 1759 / 1759
     frame 640px and wider 1703 / 1703 (rows go two-column).
   Each value adds about 50px so a validation message or a font fallback does not bring the inner scrollbar back.
   Breakpoints follow the frame, not the form: the split layout puts the frame beside the text from 64rem, which narrows it to
   587px until 69rem. The Spanish rules repeat the same ranges at the same specificity as inner.css so they win by order. */
:root { --form-h: 2270px; }                                                 /* under 360px */
@media (min-width: 22.5rem) { :root { --form-h: 2100px; } }                 /* 360px and up */
@media (min-width: 30rem)   { :root { --form-h: 1900px; } }                 /* 480px and up */
@media (min-width: 37.5rem) { :root { --form-h: 1810px; } }                 /* 600px and up */
@media (min-width: 43rem)   { :root { --form-h: 1750px; } }                 /* 688px and up: the frame is 640px or wider, so rows go two-column */
@media (min-width: 64rem)   { :root { --form-h: 1810px; } }                 /* text column beside the frame again: frame narrows to 587px */
@media (min-width: 69rem)   { :root { --form-h: 1750px; } }                 /* frame back above 640px */

:root:lang(es) { --form-h: 2340px; }
@media (min-width: 22.5rem) { :root:lang(es) { --form-h: 2150px; } }
@media (min-width: 30rem)   { :root:lang(es) { --form-h: 2010px; } }
@media (min-width: 37.5rem) { :root:lang(es) { --form-h: 1810px; } }
@media (min-width: 43rem)   { :root:lang(es) { --form-h: 1750px; } }
@media (min-width: 64rem)   { :root:lang(es) { --form-h: 1810px; } }
@media (min-width: 69rem)   { :root:lang(es) { --form-h: 1750px; } }