/* =====================================================================
   Find a court (search header → venue cards) + the venue profile.
   Mobile first: everything is laid out for a 360px phone, then widened.
   Dark + light themes, LTR + RTL. Colours are tokens from app.css only;
   the page's accent follows the sport through the --fd-* set below.
   ===================================================================== */
.find-page,
.vn-page {
  --fd-r: 10px; --fd-r-lg: 14px; --fd-nav: var(--nav-solid, 72px);
  --fd-panel: var(--surface, var(--bg-1));
  --fd-panel-2: var(--surface-2, var(--bg-2));
  /* all sports together = the brand: padel blue running into football green */
  --fd-ink: var(--brand-blue); --fd-fill: var(--brand-grad); --fd-hover: var(--brand-green);
  --fd-soft: var(--brand-grad-soft); --fd-edge: var(--brand-line); --fd-on: var(--on-brand);
  padding-top: calc(var(--fd-nav) + 14px);
}
/* one sport: the page — and every card and court, whatever the page — takes its colour */
.find-page.is-padel, .find-page.is-football,
.vn-page.is-padel, .vn-page.is-football,
.vcard, .vn-court,
.fd-seg-btn.is-padel, .fd-seg-btn.is-football {
  --fd-ink: var(--sport-2); --fd-fill: var(--sport); --fd-hover: var(--sport-2);
  --fd-soft: linear-gradient(var(--sport-soft), var(--sport-soft)); --fd-edge: var(--sport-line);
}
.fd-seg-btn.is-all { --fd-fill: var(--brand-grad); }

/* ---------- buttons on these two pages ---------- */
.find-page .btn, .vn-page .btn { font-size: 13px; letter-spacing: 0.08em; }
.find-page .btn-sm, .vn-page .btn-sm { height: 44px; padding: 0 16px; font-size: 12.5px; }
.find-page .btn-ghost::after, .vn-page .btn-ghost::after { background: rgba(var(--ink), 0.08); }
.find-page .btn-ghost:hover, .vn-page .btn-ghost:hover { color: var(--text); border-color: var(--fd-edge); box-shadow: none; }
/* the filled action: brand gradient on the all-sports page, the sport's own colour elsewhere */
.find-page .btn-accent, .vn-page .btn-accent { --btn-bg: var(--fd-fill); --btn-fg: var(--fd-on); --btn-bd: transparent; }
.find-page .btn-accent::after, .vn-page .btn-accent::after { background: var(--fd-hover); }
.find-page .btn-accent:hover, .vn-page .btn-accent:hover { color: var(--fd-on); border-color: transparent; box-shadow: none; }
.find-page .input:focus, .find-page .select:focus {
  border-color: var(--fd-ink); background-color: var(--fd-panel); box-shadow: 0 0 0 3px var(--fd-edge);
}

/* ---------- breadcrumbs (venue profile) ---------- */
.fd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-bottom: 8px; font-size: 13px; color: var(--dim); }
.fd-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); transition: color .25s; }
.fd-crumbs a:hover { color: var(--fd-ink); }
.fd-crumbs [aria-current="page"] { color: var(--text); overflow-wrap: anywhere; }
.fd-crumbs span[aria-hidden] { opacity: .45; }

/* ---------- heading + sport switch ---------- */
.fd-hero {
  position: relative; overflow: hidden; display: grid; gap: 14px;
  margin-bottom: 4px; padding: 16px;
  border: 1px solid var(--fd-edge); border-radius: var(--fd-r-lg);
  background-color: var(--fd-panel); background-image: var(--fd-soft);
}
.fd-hero-text, .fd-seg { position: relative; z-index: 1; min-width: 0; }
.fd-title { font-size: clamp(1.45rem, 6vw, 2.5rem); line-height: 1.05; letter-spacing: -0.03em; text-transform: uppercase; overflow-wrap: anywhere; }
.fd-lead { display: none; margin: 10px 0 0; max-width: 58ch; font-size: 15px; line-height: 1.6; color: var(--muted); }
.fd-hero-art { position: absolute; inset-block-start: -22px; inset-inline-end: -18px; display: flex; pointer-events: none; color: var(--fd-ink); opacity: .13; }
.fd-hero-art svg { width: 116px; height: 116px; }
.find-page.is-padel .fd-art-football, .find-page.is-football .fd-art-padel { display: none; }
.find-page.is-all .fd-art-padel { color: var(--brand-blue); }
.find-page.is-all .fd-art-football { color: var(--brand-green); margin-inline-start: -40px; }

