/* Roost "Classic" base styles: dark slate board, warm gold display type (Oswald), Barlow Semi Condensed body.
   Theme values (accent etc.) are set as CSS variables by js/theme.js from /api/s/:shop/shop. The values below are the Classic defaults.
   Fonts are OFL, see /fonts/OFL-LICENSE.txt. */

@font-face { font-family: "Oswald"; src: url("/fonts/oswald-latin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: optional; }
@font-face { font-family: "Oswald"; src: url("/fonts/oswald-latin-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: optional; }
@font-face { font-family: "Oswald"; src: url("/fonts/oswald-latin-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: optional; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-latin-500.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: optional; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-latin-600.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: optional; }

:root {
  --bg: #1c2230;
  --panel: #232a3a;
  --panel-2: #2b3347;
  --rule: #3a4256;
  --cream: #f2e9d8;
  --muted: #b9b2a3;
  --accent: #d4a24c;          /* shop accent: fills, stripes, rings */
  --accent-display: #d4a24c;  /* accent for large display text (>= 3:1 on the board), else cream */
  --accent-text: #d4a24c;     /* accent for normal text (>= 4.5:1), else cream */
  --on-accent: #1c2230;       /* text on an accent fill */
  --pole-navy: #2b3a67;
  --ok: #5fbf7f;
  --busy: #e0913a;
  --off: #8a8f9c;
  --off-text: #a3a8b5;
  --danger: #ff9c8f;
  --field-border: #8b93a8;
  --focus: #f2e9d8;
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --radius: 12px;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--cream);
  font: 500 1.0625rem/1.45 var(--font-body);
  display: flex; flex-direction: column;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 var(--s3); letter-spacing: .04em; text-transform: uppercase; }
h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); color: var(--accent-display); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 var(--s3); }
a { color: var(--accent-text); text-underline-offset: .2em; }
a:hover { color: var(--cream); }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--muted); }
.display { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* Barber-pole strip along the top of every non-TV page */
.pole { height: 8px; flex: none; background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, var(--cream) 10px 20px, var(--pole-navy) 20px 30px); }

/* Layout */
.skip { position: absolute; left: var(--s3); top: -4rem; background: var(--accent); color: var(--on-accent); padding: var(--s2) var(--s4); border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: var(--s3); }
.site-header { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s4) var(--s3); max-width: 40rem; width: 100%; margin: 0 auto; }
.site-header .brand { display: flex; align-items: center; gap: var(--s3); color: var(--cream); text-decoration: none; min-height: 2.75rem; }
.brand-name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: 1.25rem; line-height: 1.1; }
.logo-plate { background: var(--cream); border-radius: 8px; padding: 4px 8px; display: inline-flex; align-items: center; }
.logo-plate img { height: 2.5rem; width: auto; max-width: 5rem; object-fit: contain; }
.site-header nav a { font-size: 1rem; display: inline-block; padding: .6rem 0; }
main { flex: 1; width: 100%; max-width: 40rem; margin: 0 auto; padding: var(--s3) var(--s4) var(--s6); }
.site-footer { padding: var(--s5) var(--s4); text-align: center; color: var(--muted); font-size: .9375rem; border-top: 1px solid var(--rule); }

/* Cards, buttons, chips */
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s5); margin-bottom: var(--s4); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 3rem; padding: .6rem 1.4rem; border-radius: 8px;
  border: 1px solid var(--field-border); background: transparent; color: var(--cream);
  font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--cream); color: var(--cream); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--cream); border-color: var(--cream); color: var(--bg); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--bg); border-color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.btn-row > .btn { flex: 1 1 10rem; }
.chip { display: inline-flex; align-items: center; gap: var(--s2); padding: .15rem .7rem; border-radius: 99px; border: 1px solid var(--field-border); font-size: .9375rem; font-weight: 600; color: var(--cream); }
.chip-accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip-ok { border-color: var(--ok); color: var(--ok); }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Forms */
.field { margin-bottom: var(--s4); }
.field label, .field .label, legend { display: block; font-weight: 700; margin-bottom: var(--s2); font-size: 1rem; }
.field .hint { color: var(--muted); font-size: .9375rem; margin: var(--s1) 0 0; }
.field .err { color: var(--danger); font-size: 1rem; margin: var(--s1) 0 0; }
.field .err:empty { display: none; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; min-height: 3rem; padding: .6rem .9rem; background: var(--bg); color: var(--cream);
  border: 1px solid var(--field-border); border-radius: 8px;
}
input[aria-invalid="true"] { border-color: var(--danger); }
input::placeholder { color: #9aa1b4; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2E9D8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.25rem; padding-right: 2.6rem; }
input[type="color"] { width: 4rem; height: 3rem; padding: 2px; background: var(--bg); border: 1px solid var(--field-border); border-radius: 8px; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); }
.check { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s2) 0; cursor: pointer; min-height: 2.75rem; }
.check input { width: 1.5rem; height: 1.5rem; margin: .1rem 0 0; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { border: 1px solid var(--danger); color: var(--danger); border-radius: 10px; padding: var(--s3) var(--s4); margin-bottom: var(--s4); }
.notice { border: 1px solid var(--rule); background: var(--panel-2); border-radius: 10px; padding: var(--s3) var(--s4); margin-bottom: var(--s4); }
.notice-gold { border-color: var(--accent); }

/* Avatars: photo or initials on a tint; ring colour follows state */
.avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--panel-2); color: var(--cream); display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 600; flex: none; overflow: hidden; border: 3px solid var(--rule); letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-lg { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; }
.avatar[data-state="free"] { border-color: var(--ok); }
.avatar[data-state="busy"], .avatar[data-state="called"] { border-color: var(--busy); }
.avatar[data-state="break"] { border-color: var(--muted); }
.avatar[data-state="off"] { border-color: var(--off); }

