/* Booking, voucher, manage and admin pages. Uses the site colours from styles.css. */
.bk-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .bk-grid { grid-template-columns: minmax(0, 1fr); } }
.bk-card { background: #fff; border: 2px solid var(--line); border-radius: 24px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.bk-card h2, .bk-card h3 { margin-bottom: 12px; }
.bk-step { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bk-step .n { width: 38px; height: 38px; border-radius: 50%; background: var(--forest); color: var(--cream); font: 700 20px/38px 'Fraunces', serif; text-align: center; flex: none; }
.bk-step h2 { margin: 0; font-size: 26px; }

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal-head h3 { margin: 0; font-size: 22px; }
.cal-nav { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--forest); background: var(--cream); color: var(--forest); font: 800 20px/1 'Fredoka', sans-serif; cursor: pointer; }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font: 700 13px/1 'Nunito', sans-serif; color: var(--muted); padding: 4px 0; text-transform: uppercase; letter-spacing: .04em; }
.cal-day { aspect-ratio: 1 / 1; min-height: 44px; border-radius: 12px; border: 2px solid transparent; background: transparent; font: 700 16px/1 'Nunito', sans-serif; color: #b9b19a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.cal-day.blank { visibility: hidden; }
.cal-day.avail { background: #E5F3D0; border-color: #8FBF5A; color: var(--forest); cursor: pointer; }
.cal-day.avail:hover, .cal-day.avail:focus-visible { background: var(--gold); border-color: var(--forest); outline: none; }
.cal-day.sel { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.cal-day.booked, .cal-day.full, .cal-day.few { background: #F1E7D3; color: #9a8e75; text-decoration: line-through; }
.cal-day.few small { color: #8a6d1f; }
.cal-day.avail small { color: #4a6b2a; }
.cal-day.sel small { color: var(--cream); }
.cal-day small { font: 600 10px/1 'Nunito', sans-serif; text-decoration: none; display: block; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.cal-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 2px solid transparent; }
.cal-legend .a { background: #E5F3D0; border-color: #8FBF5A; } .cal-legend .b { background: #F1E7D3; } .cal-legend .s { background: var(--forest); }

.f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.f label, .f legend { font-weight: 800; font-size: 16px; color: var(--forest); }
.f .hint { font-size: 14px; color: var(--muted); }
.f input, .f textarea, .f select { font: 600 17px/1.3 'Nunito', sans-serif; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.f input:focus, .f textarea:focus, .f select:focus { outline: 3px solid var(--gold); border-color: var(--forest); }
.f textarea { min-height: 86px; resize: vertical; }
.f .err { color: #B3282D; font-weight: 700; font-size: 15px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .f-row { grid-template-columns: 1fr; } }
.chk { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; margin: 6px 0 16px; }
.chk input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--forest); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.stepper { display: flex; align-items: center; gap: 0; width: max-content; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.stepper button { width: 48px; height: 48px; border: 0; background: var(--cream); color: var(--forest); font: 800 24px/1 'Fredoka', sans-serif; cursor: pointer; }
.stepper input { width: 64px; text-align: center; border: 0; border-radius: 0; padding: 0; height: 48px; }

.sum { background: var(--cream); border: 2px dashed var(--forest); border-radius: 16px; padding: 14px 16px; margin: 6px 0 16px; font-size: 17px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.sum .tot { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 8px; font: 700 22px/1.2 'Fraunces', serif; color: var(--forest); }
.note { border-radius: 14px; padding: 12px 16px; font-size: 16px; line-height: 1.5; margin: 12px 0; }
.note.info { background: #E8F1FA; border: 2px solid #A9CBE8; }
.note.warn { background: #FFF3A8; border: 2px solid #E5CF4E; }
.note.bad { background: #FBE3E1; border: 2px solid #E7A39E; color: #7A1D1D; }
.note.good { background: #E5F3D0; border: 2px solid #8FBF5A; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.amt { display: flex; flex-wrap: wrap; gap: 10px; }
.amt button { min-width: 84px; padding: 12px 18px; border-radius: 14px; border: 2px solid var(--forest); background: #fff; color: var(--forest); font: 700 20px/1 'Fredoka', sans-serif; cursor: pointer; }
.amt button.on { background: var(--forest); color: var(--cream); }
.spin { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--forest); border-radius: 50%; animation: sp 0.9s linear infinite; vertical-align: -5px; margin-right: 8px; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.big-ok { font: 700 clamp(30px, 5vw, 44px)/1.1 'Fraunces', serif; color: var(--forest); }

/* admin */
.ad { max-width: 1100px; margin: 0 auto; padding: 20px; }
.ad h1 { font-size: 34px; }
.ad-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.ad-tabs button { padding: 10px 18px; border-radius: 999px; border: 2px solid var(--forest); background: #fff; color: var(--forest); font: 700 17px/1 'Fredoka', sans-serif; cursor: pointer; }
.ad-tabs button.on { background: var(--forest); color: var(--cream); }
.ad-tabs .badge { background: #B3282D; color: #fff; border-radius: 999px; padding: 2px 8px; margin-left: 6px; font-size: 14px; }
.ad table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
.ad th, .ad td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 16px; vertical-align: top; }
.ad th { background: var(--sand); font-weight: 800; }
.ad .week { background: var(--forest); color: var(--cream); padding: 8px 12px; border-radius: 10px; margin: 18px 0 6px; font-weight: 800; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.ad .small-btn { padding: 6px 12px; border-radius: 999px; border: 2px solid var(--forest); background: #fff; color: var(--forest); font: 700 14px/1 'Fredoka', sans-serif; cursor: pointer; margin: 2px 4px 2px 0; }
.ad .small-btn.danger { border-color: #B3282D; color: #B3282D; }
.ad .tbl-wrap { overflow-x: auto; }
.pill-s { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.pill-s.confirmed, .pill-s.issued { background: #E5F3D0; } .pill-s.held, .pill-s.pending { background: #FFF3A8; } .pill-s.paid { background: #FBE3E1; }
.ad .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 18px; }
.btn.ghost-dark { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 2px var(--forest); }

.bk-important { background: #FFF4D6; border-left: 6px solid var(--gold); border-radius: 12px; padding: 16px 18px; margin: 18px 0 14px; }
.bk-important h3 { margin: 0 0 8px; font-size: 20px; color: var(--forest); }
.bk-important ul { margin: 0; padding-left: 20px; }
.bk-important li { font-size: 15px; line-height: 1.5; margin: 0 0 8px; }
.bk-important li:last-child { margin-bottom: 0; }

/* Admin: block dates calendar */
.ad .bd-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
.ad .bd-day { aspect-ratio: 1.15 / 1; min-height: 46px; border-radius: 12px; border: 2px solid transparent; background: transparent; color: #b9b19a; font: 700 16px/1 'Nunito', sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.ad .bd-day small { font: 600 10px/1 'Nunito', sans-serif; }
.ad .bd-day.blank { visibility: hidden; }
.ad .bd-day.open { background: #E5F3D0; border-color: #8FBF5A; color: var(--forest); cursor: pointer; }
.ad .bd-day.closed { background: #F8DCDC; border-color: #D98A8E; color: #8a1f24; cursor: pointer; }
.ad .bd-day.booked { background: #F1E7D3; border-color: #D8C9A5; color: #6b5d3d; cursor: default; }
.ad .bd-day.sel { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.ad .bd-day.anchor { box-shadow: 0 0 0 3px var(--gold); }
.ad .bd-day:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.ad .bd-bar { position: sticky; bottom: 8px; background: #fff; border: 2px solid var(--forest); border-radius: 16px; padding: 12px 14px; margin: 16px 0; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.ad .bd-modes label { margin-right: 18px; font-weight: 700; }

/* Admin: phones and narrow windows */
.ad { overflow-wrap: anywhere; }
.ad input, .ad select, .ad textarea { max-width: 100%; box-sizing: border-box; }
@media (max-width: 720px) {
  .ad { padding: 12px; }
  .ad h1 { font-size: 28px; }
  .ad-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px -12px; padding: 2px 12px 8px; scroll-snap-type: x proximity; }
  .ad-tabs button { flex: 0 0 auto; padding: 10px 14px; font-size: 16px; white-space: nowrap; scroll-snap-align: start; }
  .ad .small-btn { padding: 10px 14px; font-size: 15px; min-height: 44px; }
  .ad .btn { width: 100%; }
  .ad .tbl-wrap { overflow: visible; }
  /* tables become one card per row */
  .ad table, .ad tbody, .ad tr, .ad td { display: block; width: 100%; box-sizing: border-box; }
  .ad table { background: transparent; border-radius: 0; }
  .ad thead { position: absolute; left: -9999px; }
  .ad tr { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: 0 0 12px; padding: 6px 4px; }
  .ad td { border-bottom: 0; padding: 6px 12px; font-size: 16px; }
  .ad td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font: 800 12px/1.2 'Nunito', sans-serif; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
  .ad td:empty { display: none; }
  .ad td > span.hint, .ad td > div > span.hint { display: block; margin-bottom: 6px; }
  .ad .grid2 { grid-template-columns: 1fr; }
  .ad .bd-grid { gap: 4px; }
  .ad .bd-day { min-height: 44px; font-size: 15px; border-radius: 10px; }
  .ad .bd-day small { font-size: 9px; }
  .ad .bd-bar { bottom: 0; border-radius: 16px 16px 0 0; margin: 14px -12px 0; border-left: 0; border-right: 0; }
  .ad .bd-modes label { display: block; margin: 8px 0; }
  .ad .cal-head h3 { font-size: 19px; }
  .ad .week { font-size: 15px; }
}
