/* Weather Badge Component */
.weather-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.weather-badge--extended {
  opacity: 0.7;
  border-style: dashed;
}

.weather-badge-empty {
  background: #f9f9f9;
}

.weather-badge-container {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.weather-icon {
  font-size: 1.25rem;
}

.weather-temps {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.weather-temp-high {
  font-weight: 600;
  color: #333;
}

.weather-temp-divider {
  color: #999;
  font-size: 0.875rem;
}

.weather-temp-low {
  color: #666;
  font-size: 0.875rem;
}

.weather-temp-empty {
  color: #999;
  font-size: 0.875rem;
}

.weather-precipitation {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.weather-precipitation-icon {
  font-size: 0.875rem;
}

.weather-precipitation-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-color-dark);
}

.weather-wind {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.weather-wind-direction {
  color: #666;
  font-size: 0.875rem;
}

.weather-wind-speed {
  color: #666;
  font-size: 0.875rem;
  white-space: nowrap;
}

.weather-no-data {
  color: #999;
  font-size: 0.875rem;
}

.weather-badge-details {
  display: inline-block;
  max-width: 100%;
  position: relative;
}

.weather-badge-details[open] {
  z-index: 8;
}

.calendar-day:has(.weather-badge-details[open]) {
  z-index: 8;
}

.weather-badge-details > summary {
  list-style: none;
  cursor: pointer;
}

/* Beat utilities.css `summary` / `summary:hover` (dark invert). Child
   temps keep explicit #333/#666, so the invert leaves unreadable
   dark-on-dark. Keep the white pill at rest, open, and hover. */
.weather-badge-details > summary.weather-badge,
.weather-badge-details[open] > summary.weather-badge,
.weather-badge-details > summary.weather-badge:hover,
.weather-badge-details > summary.weather-badge:focus-visible {
  background: white;
  color: inherit;
}

.weather-badge-details > summary.weather-badge:hover,
.weather-badge-details > summary.weather-badge:focus-visible {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.weather-badge-details > summary::-webkit-details-marker {
  display: none;
}

.weather-badge-details > summary::marker {
  content: "";
}

.weather-badge-details > summary::after {
  content: "▾";
  font-size: 0.7rem;
  color: #999;
  margin-left: 0.15rem;
}

.weather-badge-details[open] > summary::after {
  content: "▴";
}

.weather-hourly {
  margin-top: 0.4rem;
  padding: 0.5rem;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.weather-hourly-chart {
  width: 100%;
  height: 6.25rem;
  display: block;
}

/* Sunrise to sunset: a warm wash the rest of the plot sits on, so the
   white outside it reads as night. */
.weather-hourly-daylight {
  fill: oklch(96% 0.05 90);
}

.weather-hourly-tick {
  stroke: oklch(85% 0.01 250);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}

.weather-hourly-tick-label {
  fill: #666;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.weather-hourly-bar {
  fill: oklch(70% 0.12 240);
  opacity: 0.55;
}

.weather-hourly-mark {
  fill: white;
  stroke: oklch(40% 0.04 250);
  stroke-width: 1.5;
}

.weather-hourly-mark-label {
  fill: #333;
  font-size: 9.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.weather-hourly-line {
  stroke: oklch(40% 0.04 250);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.weather-hourly-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: #666;
  margin: 0.25rem 0 0.5rem;
}

.weather-hourly-legend-temp::before,
.weather-hourly-legend-precip::before {
  content: "";
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.25rem;
  vertical-align: -0.05rem;
  border-radius: 1px;
}

.weather-hourly-legend-temp::before {
  background: oklch(40% 0.04 250);
}

.weather-hourly-legend-precip::before {
  background: oklch(70% 0.12 240);
}

.weather-hourly-legend-daylight::before {
  content: "";
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.25rem;
  vertical-align: -0.05rem;
  border-radius: 1px;
  background: oklch(96% 0.05 90);
  border: 1px solid oklch(88% 0.06 90);
}

.weather-hourly-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.25rem, 1fr));
  gap: 0.25rem;
  max-height: 11rem;
  overflow-y: auto;
}

.weather-hourly-list--key {
  max-height: none;
  overflow: visible;
  grid-template-columns: repeat(3, 1fr);
}

.weather-hourly-more {
  margin-top: 0.4rem;
}

/* Beat utilities.css `summary` / `summary:hover` (dark invert): the toggle
   is a quiet text control, not a pill. */
.weather-hourly-more > summary.weather-hourly-more-toggle,
.weather-hourly-more[open] > summary.weather-hourly-more-toggle,
.weather-hourly-more > summary.weather-hourly-more-toggle:hover,
.weather-hourly-more > summary.weather-hourly-more-toggle:focus-visible {
  list-style: none;
  cursor: pointer;
  background: transparent;
  color: #666;
  font-size: 0.7rem;
  padding: 0.15rem 0;
  margin-bottom: 0.35rem;
}

.weather-hourly-more > summary.weather-hourly-more-toggle:hover,
.weather-hourly-more > summary.weather-hourly-more-toggle:focus-visible {
  color: #333;
  text-decoration: underline;
}

.weather-hourly-more > summary::-webkit-details-marker {
  display: none;
}

.weather-hourly-more > summary::marker {
  content: "";
}

.weather-hourly-more > summary::before {
  content: "▸ ";
}

.weather-hourly-more[open] > summary::before {
  content: "▾ ";
}

.weather-hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.weather-hourly-time {
  color: #666;
}

.weather-hourly-temp {
  font-weight: 600;
  color: #333;
}

.weather-hourly-precip {
  color: oklch(45% 0.12 240);
}

/* Weather Details */
.weather-details {
  margin-top: 1rem;
}

.weather-details dl {
  display: grid;
  gap: 0.5rem;
}

.weather-details dt {
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
}

.weather-details dd {
  font-size: 0.875rem;
  color: #333;
  margin: 0 0 0.5rem 0;
}

/* Weather Status Messages */
.weather-unavailable {
  text-align: center;
  padding: 2rem 0;
  color: #999;
}

.weather-error {
  text-align: center;
  padding: 2rem 0;
  color: #dc2626;
}