.fd-seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--fd-panel);
}
.fd-seg-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 44px; padding: 0 6px;
  border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: color .25s, background-color .25s;
}
.fd-seg-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fd-seg-btn svg { width: 18px; height: 18px; flex: none; }
.fd-seg-btn:hover { color: var(--text); }
.fd-seg-btn.is-active { background: var(--fd-fill); color: var(--fd-on); }

/* ---------- search bar: stays under the nav while the list scrolls (phones) ---------- */
.fd-bar {
  position: sticky; top: var(--fd-nav); z-index: 20;
  display: flex; align-items: center; gap: 8px;
  margin: 0 calc(var(--gutter) * -1) 10px; padding: 10px var(--gutter);
  background: var(--bg); box-shadow: 0 1px 0 var(--line);
}
.fd-q { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.fd-q > svg { position: absolute; inset-inline-start: 14px; width: 18px; height: 18px; color: var(--dim); pointer-events: none; }
.fd-q-input {
  width: 100%; height: 46px; padding-block: 0; padding-inline: 40px 44px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--fd-panel); color: var(--text);
  font-size: 16px; text-overflow: ellipsis; appearance: none; -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.fd-q-input::placeholder { color: var(--dim); }
.fd-q-input::-webkit-search-cancel-button, .fd-q-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.fd-q-input:focus { outline: none; border-color: var(--fd-ink); box-shadow: 0 0 0 3px var(--fd-edge); }
.fd-q-clear { position: absolute; inset-inline-end: 1px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.fd-q-clear svg { width: 16px; height: 16px; }
.fd-q-clear:hover { color: var(--text); }
.fd-tool {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 46px; height: 46px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--fd-panel); color: var(--text);
  font-size: 14px; font-weight: 600; white-space: nowrap; transition: border-color .2s, color .2s;
}
.fd-tool svg { width: 18px; height: 18px; flex: none; }
.fd-tool:hover { border-color: var(--fd-edge); }
.fd-tool[disabled] { opacity: .6; }
.fd-near { padding: 0; }
.fd-near .fd-tool-label { display: none; }
.fd-near.is-on { border-color: var(--fd-edge); background-image: var(--fd-soft); color: var(--fd-ink); }
.fd-near.is-busy svg, .fd-geo[data-state="busy"] .fd-geo-ico svg { animation: fd-pulse 1s ease-in-out infinite; }
.fd-filter-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--fd-fill); color: var(--fd-on); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
@keyframes fd-pulse { 50% { opacity: .35; transform: scale(.86); } }
@keyframes fd-fade { from { opacity: 0; } }

