@font-face { font-family: 'Manrope'; src: url('/assets/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Anton'; src: url('/assets/anton.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* Layout follows the club booking app members already use; colours are RacqEd's. */
:root {
  --navy: #0B1A44;
  --navy-2: #13245A;
  --lime: #CFEA3B;
  --ink: #16182A;
  --grey: #6A6E7E;
  --grey-2: #9A9DAA;
  --bg: #F2F2F4;
  --tile: #E9EAEE;
  --white: #FFFFFF;
  --line: #DCDDE3;
  --focus: #7FD3F2;
  --ok-bg: #E2F3E6; --ok: #22744A;
  --warn-bg: #F8F0CC; --warn: #76630F;
  --full-bg: #EEE6EA; --full: #92304F;
  --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.45; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Top bar: round buttons either side of the venue name */
.bar { background: var(--white); display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 10px; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--tile); display: grid; place-items: center; cursor: pointer; color: var(--ink); padding: 0; text-decoration: none; }
.round.brand { overflow: hidden; background: var(--navy); }
.round.brand img { width: 48px; height: 48px; }
.venue { text-align: center; line-height: 1; }
.venue h1 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 30px; letter-spacing: 0.02em; margin: 0; }
.venue span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey); margin-top: 4px; }

/* Day tiles and filter pills */
.sticky { position: sticky; top: 0; z-index: 5; background: var(--white); padding: 4px 0 0; box-shadow: 0 1px 0 var(--line); }
.days, .filters { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.days::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
.days { padding-bottom: 10px; }
.day { flex: 0 0 auto; border: 0; border-radius: 12px; background: var(--tile); padding: 10px 14px; min-width: 88px; text-align: center; cursor: pointer; }
.day b { display: block; font-size: 17px; font-weight: 800; }
.day small { display: block; font-size: 13px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: 0.02em; }
.day[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.day[aria-pressed="true"] small { color: var(--lime); }
.day .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); margin-left: 4px; vertical-align: middle; }
.filters { background: var(--bg); padding-top: 10px; padding-bottom: 10px; }
.filters button { flex: 0 0 auto; min-height: 44px; border: 0; border-radius: 999px; background: var(--white); padding: 10px 18px; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(22, 24, 42, 0.08); }
.filters button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

