/* Canotto table booking (/book-et-bord/). Tokens follow DESIGN.md, as on /bestil/. */
:root {
  --cream: #fcf9f2;
  --cream-deep: #f1eee7;
  --line: #e0ddd5;
  --white: #ffffff;
  --green: #3d4e43;
  --green-deep: #2d3b2f;
  --gold: #c7af69;
  --gold-rich: #725b27;
  --text: #333333;
  --muted: #5d625d;
  --error: #ba1a1a;
  --ok: #2e6b3f;
  --radius: 8px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold-rich); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.noscript { padding: 24px 16px; text-align: center; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: var(--green);
}
.top-logo img { height: 36px; width: auto; }
.top-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px;
  color: var(--white); border: 1px solid var(--gold); text-decoration: none;
  font-weight: 600; font-size: 14px;
}
.top-link:hover { background: var(--gold); color: var(--green-deep); }

/* ---------- Layout ---------- */
main { max-width: 680px; margin: 0 auto; padding: 0 16px calc(64px + var(--safe-bottom)); }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

h1 { margin: 24px 0 4px; font-size: clamp(26px, 6vw, 36px); line-height: 1.15; letter-spacing: -0.02em; color: var(--green-deep); }
.lede { margin: 0 0 8px; color: var(--muted); }

.step { scroll-margin-top: 76px; margin-top: 24px; padding: 18px 16px 20px; background: var(--white); border-radius: 12px; }
.step h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; color: var(--green-deep); }
.step h2 .n {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--green); color: var(--gold); font-size: 13px; font-weight: 700;
}
.step.is-muted { opacity: 0.5; }
.step .hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Choice buttons ---------- */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  min-width: 48px; min-height: 48px; padding: 8px 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  font-weight: 600; font-size: 15px;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.choice:hover:not(:disabled) { border-color: var(--green); }
.choice[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--white); }
.choice:disabled { background: var(--cream-deep); color: #9a9d98; cursor: not-allowed; text-decoration: line-through; }
.choice.more { border-style: dashed; }

.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.days::-webkit-scrollbar { display: none; }
.days .choice { flex: none; display: grid; min-width: 76px; padding: 8px 10px; line-height: 1.25; text-align: center; }
.days .choice small { font-weight: 500; font-size: 12px; }
.days .choice:disabled { text-decoration: none; }
.other-day { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.other-day input { min-height: 40px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.times .choice { padding: 8px 4px; }
.empty-times { margin: 0; color: var(--muted); }

/* ---------- Form ---------- */
.field { display: grid; gap: 4px; margin-top: 14px; }
form > .field:first-child, form > .row2:first-child > .field:first-child { margin-top: 0; }
.field span { font-size: 14px; font-weight: 600; color: var(--green-deep); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 10px 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(61, 78, 67, 0.15); }
.row2 { display: grid; gap: 0 12px; }
@media (min-width: 520px) {
  .row2 { grid-template-columns: 1fr 1fr; }
  form > .row2:first-child > .field { margin-top: 0; }
}
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 14px; }
.consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.summary { margin: 0 0 14px; padding: 12px 14px; background: var(--cream-deep); border-radius: var(--radius); font-weight: 600; color: var(--green-deep); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  min-height: 52px; margin-top: 18px; padding: 12px 20px;
  background: var(--green); color: var(--white); border: 0; border-radius: 0;
  font-weight: 700; font-size: 16px; letter-spacing: 0.01em; text-decoration: none;
}
.btn:hover:not(:disabled) { background: var(--green-deep); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.secondary { background: transparent; color: var(--green-deep); border: 1px solid var(--green); }
.btn.danger { background: var(--error); }
.fine { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.err { margin: 12px 0 0; color: var(--error); font-weight: 600; }
.err:empty { display: none; }

/* ---------- Done / info boxes ---------- */
.notice { margin-top: 24px; padding: 22px 18px; background: var(--white); border-radius: 12px; }
.notice h2 { margin: 0 0 8px; font-size: 22px; color: var(--green-deep); }
.notice p { margin: 0 0 10px; }
.notice .big { font-size: 18px; font-weight: 700; color: var(--green-deep); }
.ask { margin-top: 16px; padding: 16px 14px; background: var(--cream-deep); border-left: 3px solid var(--error); }
.ask .ask-q { margin: 0; font-size: 17px; font-weight: 700; color: var(--green-deep); }
.ask .fine { margin-top: 4px; }
.ask .btn.danger { margin-top: 14px; }
.ask .btn.secondary { margin-top: 10px; background: var(--white); }
.tick { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 50%; background: var(--green); color: var(--gold); font-size: 26px; }
.contact { display: grid; gap: 8px; margin-top: 14px; }
.contact a { font-weight: 700; }
.back { display: inline-block; margin-top: 14px; background: none; border: 0; padding: 0; color: var(--gold-rich); text-decoration: underline; font-size: 15px; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 18px;
  background: var(--green-deep); color: var(--white); border-radius: var(--radius); font-weight: 600;
  box-shadow: 0 12px 40px rgba(28, 28, 24, 0.2); z-index: 50;
}
.toast.error { background: var(--error); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