/* ---------- filters: a panel in the page; a bottom sheet on phones (further down) ---------- */
.fd-sheet { margin: 0 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--fd-r-lg); background: var(--fd-panel); }
.fd-sheet-head { display: none; }
.fd-sheet-body { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); align-items: end; }
.fd-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fd-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fd-label svg { width: 14px; height: 14px; flex: none; color: var(--fd-ink); }
.fd-sheet .select, .fd-sheet .input { height: 46px; border-radius: var(--fd-r); font-size: 16px; }
/* the drop-down arrow is drawn here, so it follows the theme and the reading direction */
.fd-pick { position: relative; display: block; }
.fd-pick::after {
  content: ""; position: absolute; top: 50%; inset-inline-end: 16px; width: 8px; height: 8px; margin-top: -6px;
  border: solid var(--muted); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); pointer-events: none;
}
/* (the daylight rule in app.css gives every select its own arrow image; it must not come back here) */
.fd-sheet .select, :root[data-theme="light"] .fd-sheet .select { padding-inline: 14px 36px; background-image: none; text-overflow: ellipsis; }
.fd-sheet .select[disabled] { opacity: .55; }
.fd-price-inputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.fd-price-inputs .input { min-width: 0; padding: 0 12px; text-align: start; }
.fd-check {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--fd-r); font-size: 14px; color: var(--text); cursor: pointer;
}
.fd-check input { flex: none; width: 20px; height: 20px; accent-color: var(--fd-ink); }
.fd-sheet-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 10px; }
.fd-reset { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.fd-reset:hover { color: var(--text); }
.fd-apply b { font-variant-numeric: tabular-nums; }
.js .fd-apply-plain, .no-js .fd-apply-live { display: none; }
.fd-backdrop { display: none; }
/* without JavaScript nothing can open a sheet or ask for a position */
.no-js .fd-near, .no-js .fd-filter-btn, .no-js .fd-geo, .no-js .fd-q-clear, .no-js .fd-cities .fd-search { display: none !important; }

/* ---------- "near me", and what it is for ---------- */
.fd-geo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  margin: 0 0 12px; padding: 12px 14px;
  border: 1px solid var(--fd-edge); border-radius: var(--fd-r-lg);
  background-color: var(--fd-panel); background-image: var(--fd-soft);
}
.fd-geo-ico { display: none; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--fd-fill); color: var(--fd-on); }
.fd-geo-ico svg { width: 20px; height: 20px; }
.fd-geo-text { display: flex; flex: 1 1 130px; flex-direction: column; gap: 2px; min-width: 0; }
.fd-geo-text strong { font-size: 15px; line-height: 1.4; }
/* the privacy line: beside the prompt on phones, always from 620px, and the reason after a refusal */
.fd-geo-text span { display: none; font-size: 13px; line-height: 1.55; color: var(--muted); }
.fd-geo[data-state="busy"] .fd-geo-text span, .fd-geo[data-state="error"] .fd-geo-text span { display: block; }
.fd-geo-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: 8px; min-width: 0; }
.fd-geo-actions .btn { min-width: 0; padding: 0 12px; }
.fd-geo-actions .btn svg { display: none; }
.fd-geo[data-state="ok"] { padding: 8px 12px; border-color: var(--line); background-image: none; }
.fd-geo[data-state="ok"] .fd-geo-ico { display: grid; width: 30px; height: 30px; background: var(--green-soft); color: var(--green); }
.fd-geo[data-state="ok"] .fd-geo-ico svg { width: 16px; height: 16px; }
.fd-geo[data-state="ok"] .fd-geo-text strong { font-size: 14px; font-weight: 600; }
.fd-geo[data-state="ok"] .fd-geo-actions { display: none; }
.fd-geo[data-state="error"] { border-color: var(--line-2); background-image: none; }
.fd-geo[data-state="error"] .fd-geo-ico { background: var(--amber-soft); color: var(--amber); }
.fd-geo[data-state="error"] .fd-geo-text { flex-basis: 100%; }
.fd-geo[data-state="error"] .fd-geo-text span { color: var(--muted); }
.fd-geo[data-state="error"] .fd-geo-actions { flex: 1 1 100%; }
.fd-geo[data-state="error"] .fd-geo-actions .btn { flex: 1 1 130px; }

