/* ===========================================================
   VENUES (Find a Venue) — Bauhaus / hard edges / slick + sharp
   - Desktop: map left (wider), controls right
   - Map + panel: matched heights
   - Filters: county + postcode radius (apply/clear)
   - Cards below (filtered)
   =========================================================== */

:root{
  --accent:#e11d48;
  --ink:#0f0f10;
  --muted:rgba(15,15,16,.72);
  --line:rgba(15,15,16,.12);
  --wash:rgba(15,15,16,.04);

  --radius:0px;                 /* hard edges */
  --shadow:0 18px 40px rgba(0,0,0,.10);

  --maxw: 1360px;
  --pad: 18px;
}

/* Page shell */
.venues-page{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px var(--pad) 64px;
  color: var(--ink);
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}

/* Hero */
.venues-hero{
  padding: 10px 0 22px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.venues-hero h1{
  margin: 0 0 10px;
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.venues-hero p{
  margin: 10px auto 0;
  max-width: 900px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

/* Top grid: map + panel */
.venues-top{
  margin-top: 18px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr; /* mobile */
}

/* ✅ Desktop: map a bit wider + equal heights */
@media (min-width: 980px){
  .venues-top{
    grid-template-columns: 1.25fr .75fr; /* map wider than panel */
    align-items: stretch;                /* equal height columns */
  }
}

/* Map */
.venues-map{
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;

  /* ✅ allow Leaflet to fill height */
  display: flex;
  min-height: 520px;
}

#venue-map{
  width: 100%;
  height: 100%;        /* ✅ fill container height */
  min-height: 520px;   /* ✅ ensure tall map */
}

/* Panel */
.venues-panel{
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 16px;

  /* ✅ match map min-height */
  min-height: 520px;
}

.venues-panel__title{
  margin: 0 0 8px;
  font-weight: 950;
  letter-spacing: .02em;
  font-size: 16px;
}

.venues-panel__meta{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.venues-form{
  display: grid;
  gap: 12px;
}

.form-row{
  display: grid;
  gap: 8px;
}

.form-row label{
  font-weight: 950;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.input,
.select{
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.input:focus,
.select:focus{
  border-color: rgba(225,29,72,.45);
  box-shadow: 0 0 0 3px rgba(225,29,72,.16);
}

/* invalid input state (used by postcode error UI) */
.input.is-invalid{
  border-color: rgba(225,29,72,.75);
  box-shadow: 0 0 0 3px rgba(225,29,72,.18);
}

/* inline error */
.form-error{
  margin-top: -2px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(225,29,72,.95);
  font-weight: 800;
}

/* Radius row */
.range-row{
  display: grid;
  gap: 8px;
}

.range-row.is-disabled{
  opacity: .55;
  pointer-events: none;
}

.range-top{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.range-top .value{
  font-weight: 950;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .02em;
}
.range{
  width: 100%;
}

.actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Buttons (match home.css feel) */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0 18px;
  border-radius: var(--radius);
  font-weight:950;
  text-decoration:none;
  border:1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover{
  background: #d4143f;
  border-color: #d4143f;
}
.btn-primary:disabled{
  opacity: .55;
  cursor: not-allowed;
}
.btn-secondary{
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.btn-secondary:hover{ background: rgba(0,0,0,.02); }

.btn-ghost{
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.btn-ghost:hover{
  background: rgba(0,0,0,.02);
  color: var(--ink);
}

/* Result count */
.venues-count{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.venues-count strong{ color: var(--ink); }

/* Cards */
.venues-cards{
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.venues-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 980px){
  .venues-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .venues-grid{ grid-template-columns: 1fr; }
}

.venue-card{
  display:block;
  text-decoration:none;
  color: inherit;
}

.venue-card__media{
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  position: relative;
  transform: translateZ(0);
  transition: transform .12s ease;
}

.venue-card__media img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* Hover cue */
.venue-card__media::after{
  content:"Visit →";
  position:absolute;
  left:10px;
  bottom:10px;
  padding:6px 10px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,15,16,.18);
  color: var(--ink);
  font-weight: 950;
  font-size: 12px;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}

.venue-card:hover .venue-card__media{
  transform: scale(1.012);
}
.venue-card:hover .venue-card__media::after{
  opacity: 1;
  transform: translateY(0);
}

.venue-card__body{
  padding-top: 10px;
}

.venue-card__name{
  margin: 0;
  font-weight: 950;
  line-height: 1.15;
}

.venue-card__meta{
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-card__distance{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(15,15,16,.62);
  letter-spacing: .02em;
  display: none;
}
.venue-card--show-distance .venue-card__distance{
  display: block;
}

/* Hidden state when filtered out */
.is-hidden{
  display:none !important;
}

/* Leaflet popup tweaks to match */
.leaflet-popup-content{
  margin: 8px 10px;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}

.venue-popup{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items:center;
  max-width: 360px;
}

.venue-popup img{
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--wash);
}

.venue-popup h4{
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
  color: var(--ink);
}

.venue-popup a.btn{
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 950;
  font-size: 13px;
}
.venue-popup a.btn:hover{
  background: rgba(0,0,0,.02);
}

/* Mobile map height */
@media (max-width: 560px){
  .venues-map{ min-height: 360px; }
  #venue-map{ min-height: 360px; }
}


.venues-hero-signup{
  margin-top: 10px;
  font-size: 14px;
  color: rgba(15,15,16,.72);
}

.venues-hero-signup a{
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  border-bottom: 2px solid rgba(225,29,72,.35);
  padding-bottom: 1px;
}

.venues-hero-signup a:hover{
  border-bottom-color: var(--accent);
}
