/* Weather scenes: one photographic palette, with quiet surfaces for route data. */
.weather-scene-fog { --weather-image: url('/images/weather-fog.webp'); }
.weather-scene-storm { --weather-image: url('/images/weather-storm.webp'); }
.weather-scene-rain { --weather-image: url('/images/storm-runway-960.webp'); }
.weather-scene-snow { --weather-image: url('/images/weather-snow.webp'); }
.weather-scene-wind { --weather-image: url('/images/weather-wind.webp'); }
.weather-scene-ceiling { --weather-image: url('/images/weather-fog.webp'); --weather-position: center 18%; --weather-size: 160% auto; }

.planner-heading {
  min-height: 112px;
  margin: -1.5rem -1.5rem 1.5rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #354a5c;
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(90deg, #0a192bf5 15%, #0a192bc9 65%, #0a192ba3), url('/images/weather-fog.webp') center 45% / cover, #13283d;
}
.planner-heading h2 { color: #f5faff; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -.035em; }
.planner-data-status { padding: .65rem .8rem; border: 1px solid #afcfe52b; border-radius: 10px; background: #091827b8; }
.planner-toolbar { background: #0c1b2ab3; border-color: #2c4153; }
#secondary-filter-bar { padding-block: .25rem .8rem; }
#hazard-filter-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; margin-top: .6rem; padding-top: 1.2rem; border-top: 1px solid #2c4356; }
.weather-selection-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .15rem; }
.weather-selection-heading h3 { color: #edf6fc; font-size: 1rem; font-weight: 600; letter-spacing: -.015em; }
.weather-selection-heading p { margin-top: .15rem; color: #adc1d0; font-size: .75rem; }
#hazard-filter-all { background: transparent; color: #c7e4f3; border-color: #455f73; border-radius: 8px; }

.hazard-chip.weather-tile {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 132px;
  padding: .8rem;
  overflow: hidden;
  white-space: normal;
  border: 1px solid #4b6275;
  border-radius: 12px;
  background: #192d42;
  color: #edf5fa;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.weather-tile::before, .weather-guide::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: var(--weather-image);
  background-position: var(--weather-position, center);
  background-size: var(--weather-size, cover);
  transition: transform .25s ease, opacity .18s ease;
}
.weather-tile::after, .weather-guide::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, #07132110 20%, #07132155 48%, #071321f5 100%);
}
.hazard-chip.weather-tile.active { border-color: #acd7e9; box-shadow: inset 0 0 0 1px #acd7e93d; color: #fff; }
.hazard-chip.weather-tile:not(.active)::before { opacity: .45; }
.hazard-chip.weather-tile:hover { border-color: #e0f5ff; background: #192d42; }
.weather-tile:hover::before, .weather-guide:hover::before { transform: scale(1.035); }
.weather-tile:focus-within { outline: 2px solid #e0f5ff; outline-offset: 3px; }
.hazard-chip.weather-tile input[type=checkbox] { position: absolute; top: .65rem; right: .65rem; width: 18px; height: 18px; margin: 0; border-color: #c6dae8; background: #0b1c30b8; opacity: 1; }
.hazard-chip.weather-tile input[type=checkbox]:checked { background: #c2e7f7; border-color: #c2e7f7; }
.hazard-chip.weather-tile.active input[type=checkbox]::after { left: 5px; top: 2px; }
.weather-tile-label { display: flex; align-items: center; gap: .4rem; color: #f4f9fc; font-size: .8rem; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 3px #071321; }
.weather-tile-label iconify-icon { flex-shrink: 0; color: #d3e9f5; font-size: 1.1rem; }
.hazard-chip.weather-tile .hazard-count { position: absolute; top: .65rem; left: .65rem; display: inline; min-width: 1.4rem; margin: 0; padding: .2rem .4rem; border: 1px solid #c3dcee40; background: #0b1c30d9; color: #e6f3fa; font-size: .7rem; line-height: 1.1; }
.hazard-chip.weather-tile .hazard-count:empty { display: none; }
.weather-tile .hazard-count::before { content: 'Routes'; margin-right: .25rem; font-family: var(--font-ui); font-size: .62rem; }
.results-toolbar { margin-top: 1.5rem; padding-top: 1.2rem; }
#route-count-summary { font-size: 1rem; }
#routes-table { border: 1px solid #2c4356; }
#routes-table thead { background: #182d40; }
#routes-table .route-summary-row > td { padding-block: 1.15rem; }
.route-airport strong { font-size: 1.05rem; }
.route-card { border-radius: 14px; }
.route-card-heading { margin: -1rem -1rem 0; padding: 1rem; border-bottom: 1px solid #385266; border-radius: 14px 14px 0 0; background: linear-gradient(125deg, #233e52, #172d40); }
.route-card-timing { border-top: 0; }

.guide-card.weather-guide { isolation: isolate; overflow: hidden; justify-content: flex-end; min-height: 260px; padding: 1.5rem 2.7rem 1.5rem 1.5rem; background: #14283c; border-color: #40586c; border-radius: 16px; }
.weather-guide::after { background: linear-gradient(180deg, #07132105, #07132145 28%, #071321ed 74%, #071321 100%); }
.guide-card.weather-guide:hover { background: #14283c; border-color: #add7e8; }
.weather-guide strong { max-width: 22ch; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.02em; }
.guide-card.weather-guide > span:not(.guide-arrow) { color: #c0d0dc; }
.weather-guide .guide-arrow { display: grid; place-items: center; top: 1rem; right: 1rem; width: 2rem; height: 2rem; border: 1px solid #c1d9e64d; border-radius: 50%; background: #0a1b2cb3; color: #eef8fe; }
.benefit-card { background: transparent; border-left: 1px solid #314a5e; border-radius: 0; }
.benefit-icon { background: #1b3348; }
.section-head h2 { max-width: 30ch; }
@media (max-width: 1100px) and (min-width: 768px) {
  #hazard-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hazard-chip.weather-tile { min-height: 120px; }
}
@media (min-width: 768px) and (max-width: 900px) {
  .guide-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-card.weather-guide { padding: 1.25rem; }
}
@media (max-width: 767px) {
  .planner-heading { min-height: 0; margin: -1rem -1rem 1rem; padding: 1.35rem 1rem; }
  .planner-data-status { padding: 0; background: transparent; border: 0; }
  #hazard-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding-top: 1rem; }
  .hazard-chip.weather-tile { min-height: 112px; }
  .weather-tile-label { font-size: .82rem; }
  .weather-selection-heading { align-items: center; gap: .5rem; }
  .weather-selection-heading h3 { font-size: .93rem; }
  #hazard-filter-all { min-height: 44px; padding-inline: .55rem; white-space: nowrap; }
  .guide-card.weather-guide { min-height: 230px; }
  .benefits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefit-card { padding: .5rem .85rem; }
}
@media (max-width: 380px) {
  .weather-tile-label { width: 100%; flex-direction: column; align-items: flex-start; gap: .25rem; font-size: .75rem; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .weather-tile::before, .weather-guide::before { transition: none; }
  .weather-tile:hover::before, .weather-guide:hover::before { transform: none; }
}
