/* Court booking: public page (/c/book.php) and the club's day sheet (/club/bookings.php) */
.btn.book{background:var(--find,#14804a)}
.btn.book:hover{background:var(--find-dark,#0d5f36)}
.bk-head{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-bottom:6px}
.bk-head img{max-height:56px;max-width:110px;object-fit:contain}
.bk-head h1{margin:0}
.bk-sub{color:var(--muted);margin:0 0 14px}

/* member bar */
.bk-member{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;background:var(--soft);border-radius:var(--radius);padding:10px 14px;margin:0 0 14px;font-size:.95rem}
.bk-member form{display:inline}
.bk-member details{width:100%}
.bk-member summary{cursor:pointer;font-weight:600;color:var(--red-dark)}
.bk-login{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin-top:10px}
.bk-login label{font-size:.85rem;font-weight:600;display:flex;flex-direction:column;gap:2px}
.bk-login input{padding:9px 10px;border:1px solid #c9ced6;border-radius:8px;font:inherit;width:160px;max-width:100%}

/* days */
.bk-days{display:flex;gap:6px;overflow-x:auto;padding:2px 2px 8px;margin:0 0 12px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.bk-days a{flex:none;display:flex;flex-direction:column;align-items:center;min-width:58px;padding:7px 6px;border:1px solid var(--line);border-radius:10px;text-decoration:none;color:var(--ink);background:#fff;line-height:1.2}
.bk-days a small{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.bk-days a b{font-size:1.15rem}
.bk-days a[aria-current]{background:var(--ink);border-color:var(--ink);color:#fff}
.bk-days a[aria-current] small{color:#fff;opacity:.8}
.bk-days a.bk-member-day{border-style:dashed}

/* the grid */
.bk-grid-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:var(--radius);background:#fff;margin:0 0 12px}
.bk-grid{border-collapse:separate;border-spacing:4px;width:100%;font-size:.92rem}
.bk-grid th{font-size:.82rem;color:var(--muted);font-weight:700;text-align:center;padding:6px 4px;vertical-align:bottom;white-space:nowrap}
.bk-grid thead th{position:sticky;top:0;background:#fff;z-index:1}
.bk-grid thead th strong{display:block;color:var(--ink);font-size:.95rem}
.bk-grid thead th span{display:block;font-weight:600;font-size:.75rem}
.bk-grid tbody th{position:sticky;left:0;background:#fff;z-index:1;text-align:right;font-variant-numeric:tabular-nums;padding-right:8px;vertical-align:middle}
.bk-grid td{padding:0;min-width:74px;height:44px;text-align:center;vertical-align:middle}
.bk-cell{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;min-height:44px;border-radius:8px;text-decoration:none;font-weight:700;line-height:1.15;padding:3px 4px;font-variant-numeric:tabular-nums}
.bk-cell small{font-weight:600;font-size:.72rem;opacity:.85}
a.bk-cell.free{background:#eaf7ee;color:#0d5f36;border:1px solid #9fd3b1}
a.bk-cell.free:hover{background:#d3efdc}
a.bk-cell.free:focus-visible{outline:3px solid var(--ink);outline-offset:1px}
a.bk-cell.free.sel{background:var(--find,#14804a);border-color:var(--find,#14804a);color:#fff}
.bk-cell.booked,.bk-cell.held{background:repeating-linear-gradient(-45deg,#eef0f3,#eef0f3 6px,#e4e7eb 6px,#e4e7eb 12px);color:var(--muted);font-weight:600}
.bk-cell.blocked{background:#fff7e6;color:#8a5a00;font-weight:600;font-size:.8rem}
.bk-cell.past,.bk-cell.paused{color:#b5bbc3;font-weight:400}
.bk-cell.members{background:#eef3fb;color:var(--mine-dark,#164a96);font-weight:600;font-size:.8rem}
td.bk-cont{background:none}
td.bk-closed{color:#c9ced6}
/* staff day sheet */
a.bk-cell.staff-booked{background:#e8effa;border:1px solid #b9cdee;color:var(--ink);font-weight:600;font-size:.82rem;text-align:center}
a.bk-cell.staff-booked.owing{background:#fff1e0;border-color:#f0c58a}
a.bk-cell.staff-booked.held{background:#f5f6f8;border-style:dashed}
a.bk-cell.staff-booked[aria-current]{outline:3px solid var(--ink)}
a.bk-cell.staff-free{background:#fff;border:1px dashed #c9ced6;color:#9aa1ab;font-weight:600}
a.bk-cell.staff-free:hover{border-color:var(--find,#14804a);color:var(--find,#14804a)}
.bk-cell.staff-blocked{background:#fff7e6;color:#8a5a00;font-weight:600;font-size:.78rem}

.bk-legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:.85rem;color:var(--muted);margin:0 0 16px;padding:0;list-style:none}
.bk-legend li{display:flex;align-items:center;gap:6px}
.bk-legend i{display:inline-block;width:16px;height:16px;border-radius:4px}
.bk-legend .l-free{background:#eaf7ee;border:1px solid #9fd3b1}
.bk-legend .l-sel{background:var(--find,#14804a)}
.bk-legend .l-booked{background:repeating-linear-gradient(-45deg,#eef0f3,#eef0f3 3px,#e4e7eb 3px,#e4e7eb 6px)}
.bk-legend .l-blocked{background:#fff7e6;border:1px solid #f0d39a}
.bk-legend .l-members{background:#eef3fb;border:1px solid #c5d6f1}

/* the selection bar */
.bk-bar{position:sticky;bottom:0;z-index:5;background:var(--ink);color:#fff;border-radius:12px 12px 0 0;padding:12px 16px;display:flex;gap:10px 16px;align-items:center;justify-content:space-between;flex-wrap:wrap;box-shadow:0 -6px 20px rgba(0,0,0,.18)}
.bk-bar[hidden]{display:none}
.bk-bar p{margin:0;line-height:1.35}
.bk-bar .btn{background:var(--find,#14804a)}
.bk-bar .btn:hover{background:var(--find-dark,#0d5f36)}
.bk-bar .x{background:none;border:0;color:#fff;opacity:.8;font:inherit;text-decoration:underline;cursor:pointer;padding:0}

/* step 2 and the booking page */
.bk-summary{border:2px solid var(--find,#14804a);border-radius:12px;padding:16px 18px;margin:0 0 18px;background:#f4fbf6}
.bk-summary h2{margin:0 0 4px;font-size:1.35rem}
.bk-summary p{margin:0 0 4px}
.bk-price{font-family:'Roboto Slab',Georgia,serif;font-size:1.7rem;font-weight:700;margin:6px 0 0}
.bk-pay{display:grid;gap:8px;margin:0 0 14px}
.bk-pay label{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-weight:600;margin:0;cursor:pointer}
.bk-pay label small{display:block;font-weight:400;color:var(--muted)}
.bk-pay input{margin-top:5px}
.bk-final{background:#fff7e6;border-left:4px solid #f0a500;padding:10px 14px;border-radius:8px;margin:0 0 14px;font-size:.95rem}
.bk-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:1.4rem;letter-spacing:.12em;background:var(--soft);padding:4px 12px;border-radius:8px;display:inline-block}
.bk-rules{white-space:pre-line}

/* setup */
.bk-hours{display:grid;grid-template-columns:max-content 1fr;gap:6px 12px;align-items:center}
.bk-hours input{max-width:100%}
.bk-courts .ac-tbl td{vertical-align:middle}
.bk-tag{display:inline-block;font-size:.75rem;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--soft);color:var(--muted);margin-left:4px}
.bk-tag.mem{background:#eef3fb;color:var(--mine-dark,#164a96)}
.bk-tag.off{background:#8a929c;color:#fff}
.bk-detail{border:2px solid var(--ink);border-radius:12px;padding:16px 18px;margin:0 0 16px;background:#fff}
.bk-detail h2{margin:0 0 6px;font-size:1.25rem}
@media (max-width:520px){
  .bk-grid td{min-width:68px}
  .bk-grid{font-size:.88rem;border-spacing:3px}
}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ac-form input[type=tel],.ac-form input[type=time]{display:block;width:100%;margin-top:4px;padding:11px 12px;border:1px solid #c9ced6;border-radius:8px;font:inherit;font-weight:400;background:#fff}
.bk-hours input[type=time]{padding:7px 8px}
