/* Linecheck screen layout. Loads after the components and uses only the tokens. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; }
[hidden] { display: none !important; }

button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { user-select: none; -webkit-user-select: none; }
a.lc-row, a.lc-appbar__back { text-decoration: none; color: inherit; }
h1:focus { outline: none; }

.lc-flush { margin: 0; }
.lc-muted { color: var(--ink-muted); }
.lc-grow { flex: 1; min-width: 0; }
.lc-spacer { flex: 1; min-height: var(--space-6); }
.lc-stack { display: flex; flex-direction: column; gap: var(--space-3); }
.lc-visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Only seen if the app's JavaScript never starts, so a phone it can't run on isn't left blank */
.lc-loading { margin: 0; padding: var(--space-4); opacity: 0; animation: lc-reveal 0s linear 3s forwards; }
@keyframes lc-reveal { to { opacity: 1; } }

/* One screen: app bar, a body that fills and scrolls, the main action pinned at the foot */
.lc-screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.lc-screen .lc-appbar {
  position: sticky; top: 0; z-index: 1;
  padding-top: calc(var(--space-1) + env(safe-area-inset-top));
  padding-left: calc(var(--space-2) + env(safe-area-inset-left));
  padding-right: calc(var(--space-2) + env(safe-area-inset-right));
}
.lc-appbar__title, .lc-appbar__sub { margin: 0; font-weight: 400; }
.lc-appbar__titles--flush { padding: var(--space-1) var(--space-2); }

.lc-screen__body {
  flex: 1; display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-4) calc(var(--space-4) + env(safe-area-inset-right)) var(--space-4) calc(var(--space-4) + env(safe-area-inset-left));
}
.lc-screen__foot {
  position: sticky; bottom: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: var(--space-3);
  padding: var(--space-3) calc(var(--space-4) + env(safe-area-inset-right)) calc(var(--space-3) + env(safe-area-inset-bottom)) calc(var(--space-4) + env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--border);
}
.lc-screen__foot .lc-btn { min-height: 56px; }

.lc-label { margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--ink-muted); }

/* Beer names wrap and are never cut off: the cut-off part is usually the size */
.lc-beer, .lc-line__name, .lc-row__name, .lc-appbar__title { overflow-wrap: anywhere; }
.lc-btn { max-width: 100%; }

.lc-callout > .lc-icon { flex: none; }
.lc-callout > div { min-width: 0; }

/* A lone quiet button lines up with the text above it */
.lc-callout__actions > .lc-btn[hidden] + .lc-btn--ghost { margin-left: calc(var(--space-6) * -1); }

/* Counter: keeps its spec size on every phone */
.lc-counter .lc-step { flex: none; }
.lc-count { flex: 1; font-variant-numeric: tabular-nums; }

/* Space-6 from the controls, so the reassurance never reads as part of the counter */
.lc-screen__body--thumb > .lc-status[role="status"] { margin-top: var(--space-2); }

/* Not here is a toggle, but never a second amber action */
.lc-not-here .lc-icon { display: none; font-size: 20px; }
.lc-not-here[aria-pressed="true"] { background: var(--surface-raised); border-color: var(--border-strong); }
.lc-not-here[aria-pressed="true"] .lc-icon { display: inline-block; }

/* Choice rows hold their shape when the check appears */
.lc-choices--five, .lc-choices--four { display: grid; gap: var(--space-1); }
.lc-choices--five { grid-template-columns: minmax(72px, 1.4fr) repeat(3, minmax(48px, 1fr)) minmax(54px, 1.1fr); }
.lc-choices--four { grid-template-columns: minmax(72px, 1.4fr) repeat(3, minmax(48px, 1fr)); }
.lc-choices--five .lc-choice, .lc-choices--four .lc-choice { min-width: 0; padding: 0 2px; gap: 2px; }
.lc-choices--five .lc-choice .lc-icon, .lc-choices--four .lc-choice .lc-icon { font-size: 18px; }
@media (max-width: 340px) {
  .lc-choices--five .lc-choice, .lc-choices--four .lc-choice { gap: 0; }
  .lc-choices--five .lc-choice .lc-icon, .lc-choices--four .lc-choice .lc-icon { font-size: 16px; }
}

/* Line location */
.lc-lines { display: flex; flex-direction: column; }
.lc-line { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); scroll-margin: 72px 0 96px; }
.lc-line:first-child { padding-top: 0; }
.lc-line:last-child { border-bottom: 0; }
.lc-line__name { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; }
.lc-line__unset { margin: calc(var(--space-2) * -1) 0 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* Walk */
.lc-walk { margin: 0; padding: 0; list-style: none; }
.lc-row--static { cursor: default; }
.lc-walk__number {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); font-size: 14px; line-height: 20px;
}

.lc-row__value { flex: none; }
