/* Weather: only what the shared tools.css does not cover */

.btn-icon,
.wx-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-icon {
  width: 1.125rem;
  height: 1.125rem;
}

/* ---------- Search suggestions ---------- */
.suggestions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.suggestion {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 0.25rem);
  background: transparent;
  text-align: start;
  cursor: pointer;
}

.suggestion:hover,
.suggestion:focus-visible {
  background: var(--accent-soft);
}

/* ---------- Status ---------- */
.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ---------- Current weather ---------- */
.weather-hero {
  --tone: transparent;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background-image: linear-gradient(160deg, var(--tone), transparent 60%);
  transition: opacity 0.2s ease;
}

.weather-hero.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.weather-hero[data-tone="clear"] {
  --tone: rgb(251 191 36 / 0.22);
}
.weather-hero[data-tone="partly"] {
  --tone: rgb(251 191 36 / 0.12);
}
.weather-hero[data-tone="night"] {
  --tone: rgb(99 102 241 / 0.25);
}
.weather-hero[data-tone="cloud"] {
  --tone: rgb(148 163 184 / 0.2);
}
.weather-hero[data-tone="fog"] {
  --tone: rgb(148 163 184 / 0.25);
}
.weather-hero[data-tone="drizzle"],
.weather-hero[data-tone="rain"] {
  --tone: rgb(56 189 248 / 0.22);
}
.weather-hero[data-tone="snow"] {
  --tone: rgb(186 230 253 / 0.3);
}
.weather-hero[data-tone="storm"] {
  --tone: rgb(168 85 247 / 0.25);
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-icon .wx-icon--hero {
  width: clamp(4.5rem, 20vw, 6.5rem);
  height: clamp(4.5rem, 20vw, 6.5rem);
  color: var(--accent-text);
  stroke-width: 1.4;
}

.hero-temp {
  font-size: clamp(3rem, 14vw, 4.75rem);
  font-weight: 800;
  line-height: 1.1;
  direction: ltr;
  text-align: start;
}

.hero-description {
  color: var(--muted);
  font-size: 1.125rem;
  font-weight: 600;
}

.hero-place {
  font-size: 1.25rem;
  font-weight: 800;
}

.hero-updated {
  font-size: 0.8125rem;
}

.metrics {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.metric {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.metric dt {
  color: var(--muted);
  font-size: 0.8125rem;
}

.metric dd {
  margin: 0.125rem 0 0;
  font-size: 1.125rem;
  font-weight: 800;
}

/* ---------- Forecast ---------- */
.forecast {
  display: grid;
  gap: 0.5rem;
}

.day {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.day-name {
  font-weight: 700;
}

.day .wx-icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent-text);
}

.day-range {
  display: flex;
  gap: 0.75rem;
  min-width: 5.5rem;
  justify-content: flex-end;
  direction: ltr;
}

/* wider screens: one column per day */
@media (min-width: 720px) {
  .forecast {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .day {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0.875rem 0.5rem;
    text-align: center;
  }

  .day-range {
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    align-items: center;
  }
}