/* ---------- areas of the chosen city ---------- */
.fd-rail {
  display: flex; gap: 8px; margin: 0 calc(var(--gutter) * -1) 10px; padding: 2px var(--gutter);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
}
.fd-rail::-webkit-scrollbar { display: none; }
.fd-rail-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--fd-panel);
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; scroll-snap-align: start;
  transition: border-color .2s, color .2s;
}
.fd-rail-chip b { font-size: 12.5px; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
.fd-rail-chip:hover { color: var(--text); border-color: var(--fd-edge); }
.fd-rail-chip.is-active { border-color: var(--fd-edge); background-image: var(--fd-soft); color: var(--text); }
.fd-rail-chip.is-active b { color: var(--fd-ink); }

/* ---------- result count + active filters ---------- */
.fd-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 36px; margin: 0 0 12px; }
.fd-count { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 8px 6px; min-width: 0; }
.fd-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 36px; padding-inline: 12px 9px;
  border: 1px solid var(--fd-edge); border-radius: 999px; background-image: var(--fd-soft);
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.fd-chip::before { content: ""; position: absolute; inset: -4px 0; } /* a 44px target around a 36px chip */
.fd-chip span { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-chip svg { flex: none; width: 14px; height: 14px; color: var(--muted); }
.fd-chip:hover svg { color: var(--text); }
.fd-chip-clear { padding-inline: 12px; border-style: dashed; border-color: var(--line-2); background-image: none; color: var(--muted); }
.fd-chip-clear:hover { color: var(--text); }

/* ---------- venue cards ---------- */
.fd-results { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.fd-results.is-busy { pointer-events: none; }
.vcard {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--fd-r-lg); background: var(--fd-panel);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
@media (hover: hover) {
  .vcard:hover { border-color: var(--fd-edge); transform: translateY(-3px); box-shadow: var(--shadow); }
  .vcard:hover .vcard-media img { transform: scale(1.04); }
}
.vcard-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background-color: var(--bg-3); background-image: var(--fd-soft); }
.vcard-media::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; z-index: 2; height: 3px; background: var(--fd-fill); } /* the card's sport */
.vcard-media img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
/* no photo (or one that failed to load): a small drawn court in the sport's colour */
.vcard-art { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fd-ink); }
.vcard-art::before {
  content: ""; position: absolute; inset: 15% 13%; border: 1.5px solid var(--fd-edge); border-radius: 6px;
  background: linear-gradient(var(--fd-edge), var(--fd-edge)) center / 1.5px 100% no-repeat;
}
.vcard-art svg { position: relative; width: 60px; height: 60px; padding: 15px; border: 1.5px solid var(--fd-edge); border-radius: 50%; background: var(--fd-panel); }
.vcard-state, .vcard-shots, .vn-badge {
  position: absolute; top: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--line-2);
  font-size: 12.5px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.vcard-state, .vn-badge { inset-inline-start: 10px; }
