/* Hallmark · shape: app screen · genre: editorial · theme: Garden (by request: sibling of the accommodation template)
 * nav: top bar, property name or switcher, Bookings and Calendar, sign out · signature: the request queue, each held request with the hours left to answer and a one-tap confirm · states: empty, error, flash, full (server-rendered: no loading state; each page arrives whole)
 * axes: light/roman-serif/chromatic-green · posture: committed · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S3 R4 V4 · weakest: S, a tool with four screens; kept one container, one button recipe and tables before cards so owners learn it once */
/* Hallmark · waive 38iii · .count holds a number in a pill, no word in the head is coloured · it is the queue's count, the screen's one state marker */
/* Hallmark · waive 72 · details.devnote renders only when FUNCTIONS_EMULATOR is true · a closed dev-only note measured with its hidden body; production never draws it */
/* Hallmark · dismissed F19 · the fourth weight (700) is the <b> inside the dev-only decision note */
/* Hallmark · answered F4 · each queue row's Confirm is the row's action, outlined in the accent; the one filled primary per page is the form's own submit (sign in, block nights) */
@import url("./tokens.css");
@import url("./base.css");

:root { --bar-h: 60px; --ctl-h: 40px; --color-field: oklch(99% 0.008 90); }
body { font-size: var(--text-md); }

/* the shell */
.bar { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-paper-2); border-bottom: var(--rule-hair) solid var(--color-rule); }
.bar__in { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); min-height: var(--bar-h); display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.bar__name { font: var(--display-weight) var(--text-lg)/1.1 var(--font-display); }
.bar__nav { display: flex; gap: var(--space-2xs); margin-inline-start: auto; }
.bar__nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-sm); border-radius: var(--radius-card); text-decoration: none; color: var(--color-ink-2); }
.bar__nav a:hover { background: var(--color-paper-3); color: var(--color-ink); }
.bar__nav a[aria-current="page"] { background: var(--tint-moss); color: var(--color-ink); }
.switch { min-width: 0; }
.switch select { font: var(--display-weight) var(--text-lg)/1.1 var(--font-display); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-card); padding-inline-start: var(--space-xs); background: var(--color-field); color: var(--color-ink); min-height: 44px; padding-inline-end: var(--space-sm); cursor: pointer; max-width: 70vw; }
.wrap { max-width: var(--container); margin-inline: auto; padding: var(--space-xl) var(--gutter) var(--space-3xl); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }

/* type: a fixed app scale */
.wrap h1 { font-size: var(--text-2xl); max-width: none; }
.wrap h2 { font: 600 var(--text-lg)/1.3 var(--font-body); letter-spacing: 0; max-width: none; display: flex; align-items: center; gap: var(--space-xs); }
.wrap section { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
.count { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 0.4em; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.sub { display: block; font-size: var(--text-sm); color: var(--color-muted); }
.lead { font-size: var(--text-md); color: var(--color-ink-2); }

/* messages */
.flash, .error, .note, .empty { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-card); max-width: 70ch; }
.flash { background: var(--tint-moss); }
.error { background: var(--tint-clay); color: var(--color-ink); border: var(--rule-hair) solid var(--color-error); }
.note { background: var(--color-paper-2); color: var(--color-ink-2); font-size: var(--text-sm); }
.empty { border: var(--rule-hair) dashed var(--color-rule-2); color: var(--color-ink-2); }

/* controls: one recipe, 40px tall, 44px hit */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--ctl-h); padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font: 500 var(--text-sm)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; position: relative; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.btn::after { content: ""; position: absolute; inset: -2px; }
.btn:hover { background: var(--color-paper-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--go { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--go:hover { background: color-mix(in oklab, var(--color-accent) 88%, var(--color-ink)); }
.btn--accent { border-color: var(--color-accent); color: var(--color-accent); font-weight: 600; }
.btn--accent:hover { background: var(--tint-moss); }
.btn--danger { border-color: var(--color-error); color: var(--color-error); }
.btn--danger:hover { background: var(--tint-clay); }
.btn--quiet { border-color: transparent; color: var(--color-ink-2); }
.btn--quiet:hover { background: var(--color-paper-3); color: var(--color-ink); }
label { display: grid; gap: var(--space-3xs); font-size: var(--text-sm); color: var(--color-ink-2); }
input, select, textarea { min-height: var(--ctl-h); padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-card); background: var(--color-field); color: var(--color-ink); font-size: max(16px, var(--text-md)); outline: 2px solid transparent; outline-offset: -3px; }
textarea { padding-block: var(--space-xs); min-height: 4.5em; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: var(--color-focus); }

/* the queue: horizontal rules only, full width */
.tablewrap { width: 100%; }
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: start; font-weight: 500; font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.list td { padding: var(--space-sm) var(--space-sm) var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); vertical-align: top; }
.who { display: grid; gap: var(--space-3xs); }
.who__name { font-weight: 600; }
.who__links { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); font-size: var(--text-sm); }
.who__links a { color: var(--color-ink-2); }
.who__links a:hover { color: var(--color-accent); }
.who__note { font-size: var(--text-sm); color: var(--color-ink-2); max-width: 40ch; }
.due { font-weight: 600; }
.due--soon { color: var(--color-error); }
.acts { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: flex-start; }
.act { display: grid; gap: var(--space-xs); justify-items: start; }
.more > summary { list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] { display: grid; gap: var(--space-xs); padding: var(--space-sm); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-paper-2); }
.more[open] > summary { justify-self: start; }

