.eb-weather-map-tools {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.eb-weather-search { width: min(100%, 510px); }
.eb-weather-search > label { display: block; margin-bottom: 6px; color: var(--navy); font-size: 11px; font-weight: 800; }
.eb-weather-search > div { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid #b8c8d5; border-radius: 5px; background: #fff; }
.eb-weather-search > div:focus-within { border-color: #125e9d; box-shadow: 0 0 0 3px rgba(18, 94, 157, .16); }
.eb-weather-search i { color: #667b8d; text-align: center; }
.eb-weather-search input { width: 100%; min-height: 44px; border: 0; outline: 0; color: var(--charcoal); font: inherit; }
.eb-weather-search button { min-height: 44px; padding: 0 18px; border: 0; color: #fff; font-weight: 800; background: var(--navy); }
.eb-weather-search [role="status"] { margin: 5px 0 0; color: #b42318; font-size: 10px; }
.eb-weather-map-actions { display: flex; gap: 8px; }
.eb-weather-map-actions button { min-height: 42px; padding: 0 13px; border: 1px solid #c9d6df; border-radius: 4px; color: var(--navy); font-weight: 800; background: #fff; }
.eb-weather-map-actions button:hover { border-color: #125e9d; color: #125e9d; }

.eb-weather-map-shell { position: relative; min-width: 0; }
.eb-weather-map-status { position: absolute; z-index: 500; top: 12px; left: 50%; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 8px 11px; border: 1px solid #c8d8e4; border-radius: 4px; color: var(--navy); font-size: 10px; font-weight: 800; background: rgba(255, 255, 255, .96); transform: translateX(-50%); }
.eb-weather-map-status[hidden] { display: none; }
.eb-weather-map-status.is-error { border-color: #f2b8b5; color: #9f1c19; }
.eb-weather-map { width: 100%; }
.eb-weather-map .leaflet-interactive:focus { outline: 3px solid #f5b700; outline-offset: 2px; }
.eb-weather-map .leaflet-tooltip.eb-weather-province-label { padding: 2px 4px; border: 0; border-radius: 2px; box-shadow: none; color: #0d2257; font-size: 9px; font-weight: 900; background: rgba(255, 255, 255, .78); }
.eb-weather-map .eb-weather-province-label::before { display: none; }
.eb-weather-map-marker-wrap { overflow: visible !important; }
.eb-weather-map-marker { display: flex; align-items: center; justify-content: center; width: max-content; min-width: 54px; height: 32px; padding: 0 8px; border: 2px solid #fff; border-radius: 16px; box-shadow: 0 2px 8px rgba(13, 34, 87, .28); color: #fff; font-size: 11px; background: #087f5b; }
.eb-weather-map-marker.is-cold { background: #175cd3; }
.eb-weather-map-marker.is-hot { background: #c1121f; }
.eb-weather-map-marker.is-unknown { background: #667b8d; }
.eb-weather-map-marker i { margin-right: 4px; }
.eb-weather-map-marker .name { margin-left: 6px; max-width: 96px; overflow: hidden; color: #fff; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.eb-weather-map-marker-wrap.is-label-hidden .name { display: none; }
.eb-weather-map-marker-wrap.is-capital .eb-weather-map-marker { outline: 3px solid #f5b700; outline-offset: 1px; }

.eb-weather-province-summary { overflow: hidden; border: 1px solid #cbdbe6; border-left: 4px solid #125e9d; border-radius: 5px; background: #fff; }
.eb-weather-province-summary[hidden] { display: none; }
.eb-weather-province-summary > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px 10px; }
.eb-weather-province-summary h2 { margin: 2px 0 0; color: var(--navy); font-family: var(--font-display); font-size: 22px; letter-spacing: 0; }
.eb-weather-province-summary header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.eb-weather-province-summary header > i { color: #125e9d; font-size: 31px; }
.eb-weather-summary-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #e4edf3; border-bottom: 1px solid #e4edf3; }
.eb-weather-summary-facts span { display: grid; gap: 2px; padding: 10px 18px; border-right: 1px solid #e4edf3; }
.eb-weather-summary-facts span:last-child { border-right: 0; }
.eb-weather-summary-facts small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.eb-weather-summary-facts strong { color: var(--navy); font-size: 14px; }
.eb-weather-summary-alert,
.eb-weather-location-alert { display: flex; align-items: flex-start; gap: 7px; padding: 9px 18px; color: #536b7d; font-size: 9px; background: #f5f9fc; }
.eb-weather-summary-alert.has-warning,
.eb-weather-location-alert.has-warning { color: #8d271f; background: #fff2f0; }
.eb-weather-summary-towns { display: flex; gap: 7px; overflow-x: auto; padding: 10px 18px 13px; scrollbar-width: thin; }
.eb-weather-summary-towns button { flex: 0 0 auto; min-height: 36px; padding: 0 11px; border: 1px solid #cbd8e2; border-radius: 18px; color: var(--navy); font-size: 9px; font-weight: 800; background: #fff; }
.eb-weather-summary-towns button:hover,
.eb-weather-summary-towns button.is-active { border-color: #125e9d; color: #fff; background: #125e9d; }

.eb-weather-selected { position: relative; }
.eb-weather-sheet-close { position: absolute; z-index: 2; top: 8px; right: 8px; display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--navy); background: rgba(255, 255, 255, .92); }
.eb-weather-selected > footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 10px 14px; border-top: 1px solid var(--border-lt); color: var(--muted); font-size: 8px; }
.eb-weather-selected > footer a { color: #125e9d; font-weight: 800; }
.eb-weather-location-alert { border-top: 1px solid var(--border-lt); }

.eb-weather-map-tools button:focus-visible,
.eb-weather-provinces button:focus-visible,
.eb-weather-summary-towns button:focus-visible,
.eb-weather-city-button:focus-visible,
.eb-weather-sheet-close:focus-visible { outline: 3px solid #f5b700; outline-offset: 2px; }

@media (max-width: 800px) {
  .eb-weather-map-tools { align-items: stretch; flex-direction: column; }
  .eb-weather-search { width: 100%; }
  .eb-weather-map-actions { justify-content: flex-end; }
  .eb-weather-map-actions button { min-height: 44px; }
  .eb-weather-map-shell .eb-weather-map { min-height: 470px; }
}

@media (max-width: 600px) {
  .eb-weather-map-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .eb-weather-map-actions button { padding: 0 8px; font-size: 10px; }
  .eb-weather-provinces button { min-height: 44px; }
  .eb-weather-province-summary > header { padding: 14px 13px 9px; }
  .eb-weather-summary-facts span { padding: 9px 11px; }
  .eb-weather-summary-alert,
  .eb-weather-summary-towns { padding-right: 13px; padding-left: 13px; }
  .eb-weather-map-shell .eb-weather-map { min-height: 420px; }
  .eb-weather-map .eb-weather-province-label { font-size: 8px; }
  .eb-weather-selected { position: fixed; z-index: 10020; right: 0; bottom: 0; left: 0; display: block; max-height: min(82vh, 690px); overflow-y: auto; border-radius: 8px 8px 0 0; box-shadow: 0 -12px 32px rgba(13, 34, 87, .28); transform: translateY(105%); transition: transform .24s ease; }
  .eb-weather-selected.is-open { transform: translateY(0); }
  .eb-weather-selected > header { padding-right: 56px; }
  .eb-weather-sheet-close { display: grid; place-items: center; }
  .eb-weather-city-button { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .eb-weather-selected { transition: none; }
  .eb-weather-map * { scroll-behavior: auto !important; animation-duration: .01ms !important; }
}