/* Game cards */
main { max-width: 720px; margin: 0 auto; padding: 4px 16px 16px; }
.admin-bar { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 700; margin: 8px 0; }
.day-head { font-size: 14px; font-weight: 800; color: var(--grey); margin: 18px 4px 8px; }
.empty { text-align: center; color: var(--grey); padding: 40px 16px; }
.empty b { display: block; font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.empty .cta { max-width: 260px; margin: 16px auto 0; }

.card { width: 100%; text-align: left; border: 0; background: var(--white); border-radius: 16px; padding: 18px 16px; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 0; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(22, 24, 42, 0.06); cursor: pointer; }
button.card:active { transform: scale(0.995); }
.when { border-right: 1.5px solid var(--line); padding-right: 10px; margin-right: 16px; display: flex; flex-direction: column; justify-content: center; }
.when .time { font-family: var(--font-display); font-size: 31px; line-height: 1; letter-spacing: 0.01em; }
.when .len { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--grey); margin-top: 8px; white-space: nowrap; }
.when .len svg { flex: 0 0 auto; }
.info { min-width: 0; }
.title-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 10px; }
.title { font-weight: 800; font-size: 20px; line-height: 1.2; margin: 0; flex: 1 1 140px; }
.badge { flex: 0 0 auto; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.full { background: var(--full-bg); color: var(--full); }
.badge.me { background: var(--lime); color: var(--navy); }
.detail { font-size: 15px; color: var(--grey); margin: 8px 0 0; }

/* Bottom sheets */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(22, 24, 42, 0.45); }
.sheet { width: 100%; max-width: 560px; margin: auto auto 0; border-radius: 28px 28px 0 0; background: var(--bg); padding: 10px 16px calc(22px + env(safe-area-inset-bottom, 0px)); max-height: 94vh; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.sheet.small { max-width: 420px; }
@media (min-width: 600px) { .sheet { margin: auto; border-radius: 28px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet h2 { font-size: 30px; font-weight: 800; margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
.close { background: var(--white); }
.sheet-date { font-size: 18px; color: var(--grey); margin: 14px 0 10px; }
.sheet .card { cursor: default; margin-bottom: 14px; }

.field { display: block; font-weight: 700; font-size: 14px; margin-top: 12px; }
.field input, .field select { display: block; width: 100%; margin-top: 4px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); font-size: 16px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; margin-top: 14px; }
.check input { width: 22px; height: 22px; accent-color: var(--navy); }
.opt { font-weight: 500; color: var(--grey); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.policy { font-size: 14px; color: var(--grey); margin: 10px 2px 0; }
.form-error { color: var(--full); font-weight: 700; font-size: 14px; margin: 8px 2px 0; min-height: 1.4em; }

.cta { display: block; width: 100%; border: 0; border-radius: 16px; background: var(--navy); color: var(--white); padding: 18px; margin-top: 10px; font-size: 18px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; text-align: center; text-decoration: none; }
.cta:disabled { opacity: 0.4; cursor: not-allowed; }
.cta.outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.cta.outline.danger-text { color: var(--full); box-shadow: inset 0 0 0 2px var(--full); }
.cta.danger { background: var(--full); }
.text-btn { display: block; margin: 12px auto 0; border: 0; background: none; color: var(--navy); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 6px; }
.sheet.small h2 { font-size: 24px; }
.sheet.small p { margin: 10px 0 6px; color: var(--grey); }

/* Details page */
.details { width: 100%; max-width: 640px; height: 100%; max-height: 100%; height: 100dvh; max-height: 100dvh; margin: 0 auto; background: var(--white); overflow-y: auto; overscroll-behavior: contain; }
.details[open] { display: flex; flex-direction: column; }
.hero { position: relative; aspect-ratio: 16 / 11; max-height: 46vh; width: 100%; background: var(--navy); flex: 0 0 auto; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%); }
.hero .back { position: absolute; z-index: 1; top: calc(14px + env(safe-area-inset-top, 0px)); left: 16px; background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(6px); }
.hero h2 { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 16px; margin: 0; color: var(--white); font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 9vw, 46px); line-height: 1.05; text-align: center; }
.seg { display: grid; grid-template-columns: 1fr 1fr; margin: 16px; background: var(--tile); border-radius: 999px; padding: 4px; flex: 0 0 auto; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 10px; font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: 0.02em; cursor: pointer; color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--white); box-shadow: 0 0 0 1.5px var(--grey-2); }
.d-body { padding: 0 16px 8px; flex: 1 0 auto; }
.d-body h3 { font-size: 20px; font-weight: 800; margin: 4px 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.tags li { background: var(--tile); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.d-body p { font-size: 17px; line-height: 1.55; margin: 0 0 12px; }
.d-body .small { font-size: 14px; color: var(--grey); }
.d-body .links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 8px; }
.d-body .links a, .d-body .links button { border: 0; background: none; padding: 6px 0; font-weight: 700; color: var(--navy); text-decoration: underline; cursor: pointer; font-size: 15px; }
.d-body .links .danger-text { color: var(--full); }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 600; }
.plist .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--tile); display: grid; place-items: center; font-weight: 800; color: var(--navy); flex: 0 0 auto; }
.plist .me .avatar { background: var(--lime); }
.plist .open { color: var(--grey-2); font-weight: 500; }
.plist .open .avatar { background: transparent; border: 1.5px dashed var(--line); }
.plist .tagline { font-size: 13px; color: var(--grey); font-weight: 600; }
.plist .x { margin-left: auto; min-height: 40px; border: 0; background: var(--tile); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.d-foot { position: sticky; bottom: 0; z-index: 2; background: var(--bg); padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); flex: 0 0 auto; box-shadow: 0 -6px 16px rgba(22, 24, 42, 0.06); }
.d-foot .card { display: none; }
.d-foot .sheet-date { margin: 0 0 2px; font-size: 15px; }
.d-foot .sheet-date { margin-top: 0; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--white); padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px; z-index: 50; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }

.foot { max-width: 720px; margin: 0 auto; padding: 8px 16px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--grey); text-align: center; }

/* Simple pages (locked, privacy, paid) */
.page { max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }
.page h1 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(36px, 9vw, 52px); line-height: 1.05; margin: 0 0 12px; }
.page h2 { font-size: 18px; margin: 24px 0 4px; }
.page .card { cursor: default; }

/* Waiting list and offers */
.notice { background: var(--white); border-left: 4px solid var(--lime); border-radius: 12px; padding: 12px 14px; font-size: 15px; margin: 0 0 4px; }
.d-body h3.gap { margin-top: 24px; }
.tags li:first-child { background: var(--navy); color: var(--white); }


/* Mobile polish */
.grab { width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 12px; }
.sheet.dragging { transition: none; }
.sheet.settling { transition: transform 0.2s ease-out; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes page-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-up 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .details[open] { animation: page-in 0.22s ease-out; }
  dialog[open]::backdrop { animation: fade-in 0.2s ease-out; }
}
.skeleton { height: 108px; border-radius: 16px; margin-bottom: 12px; background: linear-gradient(90deg, var(--white) 0%, var(--tile) 50%, var(--white) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.filters .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--lime); color: var(--navy); font-size: 12px; font-weight: 800; }
.install-tip { display: flex; align-items: center; gap: 10px; background: var(--navy); color: var(--white); border-radius: 14px; padding: 10px 8px 10px 14px; font-size: 14px; margin: 4px 0 12px; }
.install-tip button { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: var(--white); font-size: 20px; cursor: pointer; }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.actions-row .cta { margin-top: 0; font-size: 15px; padding: 14px 10px; letter-spacing: 0.03em; }
button, a, .card { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* Padel / tennis switch */
.sports { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 16px 10px; background: var(--tile); border-radius: 999px; padding: 4px; max-width: 420px; }
.sports button { border: 0; background: transparent; border-radius: 999px; min-height: 40px; padding: 8px 6px; font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; color: var(--ink); }
.sports button[aria-selected="true"] { background: var(--navy); color: var(--white); }
@media (min-width: 452px) { .sports { margin-inline: auto; } }
