/* Molly table booking — the guest's pages. One column, phone first; the same in a restaurant's
   widget (body.embed), only without the outer chrome. Colours as the booking emails. */

:root {
    --bg: #f6f5f0;
    --card: #ffffff;
    --ink: #14161a;
    --muted: #6b7078;
    --line: #e7e5df;
    --accent: #1e293b;
    --accent-ink: #ffffff;
    --soft: #eef1f5;
    --free: #e8f3ec;
    --free-ink: #1d6b3a;
    --warn: #fdf1dd;
    --warn-ink: #8a5300;
    --error: #fde8e8;
    --error-ink: #a11d1d;
    --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.embed { background: var(--card); }

.page {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

body.embed .page { padding: 12px 12px 24px; }

/* ── Header ───────────────────────────────────────────────────────── */

.top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.brand { display: flex; flex-direction: column; min-width: 0; }

.brand-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.brand-name {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

body.embed .brand-name { font-size: 1.2rem; }

.lang { display: flex; gap: 4px; flex-shrink: 0; }

.lang a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 999px;
}

.lang a.on { background: var(--soft); color: var(--ink); font-weight: 600; }

.foot {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 28px;
}

/* ── The card ─────────────────────────────────────────────────────── */

.sheet {
    background: var(--card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(20, 22, 26, 0.06);
}

body.embed .sheet { box-shadow: none; padding: 4px 0 0; border-radius: 0; }

.intro { color: var(--muted); margin: 0 0 20px; white-space: pre-line; }

h1, h2 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.step { margin-bottom: 24px; }
.step:last-child { margin-bottom: 0; }

/* What has been chosen so far, each with a way back to change it. */
.chosen {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chosen a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--soft);
    color: var(--ink);
    text-decoration: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.chosen a::after { content: "✎"; font-size: 0.75rem; color: var(--muted); }

/* ── Choices: party sizes and times ───────────────────────────────── */

.chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
}

.chips.times { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }

.chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: var(--card);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: border-color 0.15s, background 0.15s;
}

a.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.full { color: var(--muted); background: #faf9f6; font-weight: 500; }
.chip.full small { font-size: 0.7rem; font-weight: 600; color: var(--warn-ink); }
.chip.off { color: #b9bcc2; text-decoration: line-through; pointer-events: none; }

/* ── The month ────────────────────────────────────────────────────── */

.month-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.month-head strong { text-transform: capitalize; }

.month-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.1rem;
}

.month-nav:hover { background: var(--soft); }
.month-nav.disabled { visibility: hidden; }

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar .wd { font-size: 0.75rem; color: var(--muted); padding: 4px 0; text-transform: capitalize; }

.calendar .day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #b9bcc2;
    font-size: 0.95rem;
}

.calendar a.day { color: var(--ink); }
.calendar .day.free { background: var(--free); color: var(--free-ink); }
.calendar .day.full { background: #faf9f6; color: var(--muted); font-weight: 500; }
.calendar .day.today { box-shadow: inset 0 0 0 1px var(--line); }
.calendar .day.on { background: var(--accent); color: var(--accent-ink); }
.calendar a.day:hover { outline: 2px solid var(--accent); }

.legend { display: flex; gap: 16px; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.legend span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -1px;
}
.legend .l-free::before { background: var(--free); border: 1px solid var(--free-ink); }
.legend .l-full::before { background: #faf9f6; border: 1px solid var(--muted); }

/* ── Forms ────────────────────────────────────────────────────────── */

label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--muted); }

.field { margin-bottom: 14px; }

input[type=text], input[type=email], input[type=tel], textarea, select {
    width: 100%;
    font: inherit;
    color: inherit;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

textarea { min-height: 84px; resize: vertical; }

.hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.hint a { color: inherit; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }

.button {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 15px 20px;
    background: var(--accent);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button:hover { filter: brightness(1.15); }
.button.secondary { background: var(--soft); color: var(--ink); }
.button.danger { background: var(--error-ink); }
.button + .button, .actions .button + .button { margin-top: 10px; }

.cf-turnstile { margin: 6px 0 14px; min-height: 65px; }

/* ── Messages and the booking ─────────────────────────────────────── */

.notice {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    background: var(--soft);
}

.notice.ok { background: var(--free); color: var(--free-ink); }
.notice.warn { background: var(--warn); color: var(--warn-ink); }
.notice.error { background: var(--error); color: var(--error-ink); }
.notice strong { display: block; margin-bottom: 2px; }

.policy {
    border-left: 3px solid var(--line);
    padding: 4px 0 4px 12px;
    color: var(--muted);
    font-size: 0.9rem;
    margin: 4px 0 18px;
    white-space: pre-line;
}

.facts { width: 100%; border-collapse: collapse; margin: 4px 0 20px; }
.facts th, .facts td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { color: var(--muted); font-weight: 500; width: 40%; padding-right: 12px; }
.facts td { font-weight: 600; overflow-wrap: anywhere; }
.facts .ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }

.big-when { font-size: 1.3rem; font-weight: 700; margin: 0 0 4px; }
.big-when::first-letter { text-transform: uppercase; }

.contact { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }
.contact a { color: inherit; }
