/* ============================================================
   Court reservation — Hostivař outdoor (demo)
   ============================================================ */

.book-page {
  background:
    radial-gradient(120% 80% at 100% -10%, rgba(200, 232, 0, 0.12), transparent 50%),
    radial-gradient(90% 60% at 0% 40%, rgba(26, 61, 44, 0.06), transparent 45%),
    var(--paper);
}

.demo-ribbon {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  text-align: center;
}
.demo-ribbon span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--lime);
  padding: 3px 8px;
  border-radius: 4px;
}

.book-header {
  top: 40px;
}
.book-page .site-header.scrolled .nav > a.btn-accent {
  background: var(--lime);
  color: var(--ink);
  box-shadow: none;
}

.book {
  padding:
    calc(120px + env(safe-area-inset-top, 0px))
    0
    clamp(48px, 8vw, 88px);
}

.book-shell { max-width: 1120px; }

.book-intro {
  max-width: 640px;
  margin-bottom: 28px;
}
.book-intro h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 8px 0 12px;
}
.book-lede {
  color: var(--mist);
  font-size: 1.08rem;
  max-width: 52ch;
}

.pay-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 18px 0 0;
  padding: 12px 0 0;
}
.pay-logos img {
  display: block;
  height: 28px;
  width: auto;
  object-fit: contain;
}
.pay-logos-inline {
  margin: 0 0 18px;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.pay-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 8px;
  max-width: 520px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.pay-consent input {
  margin-top: 4px;
  flex-shrink: 0;
}
.pay-consent-body label {
  display: block;
  cursor: pointer;
  color: inherit;
  font-weight: 500;
}
.pay-consent-links {
  margin: 6px 0 0;
  font-size: 0.88rem;
}
.pay-consent a,
.book-hint a,
.book-legal-note a,
.summary-note a {
  color: var(--forest-2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.book-legal-note {
  margin: 4px 0 16px;
  font-size: 0.88rem;
  color: var(--mist);
  line-height: 1.45;
}
.done-card .book-legal-note {
  margin-top: 12px;
  text-align: center;
}

.book-steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
}
.book-steps li { margin: 0; padding: 0; }
.book-step-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  color: var(--mist);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: default;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.book-step-btn span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--stone-2);
  font-size: 0.75rem;
}
.book-steps li.is-active .book-step-btn {
  color: var(--ink);
  background: var(--white);
  border-color: rgba(26, 61, 44, 0.22);
  box-shadow: 0 6px 20px rgba(20, 36, 28, 0.06);
}
.book-steps li.is-active .book-step-btn span {
  background: var(--lime);
}
.book-steps li.is-done .book-step-btn {
  color: var(--forest-2);
  cursor: pointer;
}
.book-steps li.is-done .book-step-btn span {
  background: var(--forest);
  color: #fff;
}
.book-steps li.is-done .book-step-btn:hover {
  background: var(--white);
  border-color: rgba(26, 61, 44, 0.28);
  color: var(--ink);
}
.book-step-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.book-steps li.is-active .book-step-btn:disabled {
  opacity: 1;
  cursor: default;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.book-stage {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 18px 48px rgba(20, 36, 28, 0.06);
  min-height: 420px;
}

.book-panel[hidden] { display: none !important; }
.book-panel h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin-bottom: 8px;
}
.book-hint {
  color: var(--mist);
  margin-bottom: 22px;
  max-width: 54ch;
}
.book-hint-wide {
  max-width: 62ch;
}

.book-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.book-nav-sticky {
  position: sticky;
  top: 148px;
  z-index: 5;
  margin-top: 18px;
  margin-bottom: 8px;
  padding: 12px 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    var(--white) 18%,
    var(--white) 100%
  );
}
.book-nav-sticky .btn {
  box-shadow: 0 8px 24px rgba(20, 36, 28, 0.12);
}
.btn-ghost-ink {
  background: transparent;
  color: var(--forest-2);
  border-color: var(--line);
}
.btn-ghost-ink:hover {
  background: var(--stone);
  color: var(--ink);
}

