@layer pages {
/*--------------------*/
/* COUNTY PAGE STYLES */
/*--------------------*/

/* Responsive county alert tray and detail viewer */
.county-alert-ui,
.county-alert-ui * {
  box-sizing: border-box;
}

html.county-alert-modal-open,
html.county-alert-modal-open body {
  overflow: hidden;
}

.county-alert-summary {
  display: none;
}

.county-alert-rail {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 10px 0;;
}

.county-alert-chip,
.county-alert-view-all,
.county-alert-summary {
  border: 0;
  font: inherit;
}

.county-alert-chip {
  display: flex;
  min-width: 0;
  min-height: 54px;
  flex: 1 1 0;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(171, 198, 218, 0.46);
  border-left: 5px solid var(--county-alert-color, #dc3545);
  border-radius: 9px;
  background: #0a1f34;
  color: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 12px rgba(4, 10, 16, 0.18);
}

.county-alert-chip > i {
  flex: 0 0 auto;
  color: var(--county-alert-color, #dc3545);
  font-size: 1.12rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.65));
}

.county-alert-chip-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.county-alert-chip-copy strong,
.county-alert-chip-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.county-alert-chip-copy strong {
  font-size: 0.82rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.county-alert-chip-copy span {
  color: #bdd0df;
  font-size: 0.7rem;
}

.county-alert-chip:hover,
.county-alert-chip:focus-visible,
.county-alert-view-all:hover,
.county-alert-view-all:focus-visible {
  border-color: #fff200;
  background: #102f4d;
}

.county-alert-chip:focus-visible,
.county-alert-view-all:focus-visible,
.county-alert-summary:focus-visible {
  outline: 2px solid #fff200;
  outline-offset: 2px;
}

.county-alert-view-all {
  display: flex;
  min-width: 112px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(171, 198, 218, 0.46);
  border-radius: 9px;
  background: #0a1f34;
  color: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.county-alert-view-all span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #fff200;
  color: #071b2e;
  font-size: 0.72rem;
}

.county-alert-panel[hidden] {
  display: none;
}

.county-alert-panel {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.county-alert-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(171, 198, 218, 0.35);
  border-left: 5px solid var(--county-alert-color, #dc3545);
  border-radius: 9px;
  background: #0a1f34;
}

.county-alert-panel-heading > i {
  margin-top: 2px;
  color: var(--county-alert-color, #dc3545);
  font-size: 1.25rem;
}

.county-alert-panel__title {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.county-alert-panel-heading p {
  margin: 4px 0 0;
  color: #c3d3df;
  font-size: 0.76rem;
}

.county-alert-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.county-alert-metadata > div {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(171, 198, 218, 0.28);
  border-radius: 8px;
  background: #0a1f34;
}

.county-alert-metadata dt {
  margin: 0 0 3px;
  color: #fff200;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.county-alert-metadata dd {
  margin: 0;
  color: #e7eef4;
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.county-alert-shared-bulletin {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 242, 0, 0.34);
  border-radius: 8px;
  background: rgba(255, 242, 0, 0.07);
  color: #dce7ef;
  font-size: 0.76rem;
  line-height: 1.4;
}

.county-alert-shared-bulletin > i {
  margin-top: 2px;
  color: #fff200;
}

.county-alert-shared-bulletin strong {
  color: #fff;
}

.county-alert-description {
  color: #e8eff5;
  font-family: var(--font-mono, monospace);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.county-alert-description p {
  margin: 0 0 1.15em;
}

.county-alert-description p:last-child {
  margin-bottom: 0;
}

.county-alert-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);
  align-items: stretch;
  gap: 8px;
}

.county-alert-row,
.county-alert-row * {
  box-sizing: border-box;
}

.county-alert-primary {
  min-width: 0;
}

.county-alert-primary > .alert {
  height: 100%;
}

.county-hwo-trigger,
.alert-dialog--hwo {
  --county-hwo-color: #eee8aa;
}

.county-hwo-trigger {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(171, 198, 218, 0.46);
  border-left: 5px solid var(--county-hwo-color);
  border-radius: 9px;
  background: #0a1f34;
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 4px 12px rgba(4, 10, 16, 0.18);
}

.county-hwo-trigger:hover,
.county-hwo-trigger:focus-visible {
  border-color: #fff200;
  background: #102f4d;
}

.county-hwo-trigger:focus-visible {
  outline: 2px solid #fff200;
  outline-offset: 2px;
}

.county-hwo-trigger > i {
  color: var(--county-hwo-color);
  font-size: 1.12rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.65));
}

.county-hwo-trigger-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.county-hwo-trigger-copy > span {
  color: var(--county-hwo-color);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.county-hwo-trigger-copy strong,
.county-hwo-trigger-copy small,
.county-hwo-label-long {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.county-hwo-trigger-copy strong {
  display: block;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.county-hwo-trigger-copy small {
  color: #bdd0df;
  font-size: 0.7rem;
}

.county-hwo-label-short {
  display: none;
}

.county-hwo-trigger-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.county-hwo-trigger-action i {
  color: var(--county-hwo-color);
  font-size: 0.65rem;
}

.county-hwo-panel .county-alert-panel-heading {
  --county-alert-color: var(--county-hwo-color);
}

.county-hwo-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 3px;
  margin: 0 0 14px;
}

.county-hwo-metadata > div {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(171, 198, 218, 0.28);
  border-radius: 8px;
  background: #0a1f34;
}

.county-hwo-metadata dt {
  margin: 0 0 3px;
  color: var(--county-hwo-color);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.county-hwo-metadata dd {
  margin: 0;
  color: #e7eef4;
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.county-hwo-stale {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(238, 232, 170, 0.4);
  border-radius: 8px;
  background: rgba(238, 232, 170, 0.08);
  color: #e8eff5;
  font-size: 0.76rem;
  line-height: 1.4;
}

.county-hwo-stale i {
  margin-top: 2px;
  color: var(--county-hwo-color);
}

.county-hwo-text {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(171, 198, 218, 0.28);
  border-radius: 8px;
  background: #061522;
  color: #e8eff5;
  font-family: var(--font-mono, monospace);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.5;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.county-hwo-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  color: var(--county-hwo-color);
  font-size: 0.78rem;
  font-weight: 800;
}

.county-hwo-source:hover,
.county-hwo-source:focus-visible {
  color: #fff200;
}

@media (min-width: 641px) and (max-width: 1024px) {
  .county-alert-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .county-alert-view-all {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .county-alert-row {
    grid-template-columns: minmax(0, 1fr) minmax(124px, 0.55fr);
  }

  .county-alert-rail {
    display: none;
  }

  .county-alert-summary {
    display: grid;
    width: 100%;
    min-height: 62px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 4px 6px;
    border: 1px solid rgba(171, 198, 218, 0.48);
    border-left: 5px solid var(--county-alert-color, #dc3545);
    border-radius: 9px;
    background: #0a1f34;
    color: #fff;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 4px 12px rgba(4, 10, 16, 0.18);
  }

  .county-alert-summary > i {
    color: var(--county-alert-color, #dc3545);
    font-size: 1.25rem;
  }

  .county-alert-summary-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
  }

  .county-alert-summary-copy > span {
    color: #fff200;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  .county-alert-summary-copy strong,
  .county-alert-summary-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .county-alert-summary-copy strong {
    font-size: 0.78rem;
    line-height: 1.12;
    text-transform: uppercase;
  }

  .county-alert-summary-copy small {
    color: #bdd0df;
    font-size: 0.65rem;
  }

  .county-alert-summary-action {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .county-alert-summary-action i {
    color: #fff200;
    font-size: 0.65rem;
  }

  .county-alert-description {
    font-size: 0.82rem;
    line-height: 1.48;
  }

  .county-hwo-trigger {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 7px 9px;
  }

  .county-hwo-trigger-copy > span {
    font-size: 0.56rem;
  }

  .county-hwo-trigger-copy strong {
    font-size: 0.76rem;
  }

  .county-hwo-trigger-copy small {
    font-size: 0.62rem;
  }

  .county-hwo-label-long,
  .county-hwo-trigger-action {
    display: none;
  }

  .county-hwo-label-short {
    display: inline;
  }

  .county-hwo-text {
    font-size: 0.78rem;
  }
}
/* CURRENT CONDITIONS */
.current-container {
  border-radius: 8px;
  margin-bottom: 5px;
  overflow: hidden;
  position: relative;
  width: 100%;
  background-position: top right;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: var(--gradient-header);
}

.site-page--county-san-diego .current-container {
  background-image: url('../../images/county/san-diego-background.webp');
}

.weather-desc {
  border-radius: var(--radius-md);
  color: var(--color-text-light);
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent);
  padding: 0 10px 10px 20px;
  width: 90%;
}

.weather-desc .desc {
  font-family: var(--font-heading), sans serif;
  text-shadow: 3px 2px 1px rgba(0, 0, 0, 1);
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.weather-desc .details p {
  font-family: var(--font-heading), sans serif;
  text-shadow: 3px 2px 1px rgba(0, 0, 0, 1);
  color: var(--color-accent);
  font-weight: 600;
  margin: 3px 0;
}

.weather-temp {
  color: var(--color-accent);
  text-shadow: 3px 2px 1px rgba(0, 0, 0, 1);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 4rem;
  border-radius: var(--radius-md);
  font-weight: bold;
  margin: 0;
}

.weather-bg {
  position: relative;
  display: flex;
  align-items: center;
}

.weather-icon {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 35%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to right, black 70%, transparent 100%);
  mask-image: linear-gradient(to right, black 25%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.weather-desc {
  z-index: 1;
  position: relative;
}

#secondary-stations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.other-header {
  background: var(--color-header);
  color: var(--color-text-light);
  padding: 10px 15px;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fontawesome-icon {
  color: var(--color-accent);
}

.other-content {
  padding: 15px 0 0 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.station-chip {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  min-width: 80px;
  max-width: 200px;
}

.chip-name {
  display: block;
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.chip-temp {
  display: block;
  color: #0066cc;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Property references with data attributes */
[id^="current-"] strong {
  font-family: var(--font-heading), sans serif;
  font-weight: bold;
  color: var(--color-text-light);
}

.details .value {
  color: white;
}

#current-location,
#current-obs-time {
  color: var(--color-accent);
  font-family: var(--font-heading), sans serif;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.details .place {
  color: white;
}

/* FORECAST SECTION */
#forecast {
  display: flex;
  gap: 5px;
  justify-content: space-evenly;
  margin: 15px 0 10px 0;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) rgba(0, 0, 0, 0.1);
}

#forecast::-webkit-scrollbar {
  height: 8px;
}

#forecast::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

#forecast::-webkit-scrollbar-thumb {
  background-color: var(--color-accent);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

#forecast::-webkit-scrollbar-thumb:hover {
  background-color: #e6d900;
}

.forecast-item {
  align-items: center;
  background-color: rgb(241, 241, 241);
  border-radius: 8px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
  color: var(--color-text);
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  padding: 10px;
  text-align: center;
  width: 90px;
}

.forecast-cell {
  font-size: 1rem;
  padding: 5px;
}

.forecast-day {
  align-items: flex-start;
  display: flex;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  justify-content: center;
  line-height: 1.2em;
  margin-bottom: 10px;
  min-height: 2.4em;
}

.forecast-desc {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.forecast-icon img {
  border-radius: 10px;
  height: auto;
  margin-bottom: 5px;
  object-fit: contain;
  /* width: 90px; */
  border-radius: 10px;
}

.forecast-temp {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

/* DETAILED FORECAST */
.detailed-item {
  background-color: rgb(233, 233, 233);
  border-radius: var(--radius-md);
  color: var(--color-text);
  margin-top: 10px;
  padding: 15px;
}

.detailed-row {
  display: block;
  align-items: center;
}

.detailed-icon img {
  width: 200px;
  height: auto;
  object-fit: contain;
  margin: 10px 0;
  border-radius: 15px;
}

.detailed-day {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detailed-forecast {
  font-family: var(--font-heading), sans serif;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

#detailed-forecast {
  display: flex;
  gap: 5px;
  justify-content: space-evenly;
  text-align: center;
  margin: 15px 0 10px 0;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) rgba(0, 0, 0, 0.1);
}

/* METEOGRAM SECTION */
.meteogram-content {
  text-align: center;
  display: none;
  border-radius: var(--radius-md);
}

.meteogram-tab-labels {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 10px 0 5px;
}

.meteogram-tab {
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-text-light);
  cursor: pointer;
    font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(0.7rem, 0.8vw, 0.8rem);
  font-weight: bold;
  padding: 8px 10px;
}

.meteogram-tabs input[type="radio"] {
  display: none;
}

/* Make Chart.js meteogram visible when selected */
#meteogram-now:checked ~ .meteogram-tab-content #meteogram-chart-container,
#meteogram-24:checked ~ .meteogram-tab-content #meteogram-chart-container,
#meteogram-48:checked ~ .meteogram-tab-content #meteogram-chart-container,
#meteogram-72:checked ~ .meteogram-tab-content #meteogram-chart-container,
#meteogram-96:checked ~ .meteogram-tab-content #meteogram-chart-container {
  display: block;
  background-color: var(--color-text-light);
  padding: 15px;
  border-radius: var(--radius-md);
  min-height: 400px;
}

/* Active tab styling */
#meteogram-now:checked ~ .meteogram-tab-labels label[for="meteogram-now"],
#meteogram-24:checked ~ .meteogram-tab-labels label[for="meteogram-24"],
#meteogram-48:checked ~ .meteogram-tab-labels label[for="meteogram-48"],
#meteogram-72:checked ~ .meteogram-tab-labels label[for="meteogram-72"],
#meteogram-96:checked ~ .meteogram-tab-labels label[for="meteogram-96"] {
  background-color: var(--color-accent);
  color: var(--color-text);
}

/* Make sure the tab content wrapper is displayed */
.meteogram-toggle:checked
  + .meteogram-title
  + .meteogram-tabs
  .meteogram-tab-content {
  display: block;
}

/* Parameter selection container */
.meteogram-param-container {
  display: flex;
  justify-content:stretch;
  gap: 5px;
  margin-bottom: 15px;
  padding: 5px;
}

.meteogram-param-item {
  display: flex;
  width: 100%;
  max-width: clamp(100px, 20%, 200px);
  min-width: 0;
}

.meteogram-param-button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: max(24px, var(--control-target-min));
  padding: 8px 2px;
  font-family: "Montserrat", Arial, sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(0.7rem, 0.8vw, 0.8rem);
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
}

#meteogram-chart-container {
  min-height: 400px;
}

canvas#meteogramChart {
  max-width: 100%;
}

/* AFD SECTION */
.afd-content {
  background-color: var(--color-text-light);
  border-radius: var(--radius-md);
  color: var(--color-text);
  display: none;
  font-family: var(--font-mono), monospace;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 15px;
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
  white-space: pre-wrap;
}

/* Media Queries for County Pages */
@media (max-width: 768px) {
  .weather-temp {
    background-color: transparent;
    font-size: 3.5rem;
  }

  .meteogram-param-container {
    gap: 2px;
  }
}

@media (max-width: 600px) {
  .weather-temp {
    font-size: 4rem;
  }

  .weather-icon {
    width: 100%;
  }

  .weather-desc {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    width: 100%;
  }

  .detailed-icon img {
    width: 150px;
    height: auto;
  }

  .detailed-forecast {
    font-size: 0.7rem;
  }

  .meteogram-param-container {
    gap: 1px;
    padding: 1px;
  }
}

.weather-center-forecast-content {
  min-height: 0;
  box-sizing: border-box;
  padding: 14px;
  background: #071a2c;
}

.weather-center-forecast-panel {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.weather-center-forecast-panel[hidden] {
  display: none !important;
}

.weather-center-forecast-source-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.weather-center-forecast-panel > .detailed-title,
.weather-center-forecast-panel > .meteogram-title,
.weather-center-forecast-panel > .afd-title {
  display: none;
}

.weather-center-forecast-panel #forecast,
.weather-center-forecast-panel #detailed-forecast {
  gap: 20px;
  margin: 0;
  padding: 0;
  scrollbar-color: #fff200 rgba(255, 255, 255, 0.08);
}

.weather-center-forecast-panel #forecast {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: visible;
  max-width: 1280px;
  margin-inline: auto;
}

.weather-center-forecast-panel .forecast-item {
  position: relative;
  width: 90%;
  margin: 0 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 11px 10px 12px;
  border: 1px solid rgba(164, 190, 211, 0.34);
  border-top: 3px solid #fff200;
  border-radius: 9px;
  background: linear-gradient(180deg, #1c5b8d 0%, #0b253b 100%);
  color: #eef5fb;
  box-shadow: 0 5px 14px rgba(2, 9, 15, 0.28);
}

.weather-center-forecast-panel .forecast-cell {
  padding: 3px;
}

.weather-center-forecast-panel .forecast-day {
  min-height: 2.45em;
  margin-bottom: 7px;
  color: #f4f8fb;
  font-size: clamp(0.66rem, 0.78vw, 0.78rem);
  letter-spacing: 0.025em;
}

.weather-center-forecast-panel .forecast-icon {
  width: 100%;
}

.weather-center-forecast-panel .forecast-icon img {
  display: block;
  /* width: min(88px, 100%); */
  aspect-ratio: 1;
  margin: 0 auto 7px;
  border: 1px solid rgba(220, 234, 243, 0.38);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(2, 9, 15, 0.32);
}

.weather-center-forecast-panel .forecast-temp {
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(3.5rem, 5vw, 5rem);
  line-height: 1;
}

.weather-center-forecast-panel .forecast-temp .value[style*="#d50000"] {
  color: #ff8178 !important;
}

.weather-center-forecast-panel .forecast-temp .value[style*="#1976d2"] {
  color: #80c4ff !important;
}

.weather-center-forecast-panel #detailed-forecast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: calc(var(--weather-center-content-height) - 28px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 6px 2px 0;
}

.weather-center-forecast-panel .detailed-item {
  min-width: 0;
  margin: 0;
  padding: 11px;
  border: 1px solid rgba(164, 190, 211, 0.32);
  border-radius: 9px;
  background: linear-gradient(135deg, #123552 0%, #0a2237 100%);
  color: #e8f0f6;
  box-shadow: 0 5px 14px rgba(2, 9, 15, 0.24);
  text-align: left;
}

.weather-center-forecast-panel .detailed-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-areas:
    "day forecast"
    "icon forecast";
  gap: 7px 13px;
  align-items: start;
}

.weather-center-forecast-panel .detailed-col-day {
  grid-area: day;
}

.weather-center-forecast-panel .detailed-col-icon {
  grid-area: icon;
}

.weather-center-forecast-panel .detailed-col-forecast {
  grid-area: forecast;
  align-self: center;
  min-width: 0;
}

.weather-center-forecast-panel .detailed-day {
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.25;
}

.weather-center-forecast-panel .detailed-day .value[style*="#d50000"] {
  color: #ff8178 !important;
}

.weather-center-forecast-panel .detailed-day .value[style*="#1976d2"] {
  color: #80c4ff !important;
}

.weather-center-forecast-panel .detailed-icon img {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0;
  border: 1px solid rgba(220, 234, 243, 0.34);
  border-radius: 8px;
  object-fit: cover;
}

.weather-center-forecast-panel .detailed-forecast {
  color: #dce7ef;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
}

.weather-center-forecast-panel .meteogram-tab-labels {
  flex-wrap: wrap;
  margin: 0 0 5px;
  color: #dce7ef;
}

.weather-center-forecast-panel .meteogram-tab {
  border: 1px solid rgba(164, 190, 211, 0.36);
  border-radius: 7px;
  background: #173b5a;
  color: #e8f0f6;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.weather-center-forecast-panel .meteogram-tab:hover {
  border-color: rgba(220, 234, 243, 0.72);
  background: #1d4a70;
}

.weather-center-forecast-panel .meteogram-tab:focus-visible {
  outline: 2px solid #fff200;
  outline-offset: 2px;
}

.weather-center-forecast-panel #meteogram-now:checked ~ .meteogram-tab-labels label[for="meteogram-now"],
.weather-center-forecast-panel #meteogram-24:checked ~ .meteogram-tab-labels label[for="meteogram-24"],
.weather-center-forecast-panel #meteogram-48:checked ~ .meteogram-tab-labels label[for="meteogram-48"],
.weather-center-forecast-panel #meteogram-72:checked ~ .meteogram-tab-labels label[for="meteogram-72"],
.weather-center-forecast-panel #meteogram-96:checked ~ .meteogram-tab-labels label[for="meteogram-96"],
.weather-center-forecast-panel .meteogram-param-button[aria-pressed="true"] {
  border-color: #fff200;
  background: #fff200;
  color: #071a2c;
}

.weather-center-forecast-panel .meteogram-param-container {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 5px;
  padding: 8px;
  border-radius: 8px;
}

@media (min-width: 601px) {
  .weather-center-forecast-panel .meteogram-param-item {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }

  .weather-center-forecast-panel .meteogram-param-button {
    /* width: auto; */
    padding: 8px 10px;
    font-weight: bold;
  }
}

@media (max-width: 600px) {
  .weather-center-forecast-panel .meteogram-param-item {
    min-width: max-content;
  }

  .weather-center-forecast-panel .meteogram-param-button {
    white-space: nowrap;
  }
}

.weather-center-forecast-panel #meteogram-chart-container {
  border: 1px solid rgba(164, 190, 211, 0.5);
  border-radius: 9px;
  background: #f8fafc;
  box-shadow: 0 7px 18px rgba(2, 9, 15, 0.28);
}

.weather-center-forecast-panel .afd-content {
  display: block;
  box-sizing: border-box;
  margin-top: 0;
  max-height: calc(var(--weather-center-content-height) - 60px);
  border: 1px solid rgba(164, 190, 211, 0.38);
  border-radius: 9px;
  background: #0b2238;
  color: #dce7ef;
  box-shadow: 0 7px 18px rgba(2, 9, 15, 0.24);
  scrollbar-color: #fff200 rgba(255, 255, 255, 0.08);
}

.weather-center-forecast-panel .afd-text {
  margin: 0;
  color: #dce7ef;
  font: clamp(0.72rem, 0.8vw, 0.78rem) "Fira Code", Arial, sans-serif;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  .weather-center-forecast-content {
    padding: 8px;
  }

  .weather-center-forecast-panel {
    min-height: 0;
  }

  .weather-center-forecast-panel .afd-content {
    height: auto;
    max-height: none;
    overflow-y: visible;
  }

  .weather-center-forecast-panel #forecast {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    overflow: visible;
    padding: 0;
  }

  .weather-center-forecast-panel .forecast-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(56px, 15vw, 78px);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "day icon"
      "temp icon";
    gap: 5px 8px;
    align-items: center;
    width: 95%;
    min-height: 112px;
    padding: 9px;
    text-align: left;
  }

  .weather-center-forecast-panel .forecast-day {
    grid-area: day;
    min-height: 0;
    margin: 0;
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
  }

  .weather-center-forecast-panel .forecast-icon {
    grid-area: icon;
  }

  .weather-center-forecast-panel .forecast-icon img {
    /* width: min(78px, 100%); */
    margin: 0;
  }

  .weather-center-forecast-panel .forecast-temp {
    grid-area: temp;
    align-self: start;
    text-align: left;
  }

  .weather-center-forecast-panel #detailed-forecast {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .weather-center-forecast-panel .detailed-row {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 6px 10px;
  }

  .weather-center-forecast-panel .detailed-icon img {
    width: 78px;
    height: 78px;
  }

  .weather-center-forecast-panel #meteogram-chart-container {
    overflow-x: auto;
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .site-page--county .weather-map-card {
    --weather-map-max-block-size: 21.875rem;
    --weather-map-stack-offset: 30rem;
  }

  .site-page--county-multizone .weather-map-card {
    --weather-map-max-block-size: 20.625rem;
    --weather-map-stack-offset: 34rem;
  }
}

@media (max-width: 600px) {
  .weather-center-forecast-panel .afd-text {
  font: clamp(0.72rem, 0.8vw, 0.78rem) "Fira Code", Arial, sans-serif;
  }
}

/* Multi-zone selectors integrated with the weather-center shell. */
.site-page--county-multizone .page-shell {
  container-type: inline-size;
}

.page-header--weather + .zone-selector {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  max-width: 100%;
  justify-content: center;
  gap: 8px;
  margin: -2px 0 14px;
}

.page-header--weather + .zone-selector .zone-selector__option {
  box-sizing: border-box;
  min-height: max(44px, var(--control-target-min));
  min-width: 0;
  padding: 5px;
  white-space: normal;
  overflow-wrap: anywhere;
  border: 1px solid rgba(164, 190, 211, 0.52);
  border-radius: 10px;
  background: #0a1f34;
  color: #dce7ef;
  font-size: clamp(0.72rem, 0.8vw, 0.78rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
}

.page-header--weather + .zone-selector .zone-selector__option:hover,
.page-header--weather + .zone-selector .zone-selector__option:focus-visible {
  border-color: #fff200;
  background: #102f4d;
  color: #fff;
}

.page-header--weather + .zone-selector .zone-selector__option:focus-visible {
  outline: 2px solid #fff200;
  outline-offset: 2px;
}

.page-header--weather + .zone-selector .zone-selector__option.is-active {
  border-color: #fff200;
  background: #fff200;
  color: #071b2e;
}

.page-header--weather + .zone-selector .zone-selector__option:disabled {
  cursor: wait;
  opacity: 0.65;
}

@container (max-width: 768px) {
  .page-header--weather + .zone-selector {
    width: 100%;
    max-width: none;
    gap: 4px;
    margin: 0 0 10px;
  }

  .page-header--weather + .zone-selector .zone-selector__option {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding-inline: 4px;
    letter-spacing: normal;
  }
}

@media (max-height: 43.75rem) {
  .site-page--county .weather-map-card {
    --weather-map-min-block-size: 12rem;
  }
}

/* Phase 11: independent County forecast card. Map and legacy test layouts retain their owners. */
.tabset--county-weather {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.county-forecast .subtabs--forecast {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.county-forecast .subtabs__tab {
  min-height: max(44px, var(--control-target-min));
  height: auto;
  max-height: none;
  padding: 10px 4px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.county-forecast .subtabs__tab[data-forecast-tab="outlook"]:not([hidden]) {
  background: #fa1f1f;
  border-color: #ffc078;
  color: #181818;
  animation: county-hwo-pulse 2.8s ease-in-out infinite;
}

.county-forecast .subtabs__tab[data-forecast-tab="outlook"].is-active {
  border-bottom-color: #071b2e;
}

.county-forecast .subtabs__tab[data-forecast-tab="outlook"]:focus-visible {
  outline-color: #071b2e;
}

@keyframes county-hwo-pulse {
  0%, 100% { background-color: #fd0202; }
  50% { background-color: hsla(0, 96%, 55%, 0.534); }
}

@media (prefers-reduced-motion: reduce) {
  .county-forecast .subtabs__tab[data-forecast-tab="outlook"]:not([hidden]) {
    animation: none;
  }
}

.county-forecast {
  margin-top: 18px;
  container-type: inline-size;
}

.county-forecast__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.county-forecast__heading {
  margin: 0;
}

.county-forecast__outlook {
  --county-hwo-color: #eee8aa;
  min-width: 0;
  max-width: 100%;
  padding: 14px;
  border: 1px solid rgba(164, 190, 211, 0.38);
  border-radius: 9px;
  background: #0b2238;
  color: #dce7ef;
}

.county-forecast__outlook > h3 {
  margin: 0 0 14px;
}

.county-forecast__outlook,
.county-forecast__outlook * {
  box-sizing: border-box;
}

.county-forecast__outlook .county-hwo-source {
  min-height: max(44px, var(--control-target-min));
  white-space: normal;
  overflow-wrap: anywhere;
}

.county-forecast #forecast {
  /* One full-width period per row at every viewport. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
  align-items: start;
}

.county-forecast .forecast-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 135px;
  grid-template-areas: "day icon" "temp icon" "description description" "details details";
  grid-template-rows: auto auto auto auto;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  text-align: left;
}

.county-forecast .forecast-day {
  grid-area: day;
  min-height: 0;
  margin: 0;
  justify-content: flex-start;
  font-size: clamp(1rem, 1.5vw, 1.6rem);
  text-align: left;
  overflow-wrap: anywhere;
}

.county-forecast .forecast-temp {
  grid-area: temp;
  align-self: start;
  text-align: left;
}

.county-forecast .forecast-icon {
  grid-area: icon;
}

.county-forecast .forecast-icon img {
  /* width: 100%; */
  margin: 0;
}

.county-forecast__description {
  grid-area: description;
  margin: 0;
  font-size: clamp(0.75rem, 0.9vw, 0.875rem);
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.county-forecast__details {
  grid-area: details;
  min-width: 0;
  border-top: 1px solid rgba(164, 190, 211, 0.34);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.county-forecast__details summary {
  font-size: clamp(0.75rem, 0.9vw, 0.875rem);
  text-transform: uppercase;
  font-style: italic;
  font-weight: 600;
  min-height: max(24px, var(--control-target-min));
  box-sizing: border-box;
  padding: 2px;
  margin: 2px 4px;
  color: #fff200;
  cursor: pointer;
}

.county-forecast__details summary:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}

.county-forecast__details p {
  margin: 4px;
  font-size: clamp(0.9rem, 0.9vw, 1.1rem);
  font-style: normal;
  font-family: var(--font-mono);
}

.county-forecast__summary-context {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.county-alert-status {
  box-sizing: border-box;
  min-height: max(44px, var(--control-target-min));
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #0a1f34;
  color: #edf5fa;
}

@container (max-width: 600px) {
  .county-forecast__header {
    display: block;
    padding: 12px;
  }

  .county-forecast .subtabs__tab {
    padding-inline: 2px;
  }

  .county-forecast .subtabs__tab[data-short-label] {
    white-space: nowrap;
    text-indent: -100vw;
  }

  .county-forecast .subtabs__tab[data-short-label]::before {
    content: attr(data-short-label);
    position: absolute;
    inset: 0 3px 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    text-indent: 0;
  }
  
  .county-forecast #forecast {
  grid-template-columns: minmax(0, 1fr);
  }
}
}