.vcard-state::before, .vn-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.vcard-state.is-open::before, .vn-badge.is-open::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.vcard-shots { inset-inline-end: 10px; font-variant-numeric: tabular-nums; }
.vcard-shots svg { width: 14px; height: 14px; }
.vcard-body { display: flex; flex: 1; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; }
.vcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.vcard-name { min-width: 0; font-size: 1.1rem; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.vcard-name a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; transition: color .25s; }
.vcard-name a:hover { color: var(--fd-ink); }
.vcard-rate { flex: none; display: inline-flex; align-items: baseline; gap: 4px; padding-top: 2px; font-size: 13.5px; font-weight: 700; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vcard-rate small { font-size: 12.5px; font-weight: 400; color: var(--dim); }
.vcard-place { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; font-size: 14px; color: var(--muted); }
.vcard-place svg { flex: none; width: 15px; height: 15px; color: var(--dim); }
.vcard-place > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard-dist {
  flex: none; margin-inline-start: auto; padding: 3px 9px; border-radius: 999px; background-image: var(--fd-soft);
  font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--fd-ink); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.vcard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vcard .sport-chip, .vn-page .sport-chip, .vcard-tag, .vn-tag {
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.vcard-tag, .vn-tag { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.vcard-foot { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.vcard-facts { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.vcard-price { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.vcard-price strong { font-size: 1.14rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.vcard-price small { font-size: 12.5px; color: var(--dim); }
.vcard-free { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.vcard-free svg { width: 14px; height: 14px; }
.vcard-free.is-on { color: var(--green); font-weight: 600; }
.vcard-actions { display: flex; gap: 8px; }
.vcard-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
.vcard-actions .btn-accent { flex-grow: 1.5; }
.vcard-skeleton { pointer-events: none; }
.vcard-ph { aspect-ratio: 16 / 9; border-radius: 0; }

/* ---------- nothing to show ---------- */
.fd-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 18px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--fd-r-lg); background: var(--fd-panel);
}
.fd-empty-ico {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%;
  border: 1px solid var(--fd-edge); background-image: var(--fd-soft); color: var(--fd-ink);
}
.fd-empty-ico svg { width: 24px; height: 24px; }
.fd-empty h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }
.fd-empty p { margin: 0; max-width: 46ch; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.fd-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; }
.fd-empty-actions:empty { display: none; }
.fd-empty-actions .btn { flex: 1 1 150px; max-width: 260px; min-width: 0; }

/* ---------- browse by city (under the all-Egypt list) ---------- */
.fd-cities { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.fd-sub-h { margin: 0 0 14px; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; }
.fd-search { max-width: 420px; margin-bottom: 12px; }
.fd-search .input { height: 46px; border-radius: 999px; }
.fd-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); }
.fd-grid-quiet { margin-top: 12px; }
.fd-tile {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 3px; height: 100%; min-height: 64px;
  padding-block: 10px; padding-inline: 14px 38px;
  border: 1px solid var(--line); border-radius: var(--fd-r); background: var(--fd-panel);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.fd-tile:hover, .fd-tile:focus-visible { border-color: var(--fd-edge); background-color: var(--fd-panel-2); }
.fd-tile-name { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.fd-tile-count { font-size: 12.5px; color: var(--muted); }
.fd-tile-go { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); color: var(--fd-ink); }
.fd-tile-go svg { display: block; width: 18px; height: 18px; }
.fd-tile.is-empty { padding-inline-end: 14px; }
.fd-tile.is-empty .fd-tile-name { color: var(--muted); }
.fd-more { margin-top: 14px; }
.fd-more > summary { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; list-style: none; }
.fd-more > summary::-webkit-details-marker { display: none; }
.fd-more > summary::before { content: "+"; margin-inline-end: 8px; color: var(--fd-ink); }
.fd-more[open] > summary::before { content: "−"; }

/* =====================================================================
   The venue profile
   ===================================================================== */
.vn-gallery { margin-bottom: 18px; }
.vn-stage { position: relative; aspect-ratio: 4 / 3; max-height: 520px; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--fd-r-lg); background: var(--bg-3); }
.vn-shot { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .5s var(--ease); }
.vn-shot.is-current { opacity: 1; }
.vn-shot img { width: 100%; height: 100%; object-fit: cover; }
.vn-shot figcaption {
  position: absolute; inset-inline-start: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 6px 10px;
  border-radius: 8px; background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); font-size: 13px; line-height: 1.4;
}
.vn-nav {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); transition: color .25s;
}
.vn-nav:hover { color: var(--fd-ink); }
.vn-nav svg { width: 18px; height: 18px; }
.vn-prev { inset-inline-start: 10px; }
.vn-next { inset-inline-end: 10px; }
[dir="rtl"] .vn-prev svg, [dir="rtl"] .vn-next svg { transform: scaleX(-1); }
.vn-thumbs { display: flex; gap: 8px; margin-top: 10px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.vn-thumb { flex: none; width: 88px; aspect-ratio: 16 / 10; overflow: hidden; border: 2px solid transparent; border-radius: 8px; opacity: .6; transition: opacity .25s, border-color .25s; }
.vn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vn-thumb.is-current { opacity: 1; border-color: var(--fd-ink); }

/* phones: one column, ordered for booking — name, actions, courts, then the rest */
.vn-layout { display: flex; flex-direction: column; gap: 22px; }
.vn-main, .vn-side { display: contents; }
.vn-head { order: 1; }
.vn-actions { order: 2; }
.vn-block-courts { order: 3; }
.vn-block-about { order: 4; }
.vn-block-amenities { order: 5; }
.vn-card-hours { order: 6; }
.vn-card-location { order: 7; }
.vn-stats { order: 8; }
.vn-block-reviews { order: 9; }

.vn-head h1 { overflow-wrap: anywhere; }
.vn-place { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.vn-place svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--fd-ink); }
.vn-place span { min-width: 0; overflow-wrap: anywhere; }
.vn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.vn-tag svg { width: 14px; height: 14px; }
.vn-tag small { font-size: inherit; opacity: .8; }
.vn-tag-price { border-color: var(--fd-edge); background-image: var(--fd-soft); color: var(--fd-ink); gap: 0; }
.vn-tag-free { color: var(--green); }
.vn-page .vn-tag-rating { position: relative; color: var(--gold); }
.vn-page .vn-tag-rating::before { content: ""; position: absolute; inset: -9px 0; }
.vn-block { min-width: 0; }
.vn-h2 { margin-bottom: 12px; font-size: 1.05rem; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; }
.vn-copy { margin: 0; max-width: 62ch; font-size: 15px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.vn-amenities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vn-amenities li {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--fd-panel); font-size: 14px; color: var(--muted);
}
.vn-amenities svg { flex: none; width: 15px; height: 15px; color: var(--fd-ink); }

.vn-courts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.vn-court { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--fd-r-lg); background: var(--fd-panel); }
.vn-court-media { position: relative; aspect-ratio: 16 / 9; background-color: var(--bg-3); background-image: var(--fd-soft); }
.vn-court-media::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--fd-fill); }
.vn-court-media img { width: 100%; height: 100%; object-fit: cover; }
/* the chip sits on a photo: give it a solid base under its tint */
.vn-court-media .sport-chip { position: absolute; top: 10px; inset-inline-start: 10px; background-color: var(--bg); background-image: linear-gradient(var(--sport-soft), var(--sport-soft)); }
.vn-court-body { display: flex; flex: 1; flex-direction: column; gap: 12px; min-width: 0; padding: 14px; }
.vn-court-body h3 { font-size: 1.1rem; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.vn-court-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; overflow: hidden; font-size: 14px; color: var(--muted); } /* hidden: no dot before a wrapped line */
.vn-court-facts li { position: relative; }
.vn-court-facts li + li::before { content: ""; position: absolute; inset-inline-start: -9px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.vn-court-price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.vn-court-price strong { font-size: 1.3rem; color: var(--fd-ink); font-variant-numeric: tabular-nums; }
.vn-court-price small { font-size: 13px; color: var(--dim); }
.vn-peak { padding: 2px 9px; border: 1px solid var(--amber); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--amber); white-space: nowrap; }
.vn-slots { padding-top: 12px; border-top: 1px solid var(--line); }
.vn-slots-label { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.vn-slots .muted { margin: 0; font-size: 14px; }
.vn-slot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vn-slot {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--fd-r); background: var(--fd-panel-2);
  font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: border-color .25s, color .25s;
}
.vn-slot:hover, .vn-slot:focus-visible { border-color: var(--fd-edge); background-image: var(--fd-soft); color: var(--fd-ink); }
.vn-court-body > .btn { margin-top: auto; }
.vn-book-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.vn-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--fd-r-lg); background: var(--fd-panel); }
.vn-actions { display: flex; flex-direction: column; gap: 10px; }
.vn-action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vn-action-row .btn { flex: 1 1 auto; padding: 0 14px; } /* wraps rather than clipping a label */
.vn-map { position: relative; aspect-ratio: 4 / 3; margin: 12px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--fd-r); background: var(--bg-3); }
.vn-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vn-hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.vn-hours th { padding: 9px 0; text-align: start; font-weight: 500; color: var(--muted); }
.vn-hours td { padding: 9px 0; text-align: end; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vn-hours tr + tr th, .vn-hours tr + tr td { border-top: 1px solid var(--line); }
.vn-hours .is-today th, .vn-hours .is-today td { color: var(--fd-ink); font-weight: 700; }
.vn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.vn-stats strong { display: block; font-size: 1.15rem; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.vn-stats span { font-size: 12.5px; color: var(--muted); }
.vn-page .rv-card { background: var(--fd-panel); border-radius: var(--fd-r); }

/* =====================================================================
   Phones only: the filters live in a bottom sheet (when JS can open it)
   ===================================================================== */
@media (max-width: 760px) {
  html.fd-lock, html.fd-lock body { overflow: hidden; }
  .js .fd-sheet {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 80;
    display: flex; flex-direction: column; max-height: 88vh; max-height: 88dvh; margin: 0; padding: 0;
    border: 1px solid var(--line-2); border-bottom: 0; border-radius: 18px 18px 0 0; background: var(--bg-2); box-shadow: var(--shadow);
    transform: translateY(105%); visibility: hidden;
    transition: transform .32s var(--ease), visibility 0s linear .32s;
  }
  .js .fd-sheet.is-open { transform: none; visibility: visible; transition: transform .32s var(--ease), visibility 0s; }
  .js .fd-sheet-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 6px; }
  .js .fd-sheet-head::before { content: ""; position: absolute; top: 8px; inset-inline: 0; width: 40px; height: 4px; margin-inline: auto; border-radius: 999px; background: var(--line-2); }
  .fd-sheet-title { font-size: 1.1rem; }
  .fd-sheet-x { display: grid; place-items: center; width: 44px; height: 44px; margin-inline-end: -8px; border-radius: 50%; color: var(--muted); }
  .fd-sheet-x svg { width: 18px; height: 18px; }
  .js .fd-sheet-body { flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 8px 16px 18px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .js .fd-sheet-foot { justify-content: space-between; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .js .fd-apply { flex: 1 1 auto; max-width: 260px; }
  .js .fd-backdrop { display: block; position: fixed; inset: 0; z-index: 79; background: var(--bg); opacity: .78; animation: fd-fade .25s both; }
}
@media (max-width: 419px) {
  .fd-filter-btn { padding: 0 12px; }
  .fd-filter-btn .fd-tool-label { display: none; }
}
@media (max-width: 349px) {
  .fd-seg-btn svg { display: none; }
}

/* ---------- from large phones up ---------- */
@media (min-width: 620px) {
  .fd-geo { flex-wrap: nowrap; }
  .fd-geo-ico { display: grid; }
  .fd-geo-text, .fd-geo[data-state="error"] .fd-geo-text { flex: 1 1 auto; }
  .fd-geo-text span { display: block; }
  .fd-geo-actions, .fd-geo[data-state="error"] .fd-geo-actions { flex: none; flex-wrap: nowrap; }
  .fd-geo-actions .btn, .fd-geo[data-state="error"] .fd-geo-actions .btn { flex: none; padding: 0 16px; }
  .fd-geo-actions .btn svg { display: block; }
  .vn-stage { aspect-ratio: 16 / 9; }
}

/* ---------- tablets and desktop: filters in a row, nothing pinned ---------- */
@media (min-width: 761px) {
  .find-page, .vn-page { padding-top: calc(var(--fd-nav) + 28px); }
  .fd-hero { gap: 18px; margin-bottom: 16px; padding: 22px 24px; }
  .fd-lead { display: block; }
  .fd-seg { max-width: 440px; }
  .fd-seg-btn { padding: 0 18px; }
  .fd-hero-art svg { width: 150px; height: 150px; }
  .fd-bar { position: static; margin: 0 0 12px; padding: 0; background: none; box-shadow: none; }
  .fd-q { max-width: 460px; }
  .fd-near { padding: 0 16px; }
  .fd-near .fd-tool-label { display: inline; }
  .fd-filter-btn { display: none; }
  .js .fd-apply { display: none; }
  .fd-rail { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; }
  .fd-results { gap: 18px; }
  .fd-empty { padding: 56px 24px; }
  .fd-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
}
@media (min-width: 1000px) {
  /* heading on one side, sport switch on the other */
  .fd-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px 32px; padding: 26px 28px; }
  .fd-seg { min-width: 360px; max-width: none; }
}
@media (min-width: 900px) {
  .vn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
  .vn-main { display: block; min-width: 0; }
  .vn-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--fd-nav) + 16px); }
  .vn-block { margin-top: 30px; }
}

