/* Round 6 browse/map/list styles (WP A1). Loaded after app.css. */
:root {
  /* official Eurovision Burgas 2027 gradient, sampled from the brand key visual (magenta > purple > blue > green arcs) */
  --esc-grad: linear-gradient(135deg, #C4045A 0%, #870F66 24%, #491168 44%, #09165A 62%, #346961 82%, #88EB5C 100%);
}
[hidden] { display: none !important; }
a, button, summary, select, label, .chip { touch-action: manipulation; }

/* ---------- rails: first card on the content gutter, last card gets end padding ---------- */
.rail { scroll-padding-inline: var(--pad); }
.sec-head > .btn { flex: none; }
.sec-head h2 { overflow-wrap: anywhere; }

/* ---------- home hero: actions left, Eurovision shortcut right ---------- */
.hero-actions { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 1fr) clamp(104px, 31%, 132px); gap: 10px; align-items: stretch; max-width: 460px; }
.ha-col { display: grid; gap: 10px; min-width: 0; }
.ha-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding: 12px 16px; border-radius: 20px; text-decoration: none; font-size: 16px; line-height: 1.2; min-width: 0; }
.ha-card b { font-weight: 600; overflow-wrap: anywhere; }
.ha-find { background: var(--sun); color: #fff; }
.ha-map { background: var(--paper); border: 1.5px solid var(--ink); color: var(--ink); justify-content: flex-start; }
.ha-map svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ha-euro { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 22px; color: #fff; text-decoration: none; background: var(--esc-grad); min-width: 0; align-self: stretch; overflow: hidden; }
.ha-e1 { font: 600 12px/1.1 var(--display); letter-spacing: .02em; }
.ha-euro b { font: 700 28px/1 var(--display); letter-spacing: -.03em; }
.ha-e3 { font: 600 11.5px/1.2 var(--body); opacity: .95; overflow-wrap: anywhere; }
@media (max-width: 360px) { .ha-card { font-size: 15px; padding: 10px 12px; } .ha-euro b { font-size: 24px; } }
.hero-all { flex-wrap: wrap; display: flex; gap: 4px 18px; }
.hero-all a { white-space: normal; }

/* ---------- how it works ---------- */
.steps { gap: 12px; }
.step { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 18px; }
.step-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--sun-wash); display: grid; place-items: center; }
.step-ic svg { width: 26px; height: 26px; fill: none; stroke: var(--sun-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.step h3 { font-size: 18px; line-height: 1.25; display: flex; gap: 8px; align-items: baseline; }
.step .step-n { font: 600 13px var(--display); font-style: normal; color: var(--sun-ink); flex: none; }
.step p { margin-top: 4px; font-size: 15px; }
@media (min-width: 761px) { .step { grid-template-columns: 1fr; align-items: start; padding: 24px; } }

/* ---------- town cards: legible text on any photo ---------- */
.town-card::after { background: linear-gradient(180deg, rgba(10,26,36,.05) 0%, rgba(10,26,36,.35) 38%, rgba(10,26,36,.92) 100%); }
.town-card h3 { font-size: 24px; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.town-card p { opacity: 1; color: #fff; font-size: 14.5px; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.town-card .tc-stats span { background: rgba(10,26,36,.55); border: 1px solid rgba(255,255,255,.22); }

/* ---------- Eurovision: official gradient + clean date badges ---------- */
.band-euro { background: var(--esc-grad); }
.band-euro .eyebrow { color: #E7F9D8; }
.band .dates { gap: 8px; }
.band .date { padding: 12px 8px 12px 12px; background: rgba(9,22,90,.38); border-color: rgba(255,255,255,.3); display: grid; gap: 4px; align-content: start; }
.band .date .d-top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; line-height: 1; }
.band .date b { display: inline; font: 700 30px/1 var(--display); }
.band .date i { font: 600 13px var(--body); font-style: normal; opacity: .92; }
.band .date .d-lbl { font-size: 12.5px; line-height: 1.25; opacity: .95; overflow-wrap: anywhere; hyphens: auto; }
.band .date .d-lbl { hyphens: manual; overflow-wrap: normal; }
@media (max-width: 520px) {
  .band .dates { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .band .date { display: flex; align-items: baseline; gap: 12px; padding: 10px 16px; }
  .band .date .d-top { flex: none; min-width: 92px; }
  .band .date b { font-size: 28px; }
  .band .date .d-lbl { font-size: 14px; }
}

/* ---------- footer ---------- */
.foot .nb { white-space: nowrap; }

/* ---------- results bar: "95 homes · Newest first ⌄" on one row ---------- */
.res-bar { flex-wrap: nowrap; padding: 12px 0; }
.res-line { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.res-bar .count { font-weight: 700; white-space: nowrap; }
.res-dot { color: var(--ink-3); }
.sortchip { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; max-width: 100%; min-width: 0; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font: 600 14px var(--body); color: var(--sea-ink); cursor: pointer; }
.sortchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sortchip svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sortchip select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; }
.res-bar .view-toggle { flex: none; }
@media (max-width: 760px) {
  .res-bar .view-toggle { padding: 0; background: none; }
  .res-bar .view-toggle [data-view="list"] { display: none; }
  .res-bar .view-toggle [data-view="map"] { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); background: var(--paper); box-shadow: none; }
  .res-bar .view-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
}
@media (max-width: 400px) { .res-bar .view-toggle [data-view="map"] { font-size: 0; gap: 0; padding: 0 11px; } }
#rnote { margin: 10px 0 0; }

/* ---------- list-card photo strip (swipe, no arrows) ---------- */
.card-media .cstrip { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.card-media .cstrip::-webkit-scrollbar { display: none; }
.card-media .cstrip img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; scroll-snap-stop: always; -webkit-user-drag: none; user-select: none; transition: none; }
.card:hover .cstrip img { transform: none; }
.cdots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.cdots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 0 .5px rgba(0,0,0,.25); }
.cdots i.on { background: #fff; transform: scale(1.25); }
.card-media { contain: paint; }

/* ---------- filter sheet extras ---------- */
.info-tap { margin-top: 10px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--sea-ink); font: 600 14px var(--body); text-align: left; display: inline-flex; gap: 6px; align-items: center; }
.info-body { margin-top: 4px; line-height: 1.5; color: var(--ink-2); font-size: 13.5px; }

/* ---------- MAP ---------- */
.map-cards[hidden] { display: none; }
.map-tip, .mb-full { display: none !important; }
.leaflet-control-attribution { font-size: 9px !important; padding: 0 4px !important; line-height: 1.5; }
.map-bar .mb { display: inline-flex; }
.map-bar .mb.on, .mf-round.on { background: var(--ink); color: #fff; }
.mf-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: 0 1px 6px rgba(0,0,0,.28); pointer-events: auto; }
.mf-seg button { min-height: 40px; min-width: 64px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font: 600 14px var(--body); color: var(--ink); }
.mf-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mf-places { pointer-events: auto; background: rgba(255,255,255,.97); border-radius: 18px; box-shadow: 0 4px 18px rgba(0,0,0,.28); padding: 10px 12px 10px; max-width: 100%; display: grid; gap: 8px; }
.mf-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mf-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--line-2); font-size: 22px; line-height: 1; }
.mf-places .poi-chips { flex-wrap: wrap; overflow: visible; padding: 0; }
.mf-places .map-legend { background: none; padding: 0; color: var(--ink-3); font-size: 12px; }
.map-ui { display: grid; gap: 8px; }
.map-ui .map-bar { gap: 8px; }

@media (max-width: 760px) {
  html.map-lock, html.map-lock body { overflow: hidden !important; overscroll-behavior: none; height: 100%; }
  body.map-lock { padding-bottom: 0; }
  .mapfs { position: fixed; inset: 0; z-index: 55; height: auto !important; border: 0; border-radius: 0; touch-action: none; overscroll-behavior: contain; background: var(--sea-wash); }
  .mapfs .map-box, .mapfs .leaflet-container { touch-action: none; }
  .mf-top { position: absolute; z-index: 700; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top)); display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; pointer-events: none; }
  .mf-top .mf-seg { justify-self: center; }
  .mf-round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.97); box-shadow: 0 1px 8px rgba(0,0,0,.3); display: grid; place-items: center; color: var(--ink); position: relative; pointer-events: auto; padding: 0; }
  .mf-round svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mf-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--sun); color: #fff; font: 700 11px/20px var(--body); text-align: center; }
  .mf-side { position: absolute; z-index: 700; right: 10px; top: calc(74px + env(safe-area-inset-top)); display: grid; gap: 10px; }
  .mapfs .mf-places { position: absolute; z-index: 710; left: 10px; right: 70px; top: calc(74px + env(safe-area-inset-top)); max-height: 60%; overflow: auto; touch-action: pan-y; }
  .mapfs .map-cards { position: absolute; z-index: 700; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); touch-action: pan-x; }
  .mapfs .map-cards .mc { flex-basis: min(86vw, 330px); }
  .mf-empty { position: absolute; z-index: 700; left: 12px; right: 12px; bottom: calc(24px + env(safe-area-inset-bottom)); margin: 0; padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.25); font-weight: 600; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
  .mf-empty button { min-height: 40px; border: 0; border-radius: 999px; padding: 0 14px; background: var(--ink); color: #fff; font-weight: 600; }
  .mapfs .leaflet-bottom.leaflet-left { bottom: 0; }
  .mapfs .map-cards:not([hidden]) ~ .leaflet-bottom { display: none; }
}
@media (min-width: 761px) { .mf-top, .mf-side { display: none; } .map-bar .mf-seg { margin-left: auto; } }
@media (max-width: 760px) { .map-bar { display: none; } }

/* desktop map keeps the list beside it */
@media (min-width: 1024px) { .map-ui .mf-places { max-width: 420px; } }

/* hero map: Arena Burgas marker, official gradient, comfortable tap area */
.coast .poi.euro .mk { fill: url(#escG); stroke: #fff; stroke-width: 3px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.coast .poi.euro .hit { fill: transparent; }
.coast .poi.euro text { font-size: 24px; fill: #3B1E8C; stroke-width: 6px; }
.view-toggle button { display: inline-flex; align-items: center; gap: 6px; }
.view-toggle svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

.no-reveal .reveal { opacity: 1; transform: none; transition: none; }
