/* The picker on cafeunbound.com: everything outside the map takes the website's tokens and fonts (DM Sans, set bold
   for reading); the map itself (floor render, table discs, the corner sheet with its floor buttons and key) keeps its paper look. */
.utp {
  --display: var(--sans); --body: var(--sans);
  background: transparent; color: var(--text); font-weight: 500; padding-left: 0; padding-right: 0;
  font-size: 1rem;
}
/* The picker sets its text in px; in rem it grows with a guest's larger default text size, like the rest of the site. */
.utp-label { font-size: .75rem; }
.utp-tab-count, .utp-legend { font-size: .875rem; }
.utp-go { font-size: 1rem; }
.utp-card-note { font-size: .8125rem; }
.utp-card-top .utp-card-title { font-size: 1.375rem; }
.utp-card-top .utp-card-meta, .utp.utp-picked .utp-card-meta, .utp.utp-picked .utp-card-note { font-size: .8125rem; }
@media (max-width: 699px) { .utp.utp-picked .utp-card-when { font-size: .875rem; } }
.utp-title { font: 700 clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem)/1.1 var(--sans); letter-spacing: -0.01em; color: var(--text); }
.utp-sub { font: 700 .75rem/1.35 var(--sans); letter-spacing: var(--track-label); color: var(--text-soft); }
.utp-controls, .utp-card, .utp-error { background: var(--field); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: none; }
.utp-label { font-weight: 700; letter-spacing: var(--track-label); color: var(--text-soft); }
.utp-select { border: 1px solid var(--field-border); border-radius: var(--radius); background-color: var(--field); color: var(--text); font-weight: 700; }
.utp-card-title { font: 700 1.5rem/1.15 var(--sans); color: var(--text); }
.utp-card-text { font-weight: 500; }
.utp-card-meta, .utp-card-note { color: var(--text-soft); font-weight: 500; }
.utp-card-when { font-weight: 700; }
.utp-go { background: var(--fill); color: var(--on-fill); border-radius: var(--radius); box-shadow: none; font: 700 .875rem/1 var(--sans); text-transform: uppercase; letter-spacing: var(--track-control); }
.utp-clear { border: 1px solid var(--text); border-radius: var(--radius); color: var(--text); font: 700 .875rem/1 var(--sans); text-transform: uppercase; letter-spacing: var(--track-control); }
.utp-status { color: var(--text); }
/* on the map: bolder key and floor counts so the small type reads */
.utp-key { font-weight: 700; }
.utp-tab-count { font-weight: 500; }

/* Reserve page: the map is the hero and the whole booking. A short title, then guests, date and time, the map, and
   once a table is tapped, Confirm on WhatsApp or Switch table. The page's form shows only if the map cannot load. */
/* the page names itself small beside the logo (build.py: "label"); its heading band is only read out, so the tabs
   and the map start right under the header */
.page-reserve .page-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
.page-reserve .reserve-book { padding-top: 12px; }
.reserve-book .utp { max-width: none; padding: 0; }
/* The four details as one slim bar of tabs, Name | Guests | Date | Time: a tiny label over each value, hairlines
   between. Each tab is a <label>, so the whole 48px cell is the tap target; the fields inside are bare. */
.reserve-book .utp-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .62fr) minmax(0, 1.22fr) minmax(0, 1.04fr);
  gap: 0; padding: 0; background: var(--field); border: 1px solid var(--field-border); border-radius: var(--radius); }
.reserve-book .utp-controls .utp-field { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; min-height: 48px; padding: 4px 4px 4px 8px; cursor: pointer; }
.reserve-book .utp-controls .utp-field + .utp-field { border-left: 1px solid var(--rule); }
.reserve-book .utp-controls .utp-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap;
  font: 700 .625rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-soft); overflow: hidden; }
.reserve-book .utp-controls :is(.utp-select, .utp-input) { width: 100%; min-width: 0; min-height: 0; height: 1.375em; margin: 0; padding: 0 12px 0 0;
  border: 0; border-radius: 0; background-color: transparent; background-position: right 0 center; background-size: 9px 6px;
  font: 700 1rem/1.375 var(--sans); color: var(--text); text-overflow: ellipsis; }   /* 16px: an iPhone zooms into any field set smaller */
.reserve-book .utp-controls .utp-input { padding-right: 0; }
/* the whole tab opens the list, not only the value's line: a tap on a <label> only focuses a select, and Android then
   waits for a second tap, so each select reaches under its label to the cell's edges (adapt, 3 Nov 2026). The label
   line is .75rem (.625rem at 1.2), then the 2px gap, the 1.375rem value line and the cell's 4px padding all round. */
.reserve-book .utp-controls .utp-select { width: auto; height: calc(2.125rem + 10px); margin: calc(-6px - .75rem) -4px -4px -8px;
  padding: calc(6px + .75rem) 16px 4px 8px; background-position: right 4px bottom 12px; }