/* ---------- RTL ---------- */
[dir="rtl"] .fd-title { text-transform: none; line-height: 1.3; }
[dir="rtl"] .vn-h2 { text-transform: none; }
[dir="rtl"] .fd-tile-go svg { transform: scaleX(-1); }
/* Arabic labels are set in the page font (Cairo), a size up */
[dir="rtl"] .find-page .btn, [dir="rtl"] .vn-page .btn { font-family: inherit; font-size: 14.5px; font-weight: 700; }
[dir="rtl"] .find-page .btn-sm, [dir="rtl"] .vn-page .btn-sm { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .vcard, .vcard-media img, .fd-sheet, .vn-shot { transition: none !important; }
  .fd-near.is-busy svg, .fd-geo[data-state="busy"] .fd-geo-ico svg, .fd-backdrop { animation: none !important; }
}

/* location help: who you are, then the steps for that phone and browser */
.fd-geo-lead { display: block; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.fd-geo-steps { margin: 0 0 6px; padding: 0; list-style: none; counter-reset: geo; display: grid; gap: 6px; }
.fd-geo-steps li { counter-increment: geo; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.fd-geo-steps li::before { content: counter(geo); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--fd-fill, var(--brand-grad)); color: var(--fd-on, var(--on-brand)); font-size: 12px; font-weight: 700; margin-top: 1px; }
.fd-geo-tail { display: block; font-style: normal; font-size: 13px; color: var(--muted); }
