/* === UTILITY VISIBILITÀ === */
.meteomag-widget-desktop .mobile-only {
  display: none;
}

/* === STILE DESKTOP - CONTAINER PRINCIPALE === */
.meteomag-widget-desktop {
  font-family: 'Inter', sans-serif;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  background: transparent;
  box-sizing: border-box;
}

/* === INTESTAZIONE SEZIONE (DESKTOP) — una riga, no wrap === */
.meteomag-widget-desktop .meteo-titolo-sezione{
  background-color:#205790;
  color:#ffffff;
  padding:14px 16px;
  font-size:16px;
  font-weight:bold;
  border-top-left-radius:12px;
  border-top-right-radius:12px;

  /* CHIAVE per non andare a capo e non rompere il td */
  display:flex;
  align-items:baseline;
  gap:.5rem;
  white-space:nowrap;     /* no line breaks */
  overflow:hidden;        /* evita overflow nel td */
  width:100%;
  box-sizing:border-box;
  line-height:1.2;
  position:relative;
  text-align:left;        /* niente center: crea wrap indesiderati */
}

/* Titolo: prende lo spazio, fa ellissi se troppo lungo */
.meteomag-widget-desktop .meteo-title{
  flex:1 1 auto;          /* si allarga ma può restringersi */
  min-width:0;            /* NECESSARIO per ellissi in flex */
  overflow:hidden;        
  text-overflow:ellipsis; /* "..." se troppo lungo */
}

/* Data: resta intera e non va mai a capo */
.meteomag-widget-desktop .meteo-aggiornate{
  flex:0 0 auto;          /* dimensione solo quanto il contenuto */
  font-weight:normal;
  white-space:nowrap;
}

/* Sottolineatura decorativa come prima */
.meteomag-widget-desktop .meteo-titolo-sezione::after{
  content:"";
  position:absolute;
  left:16px; right:16px;
  bottom:6px;
  height:1px;
  background-color:#c5c5c5;
}

/* === BLOCCO METEO ATTUALE === */
.meteomag-widget-desktop .meteo-current-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: #205790;
  color: #ffffff;
  padding: 8px 16px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  font-size: 15px;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* === METEO LIVE A 3 COLONNE: LIVE + ICONA + UV/ARIA === */
.meteomag-widget-desktop .meteo-current-box .riga-live-3col {
  display: flex;
  width: 100%;
  background-color: #205790;
  color: #ffffff;
  padding: 10px 0;
  border-bottom: 1px solid #c5c5c5;
  box-sizing: border-box;
}

/* COLONNA 1: METEO LIVE + CONDIZIONE */
.meteomag-widget-desktop .meteo-current-box .riga-live-3col .live-testo {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  padding-left: 12px; /* ✅ Padding su tutta la colonna */
}

.meteomag-widget-desktop .meteo-current-box .riga-live-3col .live-testo .titolo-riga {
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  text-align: left;
  padding-left: 60px; /* ✅ Padding extra su titolo se vuoi distaccarlo un po' */
}

.meteomag-widget-desktop .meteo-current-box .riga-live-3col .live-testo .condizione {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.2;
  text-align: left;
  padding-left: 60px; /* ✅ Padding anche sulla condizione */
}

/* COLONNA 2: ICONA CENTRALE */
.meteomag-widget-desktop .meteo-current-box .riga-live-3col .icona {
  flex: 0 0 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.meteomag-widget-desktop .meteo-current-box .riga-live-3col .icona img {
  height: 70px;
  max-width: 100%;
  object-fit: contain;
}

/* COLONNA 3: UV + ARIA */
.meteomag-widget-desktop .meteo-current-box .riga-live-3col .extra-dati {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start; /* Allineamento a sinistra */
  gap: 6px;
  text-align: left;
  padding-left: 12px; /* Padding base */
}

/* Riga UV */
.meteomag-widget-desktop .meteo-current-box .riga-live-3col .extra-dati .uv {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-left: 45px; /* ✅ Padding personalizzato per UV */
}

/* Riga Aria */
.meteomag-widget-desktop .meteo-current-box .riga-live-3col .extra-dati .qualita-aria {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-left: 47px; /* ✅ Padding personalizzato per Aria */
}

/* Icona UV */
.meteomag-widget-desktop .meteo-current-box .riga-live-3col .extra-dati .icona-uv {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Icona Qualità Aria */
.meteomag-widget-desktop .meteo-current-box .riga-live-3col .extra-dati .icona-aria {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.meteomag-widget-desktop .meteo-current-box .live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #00ff00;
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === RIGA 2: TEMPERATURA + PERCEPITA === */
.meteomag-widget-desktop .meteo-current-box .riga-temp {
  display: flex;
  justify-content: space-between;
  width: 100%;
  background-color: #205790;
  padding: 6px 0;
  gap: 10px;
  box-sizing: border-box;
}

/* Temperatura */
.meteomag-widget-desktop .meteo-current-box .riga-temp .temperatura {
  flex: 0 0 350px;
  display: flex;
  justify-content: flex-start;   /* ✅ Allineamento a sinistra */
  align-items: center;
  text-align: left;
  padding-left: 65px;            /* ✅ Padding a sinistra */
  white-space: nowrap;
  box-sizing: border-box;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
}

/* Percepita */
.meteomag-widget-desktop .meteo-current-box .riga-temp .percepita {
  flex: 0 0 350px;
  display: flex;
  justify-content: flex-start;   /* ✅ Allineamento a sinistra */
  align-items: center;
  text-align: left;
  padding-left: 95px;            /* ✅ Padding a sinistra */
  white-space: nowrap;
  box-sizing: border-box;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
}

/* === RIGHE A 3 COLONNE === */
.meteomag-widget-desktop .meteo-current-box .riga-nuvole,
.meteomag-widget-desktop .meteo-current-box .riga-umidita {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  width: 100%;
  gap: 10px;
}

/* NUVOLOSITÀ */
.meteomag-widget-desktop .meteo-current-box .riga-nuvole .nuvolosita {
  flex: 0 0 210px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  padding-left: 12px;
  white-space: nowrap;
  box-sizing: border-box;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
}

/* PRECIPITAZIONI */
.meteomag-widget-desktop .meteo-current-box .riga-nuvole .precipitazioni {
  flex: 0 0 210px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  padding-left: 12px;
  white-space: nowrap;
  box-sizing: border-box;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
}

/* VENTO */
.meteomag-widget-desktop .meteo-current-box .riga-nuvole .vento {
  flex: 0 0 210px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  padding-left: 12px;
  white-space: nowrap;
  box-sizing: border-box;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
}

/* UMIDITÀ */
.meteomag-widget-desktop .meteo-current-box .riga-umidita .umidita {
  flex: 0 0 210px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  padding-left: 12px;
  white-space: nowrap;
  box-sizing: border-box;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
}

/* VISIBILITÀ */
.meteomag-widget-desktop .meteo-current-box .riga-umidita .visibilita {
  flex: 0 0 210px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  padding-left: 12px;
  white-space: nowrap;
  box-sizing: border-box;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
}

/* PRESSIONE */
.meteomag-widget-desktop .meteo-current-box .riga-umidita .pressione {
  flex: 0 0 210px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  padding-left: 12px;
  white-space: nowrap;
  box-sizing: border-box;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
}

/* === TITOLI PREVISIONI GIORNALIERE === */
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione {
  background: #18497a;
  font-weight: bold;
  cursor: default;
  border-top: 1px solid #c5c5c5;
  padding: 10px 12px;
  font-size: 12px;
  box-sizing: border-box;
  color: #fff;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .col {
  font-size: 12px;
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  padding: 0 3px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Eccezioni con font più grande (Data + Previsioni Giornaliere) */
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .data,
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .condizione {
  font-size: 14px;
}

/* Larghezze colonne titoli */
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .data       { flex: 0 0 60px; }
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .condizione { flex: 0 0 300px; }
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .prec       { flex: 0 0 50px; }
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .temp       { flex: 0 0 75px; }
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .vento      { flex: 0 0 40px; }
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .umidita    { flex: 0 0 50px; }
.meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .pressione  { flex: 0 0 60px; }

/* === PREVISIONI GIORNALIERE === */
.meteomag-widget-desktop .meteo-daily-box {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.meteomag-widget-desktop .meteo-daily-box .daily-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #205790;
  padding: 10px 12px;
  font-size: 15px;
  gap: 6px;
  box-sizing: border-box;
  border-bottom: 1px solid #c5c5c5;
  cursor: pointer;
  color: #fff;
}

.meteomag-widget-desktop .meteo-daily-box .emoji {
  margin-right: 4px;
  display: inline-block;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row:nth-child(even) {
  background: #205790;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .col {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .data {
  flex: 0 0 65px;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  color: #fff;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .data strong {
  font-size: 14px;
  font-weight: normal;
  margin-top: 2px;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .icona {
  flex: 0 0 50px;
  justify-content: center;
  align-items: center;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .icona img {
  width: 36px;
  height: 36px;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .condizione {
  flex: 0 0 240px;
  text-align: left;
  padding: 0 6px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.2;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .prec {
  flex: 0 0 50px;
  text-align: center;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .col.tmin {
  flex: 0 0 45px; 
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .col.tmax {
  flex: 0 0 45px;
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .col.vento {
  flex: 0 0 40px;
  text-align: center;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .col.umidita {
  flex: 0 0 40px;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.meteomag-widget-desktop .meteo-daily-box .daily-row .col.pressione {
  flex: 0 0 50px;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* === TITOLI PREVISIONI ORARIE === */
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione {
  background: #18497a;
  font-weight: bold;
  cursor: default;
  border-top: 1px solid #c5c5c5;
  padding: 10px 12px;
  font-size: 12px;
  box-sizing: border-box;
  color: #fff;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .col {
  font-size: 12px;
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  padding: 0 3px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Eccezioni con font più grande (Ora + Condizione) */
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .data,
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .condizione {
  font-size: 14px;
}

/* Larghezze colonne titoli */
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .data       { flex: 0 0 60px; }
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .icona      { flex: 0 0 60px; }
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .condizione { flex: 0 0 140px; }
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .prec       { flex: 0 0 50px; }
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .temp       { flex: 0 0 40px; }
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .percepita  { flex: 0 0 40px; }
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .vento      { flex: 0 0 40px; }
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .umidita    { flex: 0 0 40px; }
.meteomag-widget-desktop .meteo-hourly-box .daily-row.intestazione .pressione  { flex: 0 0 40px; }

/* === PREVISIONI ORARIE DESKTOP === */
.meteomag-widget-desktop .meteo-hourly-box {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #205790;
  padding: 10px 12px;
  font-size: 15px;
  gap: 6px;
  box-sizing: border-box;
  border-bottom: 1px solid #c5c5c5;
  cursor: pointer;
  color: #fff;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .col {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

/* === COLONNE === */
.meteomag-widget-desktop .meteo-hourly-box .daily-row .data {
  flex: 0 0 60px;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  color: #fff;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .data strong {
  font-weight: normal;
  margin-top: 2px;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .icona {
  flex: 0 0 60px;
  justify-content: center;
  align-items: center;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .icona img {
  width: 36px;
  height: 36px;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .condizione {
  flex: 0 0 140px;
  text-align: left;
  padding: 0 6px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.2;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .prec {
  flex: 0 0 50px;
  text-align: center;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .temp {
  flex: 0 0 40px;
  text-align: center;
  font-weight: bold;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .percepita {
  flex: 0 0 40px;
  text-align: center;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .vento {
  flex: 0 0 40px;
  text-align: center;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .umidita {
  flex: 0 0 40px;
  text-align: center;
  min-width: 0;
}

.meteomag-widget-desktop .meteo-hourly-box .daily-row .pressione {
  flex: 0 0 40px;
  text-align: center;
  min-width: 0;
}

/* === PULSANTE "TORNA ALLE PREVISIONI GIORNALIERE" === */
.meteomag-widget-desktop .meteo-hourly-box .torna-giornaliera {
  background: #ffffff;
  color: #2a2a2a;
  padding: 8px 14px;
  margin: 10px 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
  text-transform: none;
}

.meteomag-widget-desktop .meteo-hourly-box .torna-giornaliera:hover {
  background: #f0f0f0;
}

/* === CONTENITORE PULSANTE TORNA === */
.meteomag-widget-desktop .meteo-hourly-box .meteo-torna-box {
  background-color: #205790;
  padding: 10px 12px;
  text-align: left;
  border-top: 1px solid #c5c5c5;
}

/* === CREDITI METEOBLUE – POSIZIONE FISSA IN BASSO === */
.meteomag-widget-desktop .meteo-crediti-box {
  border-top: 0.5px solid #c5c5c5;
  padding: 8px 12px;
  background: #205790;
  border-radius: 0 0 10px 10px;
}

.meteomag-widget-desktop .meteo-crediti-box .crediti-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #fff;
}

.meteomag-widget-desktop .meteo-crediti-box .crediti-testo {
  font-size: 13px;
  color: #fff;
}

.meteomag-widget-desktop .meteo-crediti-box .crediti-testo a {
  color: #fff !important;
  text-decoration: underline;
}

.meteomag-widget-desktop .meteo-crediti-box .crediti-testo a:hover {
  color: #bee2ff !important;
}

.meteomag-widget-desktop .meteo-crediti-box .logo-meteoblue {
  width: 90px;
  height: auto;
}


/* === DARK MODE === */
body.jnews-dark-mode .meteomag-widget-desktop .meteo-current-box {
  background-color: #1c1c1c;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-current-box .condizione,
body.jnews-dark-mode .meteomag-widget-desktop .meteo-current-box .temperatura {
  color: #ddd;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row {
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row:nth-child(even) {
  background-color: #111;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row .condizione,
body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row .temp {
  color: #ddd;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row .prec {
  color: #00bfff;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione {
  background-color: #121212;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row.intestazione .col {
  color: #bbb;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-hourly-box .meteo-torna-box {
  background-color: #1a1a1a;
  border-top: 1px solid #333;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row.crediti-row {
  border-top: 1px solid #444;
  background: #1c1c1c;
}

body.jnews-dark-mode .meteomag-widget-desktop .meteo-daily-box .daily-row.crediti-row .crediti-testo {
  color: #ccc;
}

/* ALERT MANCANZA DATI */
.meteomag-widget-desktop .alert-previsioni {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .jeg_content {
    width: 100%;
    float: none;
    margin: 0 auto;
  }

  .jeg_sidebar {
    width: 100%;
    float: none;
    margin-top: 20px;
  }
}
