/* SQWADSY App — prototype v2.9 · Game Hub v3 integration fixes over v2.8. MOD DEMONSTRATIV.
 * hub-v3.css is kept as delivered; these rules only resolve conflicts with the v2.4–v2.8 theme layers,
 * found by tests/theme_audit.py (WCAG contrast, Light/Dark, hover). */
/* „Organizator” pill on the hero: the hero rule paints every span white → keep the mint pill's dark text */
:root[data-theme] main.hv3 .md-hero .hv3-pill-org, :root[data-theme] main.hv3 .md-hero .hv3-pill-org * { color: var(--mint-ink) !important; }
/* „Editează meciul” is a white chip in both themes → fixed dark text (in Dark, --ink is light) */
:root[data-theme] main.hv3 .hv3-hact a.hv3-edit, :root[data-theme] main.hv3 .hv3-hact a.hv3-edit * { color: var(--j-ink) !important; }
/* organiser tick icon in the players list: gold dot under 3:1 on white → the text tone */
main.hv3 .hv3-pp.host small svg { color: var(--pend) !important; }
/* Dark hover: the generic v2.8 hover must not repaint the mint buttons of the layer */
:root[data-theme="dark"] body.experience main.hv3 .hv3-mint:hover, :root[data-theme="dark"] .hv3-overlay .hv3-mint:hover { background: var(--mint) !important; border-color: var(--mint) !important; color: var(--mint-ink) !important; filter: brightness(.95); }
:root[data-theme] body.experience main.hv3 .hv3-mint *, :root[data-theme] .hv3-overlay .hv3-mint * { color: inherit !important; }
/* the layer's own span rule is more specific than the chip rule above → pin the span by id */
:root[data-theme] body.experience main.hv3 .hv3-hact a#pgEditLink.hv3-edit span { color: var(--j-ink) !important; }
/* organiser avatar sits on a fixed light gold disc in both themes → fixed dark initials */
:root[data-theme] body.experience main.hv3 :is(.hv3-pp.host, .md-host-avatar) .hv3-av { color: var(--j-ink) !important; }
:root[data-theme] body.experience main.hv3 .hv3-hact a.hv3-edit:hover { background: var(--j-surface) !important; filter: brightness(.94); }

/* 801–1099 px (audit 11.10 + live audit 12.10, 880–900 px): the App sidebar leaves ~590 px for the game page. The hero meta row (date, time,
 * venue, format) ran past the card, the price chip „60 min · 250 lei” overflowed its box and „Anulează meciul” was cut.
 * Same two-column meta grid as on mobile; the price chip and the organiser buttons wrap. */
@media (min-width: 801px) and (max-width: 1099px) {
  /* live audit 12.10: two columns left ~300 px for the main column (ticket price cut, buttons over the text, the players bar
   * out of its card, organiser actions squeezed). One column, as on mobile; app-v34-hub.js puts the booking card under the hero. */
  :root[data-theme] main.hv3 .md-columns { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
  /* the ticket's three columns (title / price / actions) left ~150 px for „25.00 Lei / jucător” and „2 / 12 · 10 locuri
   * disponibile”, under „Alătură-te” and „Invită un prieten”: title and price share a row, the actions take the next one */
  :root[data-theme] main.hv3 .md-main > .md-ticket.hv3-ticket { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) !important; }
  :root[data-theme] main.hv3 .md-ticket.hv3-ticket > .hv3-t3 { grid-column: 1 / -1; }
  :root[data-theme] main.hv3 .hv3-meta { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root[data-theme] main.hv3 .hv3-meta > div { white-space: normal; min-width: 0; padding: 12px 16px !important; border-top: 1px solid rgba(255,255,255,.12); }
  main.hv3 .hv3-meta > div + div { border-left: 0; }
  main.hv3 .hv3-meta > div:nth-child(even) { border-left: 1px solid rgba(255,255,255,.18); }
  main.hv3 .hv3-meta strong { overflow-wrap: anywhere; }
  main.hv3 .hv3-price { flex-wrap: wrap; }
  main.hv3 .hv3-price em { white-space: normal; }
  :root[data-theme] main.hv3 .hv3-oacts > button { white-space: normal !important; }
}


/* 15.10 (fx_src_f2): from 1100 px the 420 px booking column leaves the main column 364–860 px. The ticket kept three fixed-ratio
 * columns (~80–230 px each), so „25.00 Lei / jucător” ran under „Alătură-te meciului” / „Invită un prieten” (1100–1366 px;
 * longer prices up to ~1440 px). The ticket now follows the width of its own column, not the viewport:
 * from 700 px three columns as approved, the price column never narrower than the price; under 700 px title + price with the
 * actions on the next row (as at 801–1099 px); under 480 px one column (as on mobile). */
@media (min-width: 801px) { main.hv3 .md-main { container: hv3-main / inline-size; } }
@container hv3-main (min-width: 700px) {
  :root[data-theme] main.hv3 .md-main > .md-ticket.hv3-ticket { grid-template-columns: minmax(0, 1.05fr) minmax(max-content, 1fr) minmax(0, 1.25fr); }
}
@container hv3-main (max-width: 699px) {
  :root[data-theme] main.hv3 .md-main > .md-ticket.hv3-ticket { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) !important; }
  :root[data-theme] main.hv3 .md-main > .md-ticket.hv3-ticket > .hv3-t3 { grid-column: 1 / -1; }
}
@container hv3-main (max-width: 479px) {
  :root[data-theme] main.hv3 .md-main > .md-ticket.hv3-ticket { grid-template-columns: minmax(0, 1fr) !important; }
}
