/* Book a Court: pick a date → tap a free time → how long → Continue. */
.bk-layout { display: grid; gap: 20px; align-items: start; padding: 24px 0 64px; }
.bk-main { display: grid; gap: 16px; min-width: 0; }
/* Wide rows (court tabs, court choices) scroll inside themselves instead of widening the page. */
.bk-layout > *, .bk-main > *, .bk-sheet .sc-body > *, .bk-pick { min-width: 0; }
.bk-date-label { color: #5f655b; font-weight: 700; font-size: .85rem; }
@media (min-width: 992px) {
  .bk-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .bk-sheet { position: sticky; top: calc(var(--header-h, 72px) + 16px); }
}

/* Court tabs: "Any court" first, then each court with how many times are free. */
.bk-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -2px -4px 12px; padding: 2px 4px; }
.bk-tabs::-webkit-scrollbar { display: none; }
.bk-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #d8dbd0; background: #fff; color: #11170c; font-weight: 800; font-size: .9rem; white-space: nowrap; }
.bk-tab:hover:not(:disabled) { border-color: #9aad75; }
.bk-tab .n { padding: 2px 8px; border-radius: 999px; background: #edf7ce; color: #3f5a00; font-size: .75rem; }
.bk-tab .n.none { background: #eef1e7; color: #5f655b; }
.bk-tab.active { background: #11170c; border-color: #11170c; color: #fff; }
.bk-tab.active .n { background: #c9ff38; color: #11170c; }
.bk-tab:disabled { cursor: not-allowed; color: #5f655b; background: #f4f5f0; }
.bk-price { margin: 0 0 14px; color: #4b5541; font-size: .85rem; font-weight: 700; }
.bk-price:empty { display: none; }
.bk-notice { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #fff4dc; border: 1px solid #e1c27a; color: #5c3a00; font-size: .88rem; font-weight: 700; }

/* Times */
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.public-brand .bk-times .bk-time {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  width: 100%; min-height: 64px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid #b9d48a; background: #fff;
  color: #11170c; text-align: left; text-decoration: none; cursor: pointer; box-shadow: none; transform: none;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.public-brand .bk-times .bk-time .bt-time { font-weight: 800; font-size: 1rem; line-height: 1.2; white-space: nowrap; }
.public-brand .bk-times .bk-time .bt-sub { font-size: .78rem; font-weight: 700; line-height: 1.3; color: #3f5a00; }
.public-brand .bk-times .bk-time .bt-meta { font-size: .72rem; font-weight: 700; line-height: 1.3; color: #5f655b; }
.public-brand .bk-times .bk-time.is-selected .bt-meta { color: #2f3b1f; }
.public-brand .bk-times .bk-time:hover:not(:disabled) { border-color: #527000; background: #f6fbe9; }
.public-brand .bk-times .bk-time:active:not(:disabled) { transform: scale(.97); }
.public-brand .bk-times .bk-time.is-selected { background: #c9ff38; border-color: #638100; box-shadow: inset 0 0 0 1px #638100; }
.public-brand .bk-times .bk-time.is-selected .bt-sub { color: #11170c; }
.public-brand .bk-times .bk-time:disabled { cursor: default; background: #f1f3ed; border-color: #e1e5da; }
.public-brand .bk-times .bk-time:disabled :is(.bt-time, .bt-sub) { color: #5f655b; }
.public-brand .bk-times .bk-time:is(.is-booked, .is-held, .is-full) .bt-time { text-decoration: line-through; text-decoration-color: #9aa290; }
.public-brand .bk-times .bk-time.is-in_cart { background: #edf7ce; border-color: #a0b876; }
.public-brand .bk-times .bk-time.is-in_cart .bt-sub { color: #304600; }
.public-brand .bk-times .bk-time.is-open_play { background: #f5f2fc; border-color: #b6a6db; }
.public-brand .bk-times .bk-time.is-open_play .bt-sub { color: #5d418c; }
.public-brand .bk-times .bk-time.is-maintenance { background: repeating-linear-gradient(-45deg, #f1f3ed 0 8px, #e9ece4 8px 16px); }

/* Your booking */
.bk-sheet .sc-body { display: grid; gap: 4px; }
.bk-empty { display: flex; gap: 12px; align-items: center; color: #5f655b; font-size: .9rem; line-height: 1.45; }
.bk-empty .icon { width: 32px; height: 32px; color: #7d8a6c; flex: none; }
.bk-empty strong { color: #11170c; }
.bk-pick-head { display: flex; align-items: flex-start; gap: 12px; }
.bk-pick-head > div { flex: 1; min-width: 0; }
.bk-pick-title { font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.bk-pick-sub { margin-top: 2px; color: #5f655b; font-size: .85rem; font-weight: 700; }
.bk-clear { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid #d8dbd0; background: #fff; color: #11170c; display: grid; place-items: center; }
.bk-clear:hover { background: #f1f4ea; }
.bk-label { margin: 14px 0 8px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5f655b; }
.bk-durations { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-dur { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid #d8dbd0; background: #fff; color: #11170c; font-weight: 800; transition: background-color .15s ease, transform .12s ease; }
.bk-dur:hover { border-color: #9aad75; }
.bk-dur:active { transform: scale(.97); }
.bk-dur.active { background: #11170c; border-color: #11170c; color: #fff; }
.bk-courts { display: grid; gap: 8px; }
.bk-court { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; border-radius: 14px; border: 1.5px solid #d8dbd0; background: #fff; color: #11170c; text-align: left; }
.bk-court img { width: 56px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.bk-court .bc-name { flex: 1; min-width: 0; font-weight: 800; }
.bk-court .bc-price { font-weight: 800; white-space: nowrap; }
.bk-court .bc-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b8c3ac; transition: border-width .15s ease; }
.bk-court:hover:not(.is-static) { border-color: #9aad75; }
.bk-court.active { border-color: #638100; background: #f0f7df; }
.bk-court.active .bc-radio { border: 6px solid #527000; }
.bk-cart { margin-top: 14px; display: grid; gap: 8px; }
.bk-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5f655b; }
.bk-cart-head .hold-timer { text-transform: none; letter-spacing: 0; }
.bk-sheet .sc-foot .bk-more { justify-self: center; }
.bk-sheet .summary-row.total { margin: 0; }

/* Phones and small tablets: "Your booking" becomes a bottom sheet once a time is picked. */
@media (max-width: 991.98px) {
  .bk-hero p { display: none; }
  .bk-layout { padding-bottom: 24px; }
  .public-brand .bk-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; margin: 0;
    max-height: min(80vh, 600px); overflow-y: auto; overscroll-behavior: contain;
    border-radius: 22px 22px 0 0; border-width: 1px 0 0; box-shadow: 0 -14px 40px #090b0826;
    transform: translateY(105%); visibility: hidden;
    transition: transform .34s cubic-bezier(.2,.9,.25,1), visibility 0s linear .34s;
  }
  .public-brand .bk-sheet.show { transform: none; visibility: visible; transition: transform .34s cubic-bezier(.2,.9,.25,1), visibility 0s; }
  .bk-sheet::before { content: ''; display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: #d8dbd0; }
  .bk-sheet .sc-head, .bk-sheet .bk-note, .bk-sheet [data-sheet-cart] { display: none !important; }
  .public-brand .bk-sheet .sc-body { padding: 10px 16px 0; }
  .public-brand .bk-sheet .sc-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 16px; }
  .bk-sheet .sc-foot .summary-row.total { display: grid; gap: 0; padding: 0; border: 0; }
  .bk-sheet .sc-foot .summary-row.total .label { font-size: .75rem; }
  .bk-sheet .sc-foot .summary-row.total .value { font-size: 1.3rem; }
  .bk-sheet .sc-foot .bk-more { grid-column: 1 / -1; }
  .bk-pick-title { font-size: 1.2rem; }
  .bk-label { margin: 10px 0 6px; }
  .bk-sheet .bk-courts { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .bk-sheet .bk-courts::-webkit-scrollbar { display: none; }
  /* Compact court cards: photo · name over price; the green border marks the chosen court. */
  .bk-sheet .bk-court { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; align-items: center; }
  .bk-sheet .bk-court img { grid-row: 1 / 3; width: 40px; height: 30px; }
  .bk-sheet .bk-court .bc-name { grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
  .bk-sheet .bk-court .bc-price { grid-column: 2; grid-row: 2; font-size: .85rem; color: #3f5a00; line-height: 1.2; }
  .bk-sheet .bk-court .bc-radio { display: none; }
  .bk-sheet .bk-court.active { box-shadow: inset 0 0 0 1px #638100; }
  .bk-cart { margin-top: 10px; }
  body.public-brand.bk-sheet-open { padding-bottom: calc(var(--sheet-h, 0px) + 16px) !important; }
  html.nav-on-scroll body.public-brand.bk-sheet-open .app-nav { transform: translateY(calc(100% + 16px)); visibility: hidden; }
}
@media (max-width: 420px) {
  .bk-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .public-brand .bk-times .bk-time { padding: 9px 10px; }
  .public-brand .bk-times .bk-time .bt-time { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .public-brand .bk-sheet, .public-brand .bk-sheet.show { transition: none; }
}