/* ---- Dates ---- */
.date-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}
.date-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--stone);
  border-radius: var(--radius);
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.date-chip:hover {
  border-color: rgba(26, 61, 44, 0.28);
  transform: translateY(-2px);
}
.date-chip.is-selected {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.date-chip .dow {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 4px;
}
.date-chip .dom {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.date-chip .mon {
  display: block;
  font-size: 0.82rem;
  margin-top: 4px;
  opacity: 0.8;
}
.date-chip.is-selected .dow,
.date-chip.is-selected .mon { opacity: 0.85; color: var(--lime); }

/* ---- Day availability overview ---- */
.day-overview {
  margin-top: 12px;
  padding: 20px 18px;
  background: var(--stone);
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  animation: dayOvIn .35s var(--ease);
}
.day-overview[hidden] { display: none !important; }
@keyframes dayOvIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.day-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.day-overview-head h3 {
  font-size: 1.05rem;
  margin: 0;
}
.day-overview-meta {
  margin: 0;
  color: var(--mist);
  font-size: 0.9rem;
}
.day-overview-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.day-overview-list li { margin: 0; }
.day-ov-btn {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(88px, 120px) 1fr auto auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.day-ov-btn:hover:not(:disabled) {
  border-color: rgba(26, 61, 44, 0.28);
  background: #fff;
  transform: translateY(-1px);
}
.day-ov-btn:focus-visible {
  outline: 2px solid var(--lime-deep);
  outline-offset: 2px;
}
.day-ov-btn:disabled,
.day-ov-btn.is-full,
.day-ov-btn.is-blocked {
  cursor: not-allowed;
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.55);
}
.day-ov-btn.is-blocked .day-ov-stat {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.day-ov-go {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest-2);
  white-space: nowrap;
}
.day-ov-btn:hover:not(:disabled) .day-ov-go { color: var(--ink); }
.day-ov-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
}
.day-ov-bank {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--mist);
  margin-top: 1px;
}
.day-ov-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 36, 28, 0.1);
  overflow: hidden;
}
.day-ov-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--forest-2);
  transition: width .4s var(--ease);
}
.day-ov-bar.is-good > i { background: #3a8f5c; }
.day-ov-bar.is-ok > i { background: var(--lime-deep); }
.day-ov-bar.is-tight > i { background: #c47a2a; }
.day-ov-bar.is-full > i { background: #9a4a3a; width: 100% !important; opacity: 0.45; }
.day-ov-stat {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink-soft);
  white-space: nowrap;
  text-align: right;
  min-width: 5.5ch;
}
.day-ov-stat.is-full { color: #9a4a3a; }
.day-overview-foot {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: 0.9rem;
}
.day-overview-foot strong {
  color: var(--ink);
  font-family: var(--font-head);
}

@media (max-width: 560px) {
  .day-ov-btn {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
  }
  .day-ov-bar { grid-column: 1 / -1; order: 3; }
  .day-ov-go { grid-column: 2; grid-row: 1; }
}

/* ---- Court map ---- */
.court-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 20px;
  align-items: start;
}
.court-map-wrap {
  background:
    linear-gradient(160deg, rgba(26, 61, 44, 0.92), rgba(18, 38, 28, 0.96));
  border-radius: calc(var(--radius) + 4px);
  padding: 14px;
  overflow: hidden;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 10px 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}
.leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.leg::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.leg-free::before { background: #c4785a; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.leg-busy::before { background: #7a5244; }
.leg-off::before {
  background: repeating-linear-gradient(-45deg, #5a6a5e, #5a6a5e 2px, #3d4a42 2px, #3d4a42 4px);
}
.leg-path::before { background: #c4b8a0; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.leg-gate::before { background: var(--lime); }
.leg-fence::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
  border-radius: 1px;
}

/* Opacity on the group so overlapping segments don't double-darken at joints */
.map-walkways {
  opacity: 0.88;
  pointer-events: none;
}
.walk-path {
  fill: #c4b8a0;
}

.map-fence {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 2.5;
  stroke-linejoin: miter;
  stroke-linecap: square;
  pointer-events: none;
}

.entrance-mark {
  fill: var(--lime);
  opacity: 0.92;
}
.map-entrance-label {
  fill: var(--lime);
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.court-map {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.map-street,
.map-label,
.map-building,
.court-dead-label {
  fill: rgba(255, 255, 255, 0.55);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.map-street { font-size: 11px; }
.map-building {
  fill: rgba(255, 255, 255, 0.7);
  text-anchor: middle;
  font-size: 11px;
}
.court-num-sm { font-size: 18px; }
.court-clay {
  fill: url(#clay);
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.5;
  transition: filter .25s, stroke .25s, opacity .25s;
}
.court-line {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.5;
  pointer-events: none;
}
.court-num {
  fill: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  paint-order: stroke fill;
  stroke: rgba(20, 36, 28, 0.25);
  stroke-width: 3px;
}
.court-plot {
  cursor: pointer;
  outline: none;
}
.court-plot .court-clay {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
.court-plot:hover .court-clay,
.court-plot:focus-visible .court-clay {
  stroke: var(--lime);
  stroke-width: 3;
}
.court-plot.is-selected .court-clay {
  stroke: var(--lime);
  stroke-width: 3.5;
  filter: drop-shadow(0 0 12px rgba(200, 232, 0, 0.45));
}
.court-plot.is-busy .court-clay {
  fill: #7a5244;
  opacity: 0.75;
}
.court-plot.is-busy {
  cursor: not-allowed;
}
.court-plot.is-disabled {
  cursor: not-allowed;
  pointer-events: none;
}
.court-plot.is-disabled .court-clay {
  fill: #4a5a50;
  stroke: rgba(255, 255, 255, 0.15);
  opacity: 0.55;
}
.court-plot.is-disabled .court-line { opacity: 0.25; }
.court-dead-label {
  text-anchor: middle;
  font-size: 10px;
  fill: rgba(255, 255, 255, 0.45);
}

/* ---- Slots ---- */
.slot-pane {
  background: var(--stone);
  border-radius: calc(var(--radius) + 2px);
  padding: 18px 16px;
  min-height: 280px;
}
.slot-heading {
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.slot-meta {
  color: var(--mist);
  font-size: 0.9rem;
  margin-bottom: 6px;
  min-height: 1.2em;
}
.slot-legend {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
  line-height: 1.35;
}
.slot-legend[hidden] {
  display: none;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
}
.slot-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 9px 8px 8px;
  font-family: var(--font-head);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.15;
}
.slot-time {
  font-weight: 700;
  font-size: 0.92rem;
}
.slot-price {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--mist);
}
.slot-chip.band-vecer .slot-price {
  font-weight: 700;
  color: var(--ink-soft);
}
.slot-chip:hover:not(:disabled) {
  border-color: rgba(26, 61, 44, 0.3);
}
.slot-chip.is-selected {
  background: var(--lime);
  border-color: var(--lime-deep);
  color: var(--ink);
}
.slot-chip.is-selected .slot-price {
  color: var(--ink);
  opacity: 0.75;
}
.slot-chip:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.slot-chip:disabled .slot-time {
  text-decoration: line-through;
}

/* ---- Form ---- */
.book-form {
  display: grid;
  gap: 14px;
  max-width: 420px;
}
.book-form label {
  display: grid;
  gap: 6px;
}
.book-form label span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest-2);
}
.book-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--stone);
  font: inherit;
  color: var(--ink);
  transition: border-color .2s, background .2s;
}
.book-form input:focus {
  outline: none;
  border-color: var(--forest-2);
  background: var(--white);
}
.book-form input:invalid:not(:placeholder-shown) {
  border-color: #b44;
}

/* ---- Pay ---- */
.pay-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
.pay-qr-card {
  background: var(--stone);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
#qrCanvas {
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.pay-qr-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--mist);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pay-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}
.pay-facts > div {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.pay-facts dt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--mist);
}
.pay-facts dd {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-all;
}
.pay-facts .copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pay-facts button.copy-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--forest-2);
}
.pay-facts button.copy-btn:hover { background: var(--stone); }

/* ---- Done ---- */
.done-card {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 0 8px;
}
.done-code {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: 0.08em;
  color: var(--forest);
  margin: 16px 0;
}
.done-card .book-nav { justify-content: center; }

/* ---- Summary ---- */
.book-summary {
  position: sticky;
  top: 120px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 22px 20px;
  box-shadow: 0 12px 32px rgba(20, 36, 28, 0.05);
}
.book-summary h2 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.summary-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
}
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.summary-list span {
  color: var(--mist);
  font-size: 0.88rem;
}
.summary-list strong {
  font-family: var(--font-head);
  font-weight: 700;
  text-align: right;
}
.summary-note,
.summary-hours {
  color: var(--mist);
  font-size: 0.86rem;
  line-height: 1.45;
}
.summary-hours { margin-top: 10px; }

.book-footer { margin-top: 0; }

@media (max-width: 960px) {
  .book-layout { grid-template-columns: 1fr; }
  .book-summary {
    position: static;
    order: -1;
  }
  .court-board { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .book-header { top: 52px; }
  .book-nav-sticky { top: 120px; }
  .demo-ribbon {
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    padding: 10px 12px;
  }
  .book {
    padding-top: calc(140px + env(safe-area-inset-top, 0px));
  }
  .pay-grid { grid-template-columns: 1fr; }
  .book-steps li { font-size: 0.8rem; padding: 6px 10px; }
  .book-nav .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .date-chip,
  .court-plot .court-clay,
  .slot-chip { transition: none; }
}
