/* TB-Weather, Widget */

/* Wetter-Ueli stellt sich vor, gemuetliche Mini-Karte oberhalb des Widgets.
   Charakter statt Technik. */
.tb-weather-intro {
  margin: 0 0 1rem;
  padding: 0.95rem 1.1rem;
  background: color-mix(in srgb, var(--tb-primary-50, #EEEEFD) 80%, var(--tb-bg-card, #fff));
  border: 1px solid color-mix(in srgb, var(--tb-primary-200, #C7C7F0) 60%, transparent);
  border-left: 3px solid var(--tb-primary-700, #1919C8);
  border-radius: var(--radius-md, 8px);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--tb-ink-700, #374151);
}
.tb-weather-intro p { margin: 0 0 0.5rem; }
.tb-weather-intro p:last-child { margin-bottom: 0; }
.tb-weather-intro__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 0.6rem !important;
}
.tb-weather-intro__icon { font-size: 1.25rem; line-height: 1; }
.tb-weather-intro strong { color: var(--tb-ink-900, #0E0E2A); }
.tb-weather-intro em { color: var(--tb-ink-700, #374151); font-style: italic; }
@media (max-width: 600px) {
  .tb-weather-intro { padding: 0.8rem 0.9rem; font-size: 0.85rem; }
}

[data-tb-weather-widget] {
  background: var(--tb-bg-card, #fff);
  border: 1px solid var(--tb-line, #E7E7F2);
  border-radius: var(--radius-md, 8px);
  padding: 1rem;
  font-size: .95rem;
  min-height: 110px;
}
.tb-weather-head {
  display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem;
}
.tb-weather-icon { font-size: 1.5rem; line-height: 1; }
.tb-weather-temp { font-weight: 700; font-size: 1.125rem; color: var(--tb-ink-900); }
.tb-weather-city { color: var(--tb-ink-700); font-size: .9rem; }
.tb-weather-say  { margin: .25rem 0 0; color: var(--tb-ink-700); line-height: 1.55; }

.tb-weather-loading {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--tb-line); border-top-color: var(--tb-primary-700);
  border-radius: 50%; animation: tbw-spin .8s linear infinite;
}
@keyframes tbw-spin { to { transform: rotate(360deg); } }

[data-tb-weather-detail] { display: grid; gap: 1.5rem; }
.tb-weather-meta { font-size: .75rem; color: var(--tb-ink-500); margin-top: -.25rem; }
.tb-weather-diff { font-weight: 600; }

/* Hero-Block der Detail-Seite */
.tb-w-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--tb-accent-cyan) 14%, transparent) 0%, transparent 60%),
    linear-gradient(135deg, var(--tb-bg-card), color-mix(in srgb, var(--tb-primary-50) 60%, var(--tb-bg-card)));
  border: 1px solid var(--tb-line);
  box-shadow: var(--shadow-sm);
}
.tb-w-hero__icon { font-size: 5rem; line-height: 1; }
.tb-w-hero__city { margin: 0 0 .25rem; font-size: 1.5rem; }
.tb-w-hero__temp {
  font-family: Geist, Inter, sans-serif;
  font-size: 4rem; font-weight: 800; line-height: 1;
  background: linear-gradient(120deg, var(--tb-primary-700), var(--tb-accent-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tb-w-hero__temp span { font-size: 1.5rem; color: var(--tb-ink-500); -webkit-text-fill-color: var(--tb-ink-500); margin-left: .25rem; }
.tb-w-hero__cond { color: var(--tb-ink-700); margin-top: .25rem; }

/* Ueli-Bubble */
.tb-w-ueli {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  background: var(--tb-bg-card);
  border: 1px solid var(--tb-line);
  border-radius: var(--radius-lg);
}
.tb-w-ueli__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--tb-accent-amber), #FF9A3C);
  color: #1F0F00;
  font-family: Geist, Inter, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
}
.tb-w-ueli__bubble strong { display:block; color: var(--tb-ink-500); font-size: .8125rem; margin-bottom: .25rem; }
.tb-w-ueli__bubble p { margin: 0; color: var(--tb-ink-900); line-height: 1.55; }

/* Statistik-Boxen */
.tb-w-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
}
.tb-w-stat {
  background: var(--tb-bg-card);
  border: 1px solid var(--tb-line);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.tb-w-stat strong {
  display: block;
  font-family: Geist, Inter, sans-serif;
  font-weight: 800; font-size: 1.5rem;
  color: var(--tb-primary-700);
  line-height: 1;
}
.tb-w-stat span { font-size: .75rem; color: var(--tb-ink-500); }

.tb-w-section-title { margin: 1rem 0 .5rem; font-size: 1.125rem; }

.tb-weather-forecast {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .5rem;
}
.tb-weather-day {
  background: var(--tb-bg-card);
  border: 1px solid var(--tb-line);
  border-radius: var(--radius-md);
  padding: .75rem .5rem;
  text-align: center;
  position: relative;
}
.tb-weather-day.is-today {
  border-color: var(--tb-primary-500);
  box-shadow: 0 4px 12px rgba(25,25,200,0.08);
}
.tb-weather-day .d { font-size: .75rem; color: var(--tb-ink-500); }
.tb-weather-day .ic { font-size: 1.75rem; margin: .25rem 0; }
.tb-weather-day .mx { font-weight: 700; color: var(--tb-ink-900); font-size: 1.1rem; }
.tb-weather-day .mn { font-size: .85rem; color: var(--tb-ink-500); }
.tb-weather-day .rn { font-size: .65rem; color: var(--tb-accent-cyan); margin-top: .25rem; }
.tb-w-rain {
  width: 6px; height: 28px;
  background: var(--tb-line);
  border-radius: 3px;
  margin: .5rem auto 0;
  position: relative;
  overflow: hidden;
}
.tb-w-rain__fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, var(--tb-accent-cyan), var(--tb-primary-500));
  border-radius: 3px;
}
.tb-w-rain--dry { background: color-mix(in srgb, var(--tb-accent-amber) 30%, var(--tb-line)); }

.tb-w-source { font-size: .8rem; color: var(--tb-ink-500); }

@media (max-width: 700px) {
  .tb-weather-forecast { grid-template-columns: repeat(4, 1fr); }
  .tb-w-hero { grid-template-columns: 1fr; text-align: center; padding: 1.25rem; }
  .tb-w-hero__icon { font-size: 4rem; }
  .tb-w-hero__temp { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tb-weather-loading { animation: none; border-top-color: var(--tb-line); }
}
