/* Grundlegendes Layout & Container */
#uviapp {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

#uviapp .uvicontainer {
  width: 100%;
  max-width: 420px;
  margin: 20px auto 10px;
  padding: 0;
  box-sizing: border-box;
}

#uviapp .header-block {
  text-align: left;
  margin-bottom:15px;
}

#uviapp .header-block h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
  margin: 0 0 10px 0;
  text-align: left;
}

#uviapp .header-block p {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  color: #374151;
  margin: 0;
  max-width: 32rem;
  text-align: left;
}

/* Primary CTA Button */
#uviapp button.locationButton {
  display: block;
  width: 100%;
  min-height: 40px;
  line-height: 40px;
  padding: 0;
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: #000;
  background-color: #ffcd00;
  border: none;
  border-radius: 4px;
  box-shadow: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

#uviapp button.locationButton:active {
  transform: scale(0.98);
}

/* Hero Status Card */
#uviapp .heroStatusCard {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: left;
}

#uviapp .location-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #86868b;
  font-weight: 600;
  margin-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 8px;
}

#uviapp .location-text-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uviapp .location-name {
  color: #1d1d1f;
  font-weight: 700;
}

#uviapp .refresh-location-btn {
  background: #f5f5f7;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0066cc;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.3s ease;
  padding: 0;
}

#uviapp .refresh-location-btn:hover {
  background-color: #e8e8ed;
}

#uviapp .refresh-location-btn:active {
  transform: rotate(180deg);
}

#uviapp .hero-uv-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #86868b;
}

#uviapp .refresh-location-btn svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px; /* Verhindert, dass Flexbox das SVG auf 0px zusammendrückt */
  min-height: 14px;
  flex-shrink: 0;   /* Zwingt den Flex-Container, das Icon nicht zu stauchen */
  display: block;
}

#uviapp .hero-uv-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

#uviapp .hero-uv-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 10px;
  color: #ffffff;
  background: #44983e;
}

#uviapp .hero-uv-category {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1d1d1f;
}

#uviapp .hero-uv-action {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e65100;
  margin-top: 2px;
}

/* Neues ruhiges Lower-UV / Info-Banner (ersetzt die Alarm-Box) */
#uviapp .uvLowerWindowBox {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1d1d1f;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 4px solid #34c759;
  line-height: 1.4;
}

#uviapp .uvLowerWindowBox.warning-border {
  border-left-color: #ff9500;
}

/* Sektions-Überschriften */
#uviapp .uviLocationDiv {
  font-size: 0.8rem;
  font-weight: 700;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  margin: 16px 0 8px 2px;
}

/* Chart Container Allgemein */
/* Chart Container Allgemein */
#uviapp #uvChartContainer,
#uviapp #dailyUVChartContainer {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 4px;
}

#uviapp .chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

#uviapp .chart-bar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 130px; /* Kompakte Chart-Höhe (120-140px Bereich) */
  width: 100%;
}

/* UV-Werte über den Balken */
#uviapp .chart-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 4px;
  line-height: 1;
}

/* Balken-Styling: Breiter & mit Mindesthöhe für UV 0 */
#uviapp .chart-bar {
  width: 100%;
  max-width: 18px;
  min-height: 8px; /* Hält UV 0 als kleinen grünen Balken sichtbar */
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

#uviapp .daily-chart-container .chart-bar {
  width: 22px; /* Breiter für die 6 Tage */
}

/* Uhrzeiten und Datumsbeschriftungen */
#uviapp .chart-time {
  font-size: 0.7rem;
  font-weight: 600;
  color: #86868b;
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
  height: 14px; /* Verhindert Layout-Sprünge, wenn ein Text-Label leer ist */
}

/* Protection Advice Card */
#uviapp .protectionAdviceCard {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#uviapp .protectionAdviceCard h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #86868b;
  margin-top: 0;
  margin-bottom: 8px;
}

#uviapp .protectionAdviceCard ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: #1d1d1f;
  line-height: 1.5;
}

/* Hinweis für Babys unter 6 Monaten */
#uviapp .baby-age-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  background-color: #f5f5f7;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #6e6e73;
}

#uviapp .baby-age-note strong {
  color: #1d1d1f;
  font-weight: 700;
}

/* Lade-Overlay */
#uviapp.dropdown-active::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  z-index: 1001; 
}

#uviapp .loadingIndicatorLocation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999; 
  display: none;
  flex-direction: column;
  align-items: center;
}

#uviapp .loadingIndicatorLocation .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #ffcd00;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

#uviapp .loading-text { font-size: 0.9rem; font-weight: 600; color: #1d1d1f; }