#eeHomeGrid.ee-home-booking-grid{grid-auto-rows:minmax(0,1fr)}
#app :is(#view-riders,#view-extra).view{min-height:0;padding-bottom:8px!important}
#app .ee-booking-grid:not(.hidden){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px}
#app .ee-booking-grid button{margin:0;min-height:44px;background:#facc15;color:#002b4d}
#app .ee-attendance-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
#app .ee-attendance-days button{min-width:0;padding:4px 0;margin:0;font-size:.72rem}
#app .ee-attendance-days button[aria-pressed=true]{background:#002b4d;color:white}
#app :is(#riderBooking,#extraBooking) .record p{margin-block:3px}
#app #view-extra a[hidden]{display:none}

/* Keep the service chooser inside the viewport. Individual forms can scroll. */
#app #view-extra:not(.hidden):has(#extraBooking.hidden) {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1vh, 10px);
  min-height: 0;
  padding-block: 6px !important;
}
#app #view-extra:has(#extraBooking.hidden) > .ee-section-hero {
  flex: none;
  margin-block: 0;
}
#app #extraActions:not(.hidden) {
  align-content: start;
  grid-auto-rows: minmax(44px, auto);
  gap: 6px;
  margin-block: 0;
  padding: 6px;
}
#app #extraActions > button {
  padding: 3px 6px;
  font-size: clamp(.78rem, 3.6vw, 1rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
#app #extraActions > [hidden] { display: none; }
@supports not selector(:has(*)) {
  #app #extraActions:not(.hidden) { margin-block: 6px; }
}

/* Use the measured viewport for the nearby map; only the map itself pans. */
#app #view-extra:has(.ee-nearby-active) {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding-block: 6px !important;
  overflow: hidden;
}
#app #view-extra.hidden:has(.ee-nearby-active) { display: none; }
#app #view-extra:has(.ee-nearby-active) > .ee-section-hero,
#app #extraBooking:has(.ee-nearby-active) > :not(.ee-nearby-active),
#app .ee-nearby-active > [hidden] { display: none; }
#app #extraBooking:has(.ee-nearby-active) {
  margin: 0;
  min-height: 0;
  padding: 6px;
}
#app .ee-nearby-active { height: 100%; }
#app .ee-nearby-results {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 5px;
  height: 100%;
}
#app .ee-nearby-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
#app .ee-nearby-results :is(button, select, h3, p) { margin: 0; }
#app .ee-nearby-results p { font-size: .78rem; }
#app .ee-nearby-results select { grid-row: 3; min-width: 0; }
#app .ee-nearby-map {
  grid-row: 4;
  min-height: 0;
  min-width: 0;
  border-radius: 10px;
  background: #edf3f7;
}
#app .ee-nearby-detail {
  grid-row: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: .8rem;
}
#app .ee-nearby-results :is(select, .ee-nearby-map, .ee-nearby-detail)[hidden] { display: none; }

#app :is([data-horse-thumbnail], [data-horse-thumbnail-fallback])[hidden] { display: none !important; }

#app .ee-professional-location-map { height: 260px; max-height: 45dvh; min-height: 180px; border-radius: 12px; }
#app .ee-professional-location-map[hidden] { display: none; }
#app :is(.ee-nearby-map,.ee-professional-location-map) { z-index: 0; }
#app .leaflet-control-attribution { font-size: 10px; background: white; color: #002b4d; }
#app .leaflet-control-attribution a { color: #005d91; }