/* sign in: a one-field form, 20rem */
.signin { display: grid; gap: var(--space-md); max-width: 28rem; margin-block-start: var(--space-xl); }
.one { display: grid; gap: var(--space-sm); max-width: 20rem; }
.one .btn { justify-self: start; }

/* calendar */
.calhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-md); }
.inline { display: flex; gap: var(--space-xs); align-items: flex-end; }
.month { display: flex; align-items: center; gap: var(--space-xs); }
.month h2 { min-width: 10ch; justify-content: center; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2xs); }
.dow { font-size: var(--text-sm); color: var(--color-muted); padding: 0 var(--space-2xs); }
.day { min-height: 4.5rem; padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-card); background: var(--color-field); border: var(--rule-hair) solid var(--color-rule); display: grid; align-content: space-between; gap: var(--space-3xs); }
.day__n { font-variant-numeric: tabular-nums; font-weight: 600; }
.day__s { font-size: var(--text-xs); color: var(--color-ink-2); line-height: 1.25; }
.day--past { background: transparent; border-color: transparent; color: var(--color-muted); }
.day--part { background: var(--tint-moss); }
.day--full { background: var(--color-accent-2); border-color: var(--color-accent-2); }
.day--blocked { background: var(--color-paper-3); border-style: dashed; border-color: var(--color-rule-2); }
.blockform { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--space-sm); align-items: end; max-width: 60rem; }
.blockform .wide { grid-column: 1 / -1; }
.blockform .btn { justify-self: start; }

/* dev-only decision note: rendered only under the emulator */
.devnote { padding: var(--space-sm) var(--space-md); border: 1px dashed var(--color-muted); border-radius: var(--radius-card); font-size: var(--text-sm); color: var(--color-ink-2); display: grid; gap: var(--space-xs); max-width: 70ch; }
.devnote summary { cursor: pointer; font-weight: 600; }

/* phone: each row restacks as a labelled block; guest and actions stay in view */
@media (max-width: 48rem) {
  .bar__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--space-sm); padding-block: var(--space-2xs); }
  .switch select, .bar__name { max-width: 100%; width: 100%; font-size: var(--text-md); }
  .bar__nav { grid-column: 1 / -1; grid-row: 2; margin-inline-start: 0; }
  .bar__in > form[action="/logout"] { grid-column: 2; grid-row: 1; }
  .day__s { overflow-wrap: anywhere; }
  .list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .list, .list tbody, .list tr, .list td { display: block; }
  .list tr { padding: var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule-2); display: grid; gap: var(--space-xs); }
  .list td { border: 0; padding: 0; }
  .list td[data-label]:not([data-label=""]):not([data-label="Guest"])::before { content: attr(data-label); display: block; font-size: var(--text-xs); color: var(--color-muted); }
  .day { min-height: 3.5rem; padding: var(--space-3xs); }
  .day__s { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }
