/* METEO */
/* struttura generale */
.meteo-card {
  color: #e7eefc;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.meteo-header h3 {
  margin: 0 0 4px;
  font-weight: 700;
}
.meteo-header small {
  display: block;
  opacity: 0.8;
  text-align: center;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}
.meteo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.meteo-table th,
.meteo-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
}
.meteo-table thead th {
  position: sticky;
  top: 0;
  background: #008ec2;
  color: white !important;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 14px;
}
.meteo-table tbody td {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  line-height: 1.6 !important; /* più respiro verticale */
  text-align: center !important;
}
.meteo-table tbody tr:first-child td {
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}
.meteo-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease;
}
.note {
  margin-top: 8px;
  opacity: 0.8;
  font-size: 12px;
}
.err {
  color: #ff9aa2;
}

/* grafica */
.windcell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.windarrow {
  width: 14px;
  height: 14px;
  border: 2px solid #008ec2;
  border-top: none;
  border-left: none;
  transform-origin: center;
  display: inline-block;
  border-radius: 1px;
  transition: transform 0.3s ease;
}
.windkt {
  font-variant-numeric: tabular-nums;
}

.barwrap {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.bar {
  flex: 0 0 60px;
  height: 6px;
  border-radius: 3px;
  background: #898e8f;
  overflow: hidden;
  position: relative;
}
.bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--bar);
  background: #008ec2;
  transition: width 0.4s ease;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  min-width: 70px;
}
.badge.ok {
  background: rgba(0, 160, 200, 0.25); /* celeste trasparente */
  border-color: rgba(0, 180, 220, 0.5);
}

.badge.warn {
  background: rgba(255, 200, 0, 0.25); /* giallo ambrato chiaro */
  border-color: rgba(255, 220, 100, 0.5);
}

.badge.dang {
  background: rgba(255, 60, 60, 0.25); /* rosso acceso trasparente */
  border-color: rgba(255, 100, 100, 0.5);
}

/* fascia riassuntiva giorni */
.forecast-wrap {
  background: #00a4dc;
  border-radius: 12px;
  padding: 10px 8px;
  margin: 15px 0;
}
.forecast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5em;
}
.forecast-list li {
  cursor: pointer;
  user-select: none;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.5em;
}
.forecast-list li:hover {
  background: rgba(255, 255, 255, 0.292);
  border-radius: 8px;
}
.forecast-list li:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}
.forecast-list li.is-selected {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 8px;
}
li.is-today {
  background: transparent;
}

.f-weekday {
  font-size: 16px;
  opacity: 0.9;
  text-transform: uppercase;
  color: white;
  text-align: center;
}
.f-icon {
  font-size: 28px; /* icone/emoji meteo */
  line-height: 1.2;
  text-align: center;
  margin: 0.2em 0;
}
.f-temps {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  display: flex;
  justify-content: center;
  gap: 1em;
}
.f-temps .min {
  opacity: 0.85;
}
.f-temps .max {
  font-weight: 600;
}
li.is-today {
  background: rgba(255, 255, 255, 0.404);
  border-radius: 8px;
}

.legend {
  font-size: 12px;
  opacity: 0.8;
  margin: 6px 0;
}
.legend strong {
  color: #fff;
}

.hint {
  display: inline-block;
  margin-left: 4px;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  transition: background 0.2s ease;
}
.hint:hover {
  background: rgba(0, 180, 220, 0.5);
}