/* Choice lists */
.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: 100%; text-align: left;
  min-height: 3.75rem; padding: .7rem 1rem; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer; color: var(--cream);
}
.choice:hover { border-color: var(--field-border); }
.choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice .name { font-weight: 700; display: block; font-size: 1.125rem; }
.choice .sub { color: var(--muted); font-size: .9375rem; display: block; }
.choice .price { font-family: var(--font-display); font-size: 1.25rem; white-space: nowrap; letter-spacing: .03em; }
.choice .who { display: flex; align-items: center; gap: var(--s3); }

/* Day strip and time grid (booking pages) */
.days { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s1) var(--s1) var(--s3); margin: 0 calc(var(--s1) * -1); scroll-snap-type: x proximity; }
.day { flex: 0 0 4.25rem; min-height: 4.75rem; scroll-snap-align: start; display: grid; place-content: center; gap: 2px; text-align: center; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; cursor: pointer; padding: var(--s2); color: var(--cream); }
.day .dow { font-size: .875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day .dom { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.day .mon { font-size: .8125rem; color: var(--muted); min-height: 1em; }
.day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day[aria-pressed="true"] .dow, .day[aria-pressed="true"] .mon { color: var(--on-accent); }
.day[disabled] { opacity: .65; background: transparent; border-style: dashed; cursor: not-allowed; }
.day[disabled] .dom { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr)); gap: var(--s2); }
.time { min-height: 3rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; cursor: pointer; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cream); }
.time:hover { border-color: var(--field-border); }
.time[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Progress / steps */
.steps { display: flex; gap: var(--s2); list-style: none; padding: 0; margin: 0 0 var(--s5); }
.steps li { flex: 1; height: 4px; border-radius: 2px; background: var(--rule); }
.steps li[data-state="done"] { background: var(--muted); }
.steps li[aria-current="step"] { background: var(--accent); }
.back { background: none; border: 0; color: var(--muted); padding: var(--s2) 0; min-height: 2.75rem; display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; }
.back:hover { color: var(--cream); }
.summary { display: grid; gap: var(--s3); margin: 0 0 var(--s5); }
.summary div { display: flex; justify-content: space-between; gap: var(--s4); border-bottom: 1px solid var(--rule); padding-bottom: var(--s3); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 700; }
.ref { font-family: var(--font-display); font-size: 2.5rem; letter-spacing: .12em; color: var(--accent-display); margin: var(--s2) 0 var(--s4); }

/* Toast */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--toast-offset, 0px) + var(--s4)); display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: 0 var(--s4); z-index: 60; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s4); background: var(--cream); color: var(--bg); border-radius: 12px; padding: .5rem .5rem .5rem 1.1rem; max-width: 30rem; width: 100%; box-shadow: 0 8px 30px rgb(0 0 0 / .5); }
.toast span { flex: 1; font-weight: 700; }
.toast .btn { min-height: 3rem; background: var(--bg); color: var(--cream); border-color: var(--bg); }
.toast .btn:hover { background: var(--panel); color: var(--cream); }

.mock-pill { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; text-decoration: none; letter-spacing: .04em; }

.spinner { width: 1.5rem; height: 1.5rem; border: 3px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

[tabindex="-1"]:focus { outline: none; }
.card a, .notice a { overflow-wrap: anywhere; }
.addr::before { content: " \00b7  "; }
code { background: var(--panel-2); padding: .1rem .4rem; border-radius: 6px; font-size: .9em; word-break: break-all; }

/* Static pages */
.lead { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: 1.5rem; margin-bottom: var(--s4); }
.points { padding-left: 1.25rem; margin: 0 0 var(--s4); }
.points li, .steps-list li { margin-bottom: var(--s3); }
.steps-list { padding-left: 1.5rem; margin: 0 0 var(--s5); }
main h2 { margin-top: var(--s6); color: var(--accent-display); }
.brand img { height: 2.5rem; width: 2.5rem; }
.addr-line { min-height: 1.5rem; }