.reserve-book .utp-controls .utp-input::placeholder { color: var(--text-soft); font-weight: 500; opacity: 1; }
.reserve-book .utp-controls :is(.utp-select, .utp-input):focus { outline: none; }
.reserve-book .utp-controls .utp-field:focus-within { box-shadow: inset 0 -2px 0 var(--text); }
.reserve-book .utp-controls .utp-field.is-invalid { box-shadow: inset 0 -2px 0 var(--error); }
.reserve-book .utp-controls .utp-field.is-invalid .utp-label { color: var(--error); }
/* two by two when a label or value would be cut short (large text, a small phone): the picker measures and sets it */
.reserve-book .utp-controls.is-stacked { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.reserve-book .utp-controls.is-stacked .utp-field:nth-child(3) { border-left: 0; }
.reserve-book .utp-controls.is-stacked .utp-field:nth-child(n+3) { border-top: 1px solid var(--rule); }
/* details first (owner, 4 Nov 2026): a card in the middle of the dimmed map asks for the four details, one under the
   other, then Choose your table moves them up into the slim bar above the map, ringed for a moment. */
.utp-ask { position: absolute; inset: 0; z-index: 7; display: flex; padding: 12px; overflow: auto; overscroll-behavior: contain;
  border-radius: var(--radius); background: color-mix(in srgb, var(--field) 45%, transparent); }
.utp-ask[hidden] { display: none; }
.utp-ask-box { width: min(100%, 22rem); margin: auto; padding: 18px 16px 16px; background: var(--field); border: 1px solid var(--field-border);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(41, 38, 34, .25); }
.utp-ask-title { margin: 0; font: 700 1.375rem/1.15 var(--sans); color: var(--text); }
.utp-ask-sub { margin: 4px 0 14px; color: var(--text-soft); font-weight: 500; font-size: .9375rem; }
.reserve-book .utp-ask .utp-controls { grid-template-columns: minmax(0, 1fr); }
.reserve-book .utp-ask .utp-controls .utp-field + .utp-field { border-left: 0; border-top: 1px solid var(--rule); }
.utp-ask-actions { display: grid; gap: 10px; margin-top: 14px; }
.utp-ask-go { width: 100%; min-height: 48px; margin: 0; }
.utp-ask .utp-any { position: static; transform: none; justify-content: center; box-shadow: none; background: transparent; }
.reserve-book .utp-controls.is-new { box-shadow: 0 0 0 3px var(--saffron); }
/* while the card asks, the bar under the map holds only messages: no empty box when there is none, and on a phone,
   where the message floats above Call / Directions, no box at all */
.utp-card:has(> .utp-status:only-child:empty) { display: none; }
@media (max-width: 699px) { .utp-locked .utp-card { padding: 0; border: 0; background: none; } }
/* each detail still to give, once Choose was pressed without it: tinted saffron and underlined */
.utp-locked .utp-field.is-missing { background: color-mix(in srgb, var(--saffron) 16%, var(--field)); box-shadow: inset 0 -3px 0 var(--saffron); }
.utp-locked .utp-field.is-missing .utp-label { color: var(--text); }
/* behind the card the tables say nothing yet: plain markers, no fits or won't-fit */
.utp-token[data-state="idle"] { background: var(--field); color: var(--text); }
/* "Any table is fine": over the garden at the foot of the map, where no table sits on either floor */
.utp-any { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 18px; white-space: nowrap; text-decoration: none; background: var(--field); box-shadow: 0 4px 14px rgba(60, 40, 20, .28); }
.utp-any[hidden] { display: none; }
/* the map's messages sit in the table bar, so a phone shows them where the guest is looking */
.utp-card .utp-status { margin: 0; font-weight: 700; color: var(--text); }
.utp-card .utp-status:empty { display: none; }
@media (max-width: 699px) {   /* with no table picked the bar is under the map: a message floats above Call / Directions, then fades */
  .utp:not(.utp-picked) .utp-card .utp-status:not(:empty) { position: fixed; left: 8px; right: 8px; bottom: calc(var(--dock-h, 0px) + 8px); z-index: 15;
    padding: 10px 12px; background: var(--field); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 -4px 14px rgba(60, 40, 20, .2);
    animation: utp-note 7s forwards; pointer-events: none; }   /* only words: a tap goes through to the map */
}
@keyframes utp-note { 0%, 85% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .utp-card .utp-status { animation-duration: 7s; animation-timing-function: steps(1, end); } }
/* while the map loads: a short line, not the old form (which shows only if the map cannot load) */
.utp-loading { min-height: 50vh; margin: 0; padding: 32px 16px; color: var(--text-soft); }
html:not(.js) .utp-loading { display: none; }
/* what sits below the map waits hidden while it loads: the map comes in taller than the loading line, and words
   moving on screen are a layout shift (CLS). If the map never comes, the form shows, and so does the rest. */
.js body:has(.utp-loading):has(#r-form[data-waiting]) :is(.reserve-note, .reserve-more, .site-foot) { visibility: hidden; }
.js [data-waiting] { display: none; }
/* the page title already says it: the picker's own heading is only read out */
.utp-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reserve-note { margin-top: 22px; max-width: 46rem; color: var(--text-soft); font-size: .9375rem; }
.reserve-note a { color: var(--text); }
.reserve-book .form + .reserve-note { margin-top: 18px; }
@media (min-width: 1100px) {
  /* the map on the left, as big as the first screen allows; on the right, the choices and the pick (the picker's grid) */
  .reserve-book .utp-body { grid-template-columns: minmax(0, 1fr) 400px; }   /* room for the four tabs in one row */
}
.reserve-more .aside-card { border-top: 1px solid var(--rule); }
@media (min-width: 961px) {
  .reserve-more .aside-card { grid-template-columns: 1.2fr 1fr 1fr; gap: var(--gutter); align-items: start; }
}
@media (max-width: 699px) {
  .page-reserve .reserve-book { padding-top: 8px; }
  .reserve-book > .wrap { padding-inline: 0; }
  .utp { padding-top: 0; }
  .utp-controls, .utp-card, .utp-status { margin-inline: 8px; }
  /* the map runs edge to edge; text and the fallback form keep the page's gutter */
  .reserve-book .form, .reserve-note, .reserve-book .utp-error { margin-inline: max(var(--gutter), env(safe-area-inset-left)); }
  /* the picked table's bar sits just above the Call / Directions bar */
  .utp.utp-picked .utp-card { bottom: var(--dock-h, 0px); }
  /* the bar floats over the page, so the page's end keeps clear of it (the picker sets --utp-card-h) */
  body:has(.utp-picked) .site-foot { padding-bottom: calc(var(--dock-h, calc(64px + env(safe-area-inset-bottom))) + var(--utp-card-h, 0px) + 46px); }
}

/* On the map: only the diorama render keeps its paper look. The sheet it stands on, the floor buttons, the zoom
   button, the key and the table markers are the website's: field colour, onyx fill, hairlines, square corners. */
.utp-mapwrap { border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: none; }
.utp-mapwrap, .utp-mapwrap[data-floor="up"] { --sheet: var(--field); }
.utp-viewport { border-radius: var(--radius); }
.utp-corner { filter: none; }
.utp-tab, .utp-corner .utp-tab { border: 1px solid var(--text); border-radius: var(--radius); background: var(--field); color: var(--text); box-shadow: none;
  font-weight: 700; text-transform: uppercase; letter-spacing: var(--track-label); }
.utp-tab[aria-selected="true"], .utp-corner .utp-tab[aria-selected="true"] { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.utp-tab-count { text-transform: none; letter-spacing: 0; }
.utp-zoom { background: var(--field); border: 1px solid var(--text); border-radius: var(--radius); box-shadow: none; color: var(--text);
  font-weight: 700; text-transform: uppercase; letter-spacing: var(--track-control); }
.utp-zoom.is-icon { background-color: var(--fill); border-color: var(--fill); border-radius: var(--radius); box-shadow: none; }
.utp-key { color: var(--text); }
.utp-swatch { box-shadow: none; }
/* table markers, made to stand out on the diorama: saffron (the website's accent) with a thick onyx edge and a white
   halo where a table fits, so they read on the cream floor and the green tables alike; solid onyx with a saffron
   ring once picked; small, faint and dashed where it won't fit */
.utp-token { border: 3px solid var(--fill); font: 700 calc(var(--tk, 44px) * var(--tkf, .4))/1 var(--sans);
  box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(41, 38, 34, .45), 0 6px 12px rgba(41, 38, 34, .35); }
.utp-token[data-state="free"], .utp-swatch.is-free { background: var(--saffron); color: var(--fill); }
.utp-token[data-state="picked"], .utp-swatch.is-picked { background: var(--fill); color: #fff; border-color: var(--fill); }
.utp-token[data-state="picked"] { box-shadow: 0 0 0 4px var(--saffron), 0 0 0 6px #fff, 0 6px 12px rgba(41, 38, 34, .4); }
.utp-token[data-state="booked"], .utp-swatch.is-booked { background: repeating-linear-gradient(45deg, var(--field) 0 4px, var(--rule) 4px 8px); color: var(--text-soft); border-color: var(--rule); }
.utp-token[data-state="nofit"], .utp-swatch.is-nofit { background: var(--field); color: var(--text-soft); border: 2px dashed var(--text-soft); }
.utp-token[data-state="nofit"] { opacity: .45; transform: scale(.75); box-shadow: none; }
.utp-swatch.is-free { box-shadow: 0 0 0 1px var(--fill); }
.utp-token:focus-visible, .utp-tab:focus-visible, .utp-select:focus-visible,
.utp-go:focus-visible, .utp-clear:focus-visible, .utp-zoom:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
