/* THE HEADER, THE KIT'S (ui/SiteHead.astro; Maayan, 2026-11-08: "Logo is too small. no bottom separator line and no bottom
   padding. buttons on header - same position, size and header has the same padding"): sticky at the top at every width;
   one height, padding and button size in every state; a line and room under it; its row the page's column (the lobby's
   Tables screen on a wide screen: across it, the logo in the middle: lobby.css). Tokens only, square, nothing moves. */
.g-sitehead { position: sticky; top: 0; z-index: var(--g-z-head); padding: var(--g-3) var(--g-4); background: var(--g-bg); border-bottom: var(--g-hair) solid var(--g-separator); }
.g-sitehead__in { position: relative; display: flex; align-items: center; gap: var(--g-3); max-width: var(--g-page); min-height: var(--g-touch); margin-inline: auto; }
.g-sitehead__start { display: flex; align-items: center; gap: var(--g-2); min-width: 0; }
.g-sitehead__end { display: flex; align-items: center; gap: var(--g-3); margin-inline-start: auto; }
.g-sitehead { --head-dir: 1; } :root[dir="rtl"] .g-sitehead { --head-dir: -1; }
/* the logo at the row's start, or (--g-head-wide: the lobby's Tables screen, a wide screen; SiteHead.astro wideWhen) in its
   middle, the row then the whole width */
.g-sitehead__in { max-width: calc(var(--g-page) + var(--g-head-wide, 0) * 100vw); }
.g-sitehead__logo { position: absolute; inset-block-start: 50%; inset-inline-start: calc(var(--g-head-wide, 0) * 50%); translate: calc(var(--g-head-wide, 0) * -50% * var(--head-dir)) -50%; display: block; }
.g-sitehead__logo img { display: block; height: var(--g-logo-head); width: auto; }
/* every button in it one size, the one Save too */
.g-sitehead :is(.g-btn, .gadd) { min-height: var(--g-touch); margin: 0; padding: 0 var(--g-4); font-size: var(--g-t); white-space: nowrap; }
/* a page's own action at the start (SiteHead slot "start": the dice page's Save in GrowlMaster; the miniature generator's
   Back, there only while a saved growl is edited, [hidden] else): the logo in the middle; on a narrow screen, where the
   row holds only the action, the language and Log in, the action takes the logo's place. A start whose every part is
   hidden holds nothing (a script Astro leaves beside it in dev is nothing): not there, the header as without one */
.g-sitehead__start:not(:has(> :not([hidden], script))) { display: none; }
.g-sitehead__start:has(> :not([hidden], script)) ~ .g-sitehead__logo { inset-inline-start: 50%; translate: calc(-50% * var(--head-dir)) -50%; }
@media (max-width: 899px) { .g-sitehead__start:has(> :not([hidden], script)) ~ .g-sitehead__logo { display: none; } }
/* A WIDE SCREEN: THE HEADER ON TOP OF EVERYTHING (LobbyFrame.astro; Maayan, 2026-11-15: "header is coast to coast. header
   logo is always in the center ... far left - a left panel icon. tapping on it minimize the left panel into icons only
   with a nice ease-in-out transition back and forth"): across the panel and the page, its logo in the middle; the panel
   under it; its button folds the panel to its icons (:root[data-gm-rail], remembered on this device; LobbyFrame.astro) and back, the page
   beside it following. A phone untouched: no button, the header as it was. */
.g-iconbtn.g-sitehead__rail { display: none; }   /* a phone: no side panel, no button for it (Maayan, 2026-11-16: "on mobile remove icon for left drawer in header") */
@media (min-width: 900px) {
  .gm2-frame > .g-sitehead { --g-head-wide: 1; padding-inline-start: var(--g-3); }
  .g-iconbtn.g-sitehead__rail { display: inline-grid; place-items: center; }
  .g-sitehead__rail svg { transition: scale var(--g-mid) var(--g-ease-in-out); }
  :root[data-gm-rail="icons"] .g-sitehead__rail svg { scale: calc(-1 * var(--head-dir)) 1; }
}
