/**
 * StageZone Menu — the reservation form.
 *
 * It wears the venue's identity: the same accent, fonts and theme tokens
 * the menu itself gets from StageZone_Menu_Identity::css_vars(). Nothing is
 * hard-coded to light or dark — every surface is mixed from the theme's own
 * text colour, so the form belongs to the site it sits on. The floor plan
 * follows the same tokens instead of shining white on a dark page.
 */

.szr-skin {
    --szr-accent: var(--szm-accent, #E5322B);
    --szr-fg: var(--szm-fg, #16130F);
    --szr-muted: var(--szm-muted, #6B6355);
    --szr-rule: var(--szm-rule, rgba(128, 128, 128, .28));
    /* Fields and chips: the page's own colour, a few percent up, with a
       hairline so they read as controls on any background. */
    --szr-field: color-mix(in srgb, var(--szr-fg) 8%, transparent);
    --szr-field-on: color-mix(in srgb, var(--szr-fg) 14%, transparent);
    --szr-edge: color-mix(in srgb, var(--szr-fg) 18%, transparent);

    max-width: 760px;
    margin: 0 auto;
    color: var(--szr-fg);
    font-family: var(--szm-body, inherit);
}

.szr-skin *,
.szr-skin *::before,
.szr-skin *::after { box-sizing: border-box; }

.szr-skin [hidden], .szr[hidden], .szr-done[hidden] { display: none !important; }

.szr { display: flex; flex-direction: column; gap: 34px; }

.szr__intro {
    margin: 0 0 24px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--szr-field);
    color: var(--szr-muted);
}

/* ─── A step of the form ────────────────────────────────────── */

.szr__step { display: flex; flex-direction: column; gap: 12px; }

.szr__h {
    margin: 0;
    font-family: var(--szm-display, inherit);
    font-size: clamp(19px, 2.4vw, 24px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--szr-fg);
}

.szr__hint { margin: 0; font-size: 14px; color: var(--szr-muted); }

.szr__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

/* ─── Shared chip: days, times, spaces ──────────────────────── */

.szr__slots, .szr__plans { display: flex; flex-wrap: wrap; gap: 8px; }

/* One line that scrolls: two weeks of days without eating the screen. */
.szr__days {
    display: flex;
    gap: 8px;
    margin: 0 -16px;
    padding: 2px 16px 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.szr__days::-webkit-scrollbar { display: none; }
.szr__days button { flex: none; scroll-snap-align: start; }

.szr__days button,
.szr__slots button,
.szr__plans button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: 8px 16px;
    border: 1px solid var(--szr-edge);
    border-radius: 12px;
    background: var(--szr-field);
    color: inherit;
    font: inherit;
    font-weight: 600;
    line-height: 1.15;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.szr__days button:hover,
.szr__slots button:not(:disabled):hover,
.szr__plans button:hover { background: var(--szr-field-on); }

.szr__days button[aria-checked="true"],
.szr__slots button[aria-checked="true"],
.szr__plans button[aria-selected="true"] {
    background: var(--szr-accent);
    border-color: var(--szr-accent);
    color: #fff;
}

.szr__days small,
.szr__slots small,
.szr__plans small { font-size: 12px; font-weight: 400; opacity: .7; }

.szr__days button { min-width: 84px; }
.szr__days strong { font-size: 17px; font-weight: 700; }

.szr__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.szr__slots button { font-variant-numeric: tabular-nums; font-size: 17px; }
.szr__slots button:disabled { opacity: .4; cursor: default; }
.szr__slots button:disabled strong { text-decoration: line-through; }

.szr__plans button { min-height: 44px; padding: 6px 14px; border-radius: 999px; font-weight: 500; }

/* "Jiný den": a chip that opens the browser's own date picker. The native
   field stays in the form (it holds the value) but out of the way. */
.szr__other { position: relative; margin: 0; }

.szr__other button {
    min-height: 44px;
    padding: 0 16px;
    border: 1px dashed var(--szr-edge);
    border-radius: 999px;
    background: none;
    color: var(--szr-muted);
    font: inherit;
    cursor: pointer;
}

.szr__other button:hover { color: var(--szr-fg); }

.szr__other input {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 150px;
    height: 44px;
    opacity: 0;
    border: 0;
    cursor: pointer;
}

.szr__other.is-open input { position: static; width: auto; opacity: 1; padding: 0 12px; border: 1px solid var(--szr-edge); border-radius: 10px; background: var(--szr-field); color: inherit; font: inherit; }
.szr__other.is-open button { display: none; }

/* ─── How many ──────────────────────────────────────────────── */

.szr__party {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--szr-rule);
}

.szr__plabel { font-weight: 600; }

.szr__step-num { display: inline-flex; align-items: center; gap: 4px; }

.szr__step-num button {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid var(--szr-rule);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.szr__step-num button:hover { background: var(--szr-field); }

.szr__step-num input {
    width: 72px;
    border: 0;
    background: none;
    color: inherit;
    font-family: var(--szm-display, inherit);
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

.szr__step-num input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ─── The plan ──────────────────────────────────────────────── */

.szr__mapwrap { position: relative; }

.szr__mapbox {
    overflow: auto;
    padding: 6px;
    border-radius: 14px;
    background: var(--szr-field);
    /* Two fingers zoom the plan itself, so the browser must not take them. */
    touch-action: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.szr__mapbox svg { display: block; width: 100%; height: auto; }
.szr__mapbox.is-panning { cursor: grabbing; }

.szr__zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 6px;
}

.szr__zoom button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--szr-edge);
    border-radius: 12px;
    background: color-mix(in srgb, var(--szm-bg, #111) 82%, transparent);
    color: inherit;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.szr__zoom button:disabled { opacity: .4; cursor: default; }

.szr__pick .szf-svg {
    --szf-floor: transparent;
    --szf-line: var(--szr-rule);
    --szf-grid: transparent;
    --szf-table: color-mix(in srgb, var(--szr-fg) 10%, transparent);
    --szf-table-line: color-mix(in srgb, var(--szr-fg) 30%, transparent);
    --szf-seat: color-mix(in srgb, var(--szr-fg) 20%, transparent);
    --szf-text: var(--szr-fg);
    --szf-muted: var(--szr-muted);
    --szf-decor: color-mix(in srgb, var(--szr-fg) 8%, transparent);
    --szf-accent: var(--szr-accent);
    --szf-free: color-mix(in srgb, #3FA35B 26%, transparent);
    --szf-busy: color-mix(in srgb, #E8B04A 22%, transparent);
}

.szr__pick .szf-t.is-free .szf-top { stroke: color-mix(in srgb, #3FA35B 70%, transparent); }
.szr__pick .szf-t.is-off { opacity: .32; cursor: not-allowed; }
/* Bar, stage, walls: the theme's own colour, not the admin builder's
   beige and lilac, which would glare on a dark site. */
.szr__pick .szf-d rect,
.szr__pick .szf-d ellipse {
    fill: color-mix(in srgb, var(--szr-fg) 9%, transparent);
    stroke: none;
}

.szr__pick .szf-d.is-wall rect { fill: color-mix(in srgb, var(--szr-fg) 22%, transparent); }
.szr__pick .szf-d.is-door rect { fill: none; stroke: var(--szr-edge); stroke-dasharray: 6 4; }
.szr__pick .szf-d.is-plant ellipse { fill: color-mix(in srgb, #3FA35B 22%, transparent); }
.szr__pick .szf-d text { fill: var(--szr-muted); }

.szr__legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin: 0;
    font-size: 13px;
    color: var(--szr-muted);
}

.szr__legend span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: -10px;
    border-radius: 3px;
    vertical-align: -1px;
}

.szr__legend .is-free { background: color-mix(in srgb, #3FA35B 26%, transparent); border: 1px solid #3FA35B; }
.szr__legend .is-picked { background: var(--szr-accent); }
.szr__legend .is-off { background: color-mix(in srgb, var(--szr-fg) 25%, transparent); }

.szr__picked { margin: 0; font-weight: 600; }

.szr__any {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--szr-muted);
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

/* ─── Contact ───────────────────────────────────────────────── */

.szr__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

.szr__field { display: flex; flex-direction: column; gap: 6px; margin: 0; }

.szr__field label { font-size: 14px; font-weight: 600; }
.szr__field label small { font-weight: 400; color: var(--szr-muted); }

.szr input[type="text"],
.szr input[type="tel"],
.szr input[type="email"],
.szr textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid var(--szr-edge);
    border-radius: 12px;
    background: var(--szr-field);
    color: inherit;
    font: inherit;
}

.szr textarea { min-height: 76px; resize: vertical; }

.szr input::placeholder,
.szr textarea::placeholder { color: color-mix(in srgb, var(--szr-fg) 38%, transparent); }

.szr input:focus-visible,
.szr textarea:focus-visible,
.szr button:focus-visible {
    outline: 2px solid var(--szr-accent);
    outline-offset: 2px;
}

.szr__check { margin: 4px 0 0; font-size: 14px; color: var(--szr-muted); }
.szr__check label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.szr__check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--szr-accent); }

.szr__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ─── Send ──────────────────────────────────────────────────── */

.szr__send {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 22px;
    border-top: 1px solid var(--szr-rule);
}

.szr__recap {
    margin: 0;
    font-family: var(--szm-display, inherit);
    font-size: clamp(17px, 2vw, 20px);
    font-weight: 700;
}

.szr__recap:empty { display: none; }

.szr__error {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--szr-accent) 16%, transparent);
    color: var(--szr-fg);
}

.szr__go {
    min-height: 58px;
    border: 0;
    border-radius: 12px;
    background: var(--szr-accent);
    color: #fff;
    font-family: var(--szm-display, inherit);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.szr__go:disabled { opacity: .55; }

.szr-done { padding: 40px 0; text-align: center; }
.szr-done h2 { margin: 0 0 10px; font-family: var(--szm-display, inherit); font-size: clamp(22px, 3vw, 30px); }
.szr-done p { margin: 0; color: var(--szr-muted); }

.szr-off { color: var(--szr-muted, inherit); }

/* The usual placement: the page already has colours, so the form takes its
   text colour from there and only the accent stays the lístek's. */
.szr-skin--page {
    --szr-fg: currentColor;
    --szr-muted: color-mix(in srgb, currentColor 65%, transparent);
    --szr-rule: color-mix(in srgb, currentColor 18%, transparent);
}

/* For a page with no colours of its own: the lístek's surface, so light text
   never ends up on light. The standalone page skips this — the body already
   carries the colour. */
.szr-skin--bg {
    max-width: 800px;
    padding: 30px 22px 34px;
    border-radius: 16px;
    background: var(--szm-bg, transparent);
}

@media (min-width: 700px) {
    .szr-skin--bg { padding: 38px 36px 42px; }
}

/* Jumping to a step: below whatever the site keeps stuck to the top of the
   window. offset.js measures it into --szm-offset. */
.szr-skin [data-szr-stage],
.szr-skin .szr__step,
.szr-done { scroll-margin-top: calc(var(--szm-offset, 0px) + 20px); }

/* Native controls (the date picker, the checkbox) follow the theme. */
.szr-skin--dark { color-scheme: dark; }
.szr-skin--light { color-scheme: light; }
.szr-skin--auto { color-scheme: light dark; }

/* ─── Standalone page (/?sz_menu=reserve) ───────────────────── */

body.szr-page {
    margin: 0;
    padding: 28px 16px 56px;
    background: var(--szr-page-bg, #0B0B0C);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.szr-head { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.szr-logo img { display: block; height: 48px; width: auto; margin: 0 auto 14px; object-fit: contain; }
.szr-head h1 { margin: 0; font-family: var(--szm-display, inherit); font-size: clamp(26px, 5vw, 38px); }
.szr-head strong { font-size: 20px; }

/* ─── "Vybráno" bar ─────────────────────────────────────────── */

.szr__toast {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 736px;
    margin: 0 auto;
    padding: 12px 12px 12px 18px;
    border-radius: 14px;
    background: var(--szr-toast, var(--szr-accent));
    color: var(--szr-toast-fg, #fff);
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    animation: szrUp .25s ease both;
}

@keyframes szrUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.szr__toast button {
    flex: none;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: color-mix(in srgb, currentColor 22%, transparent);
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.szr__toast button:hover { background: color-mix(in srgb, currentColor 34%, transparent); }

@media (prefers-reduced-motion: reduce) {
    .szr__toast { animation: none; }
}

.szr-skin.has-toast .szr__send { padding-bottom: 84px; }
