/* Dashboard fotovoltaico per TV — foglio di stile.
   Il "palco" misura sempre 1920x1080 e viene ingrandito o rimpicciolito in blocco (anche a 4K) dalla pagina.
   Niente griglie CSS, variabili o funzioni recenti: devono capirlo anche i browser delle TV meno nuove. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }

html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #070A11; cursor: none; }
body { font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #F2F4F7; -webkit-font-smoothing: antialiased; }
sub { font-size: 0.62em; vertical-align: baseline; position: relative; top: 0.22em; }

#palco { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden;
  -webkit-transform-origin: 0 0; transform-origin: 0 0;
  background: #0A0E17;
  background: -webkit-radial-gradient(50% 0%, ellipse farthest-corner, #14203A 0%, #0C111C 46%, #080B12 100%);
  background: radial-gradient(ellipse farthest-corner at 50% 0%, #14203A 0%, #0C111C 46%, #080B12 100%); }
#palco-interno { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px;
  -webkit-transition: -webkit-transform 8s ease-in-out; transition: transform 8s ease-in-out; }

/* ---------- testata ---------- */
#testata { position: absolute; left: 56px; top: 28px; width: 1808px; height: 80px; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
.targa-logo { position: relative; width: 214px; height: 72px; background: #FFFFFF; border-radius: 10px; overflow: hidden; -webkit-flex: 0 0 auto; flex: 0 0 auto; }
/* Il file del logo è usato così com'è (300x300 con margine bianco): qui se ne inquadra solo la parte centrale, senza deformarlo. */
.targa-logo img { position: absolute; width: 222.7px; height: 222.7px; left: -4.4px; top: -74.2px; }
.targa-logo.chiaro { background: none; width: auto; }
.targa-logo.chiaro img { position: static; width: auto; height: 72px; }
#logo-poste { display: none; margin-right: 30px; height: 72px; -webkit-flex: 0 0 auto; flex: 0 0 auto; }
#logo-poste img { height: 72px; width: auto; display: block; }
#titolo { margin-left: 30px; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }
#titolo-nome { font-size: 44px; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#titolo-sotto { font-size: 24px; color: #A9B4C4; margin-top: 4px; white-space: nowrap; }
#testata-dx { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-flex: 0 0 auto; flex: 0 0 auto; }
#meteo { display: none; -webkit-align-items: center; align-items: center; margin-right: 40px; }
#meteo-icona { display: block; width: 62px; height: 62px; }
#meteo-temp { font-size: 44px; font-weight: 500; margin-left: 12px; }
#orologio { text-align: right; }
#ora { font-size: 60px; font-weight: 600; line-height: 1; letter-spacing: 1px; }
#data { font-size: 23px; color: #A9B4C4; margin-top: 6px; }

/* ---------- schermate ---------- */
#schermate { position: absolute; left: 56px; top: 122px; width: 1808px; height: 840px; }
.schermata { position: absolute; left: 0; top: 0; width: 1808px; height: 840px; opacity: 0; visibility: hidden;
  -webkit-transition: opacity 0.9s ease, visibility 0s linear 0.9s; transition: opacity 0.9s ease, visibility 0s linear 0.9s; }
.schermata.attiva { opacity: 1; visibility: visible; -webkit-transition: opacity 0.9s ease, visibility 0s; transition: opacity 0.9s ease, visibility 0s; }
.schermata.ferma * { -webkit-animation-play-state: paused !important; animation-play-state: paused !important; }

.card, .tessera, .pannello { background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.075); border-radius: 22px; box-sizing: border-box; }
.card { padding: 22px 30px; position: relative; }
.etichetta { font-size: 25px; font-weight: 500; color: #A9B4C4; white-space: nowrap; }
.nota { font-size: 20px; font-weight: 400; color: #74808F; margin-left: 12px; }
.valore { white-space: nowrap; margin-top: 6px; }
.valore .n { font-size: 66px; font-weight: 600; line-height: 1.08; }
.valore .u { font-size: 30px; font-weight: 500; color: #A9B4C4; margin-left: 10px; }
.sotto { font-size: 22px; color: #74808F; margin-top: 6px; }
.nascosto { display: none !important; }

.col { position: absolute; top: 0; width: 400px; height: 500px; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.col-sx { left: 0; }
.col-dx { left: 1408px; }
.col .card { -webkit-flex: 1 1 0; flex: 1 1 0; margin-bottom: 19px; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: center; justify-content: center; }
.col .card:last-child { margin-bottom: 0; }

#s-panoramica .col { width: 470px; height: 480px; }
#s-panoramica .col-dx { left: 1338px; }
.card-eroe .valore .n { font-size: 124px; font-weight: 700; color: #F5B93F; }
.card-eroe .valore .u { font-size: 52px; font-weight: 600; color: #F5B93F; margin-left: 14px; }
.card-grande .valore .n { font-size: 100px; }
.card-grande .valore .u { font-size: 44px; margin-left: 12px; }
.card-eroe .etichetta, .card-grande .etichetta { font-size: 28px; }
.valore .accanto { font-size: 24px; color: #74808F; margin-left: 18px; }
.tema-poste .card-eroe .valore .n, .tema-poste .card-eroe .valore .u { color: #FFE100; }
#scena { position: absolute; left: 490px; top: 0; width: 828px; height: 480px; }
#scena svg { display: block; width: 828px; height: 480px; }
#c-benefici { position: absolute; left: 1338px; top: 500px; width: 470px; height: 340px; padding: 20px 30px; }

.card-grafico { position: absolute; padding: 20px 30px 16px 30px; }
#c-curva { left: 0; top: 500px; width: 1318px; height: 340px; }
.grafico { position: absolute; left: 22px; right: 22px; top: 58px; bottom: 10px; }
.grafico svg { display: block; }

.riga-beneficio { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin-top: 15px; }
.riga-beneficio .ico { display: block; width: 56px; height: 56px; -webkit-flex: 0 0 auto; flex: 0 0 auto; }
.riga-beneficio .testo { display: block; margin-left: 18px; }
.riga-beneficio .nome { display: block; font-size: 21px; color: #A9B4C4; }
.riga-beneficio .val { display: block; white-space: nowrap; }
.riga-beneficio .n { font-size: 38px; font-weight: 600; }
.riga-beneficio .u { font-size: 22px; color: #A9B4C4; margin-left: 8px; }

/* oggi (regione) */
.riga-eroi { position: absolute; left: 0; top: 0; width: 1808px; height: 250px; display: -webkit-flex; display: flex; }
.eroe { -webkit-flex: 1.25 1 0; flex: 1.25 1 0; padding: 10px 0 0 10px; }
.eroe-secondario { -webkit-flex: 1 1 0; flex: 1 1 0; }
.eroe .etichetta { font-size: 32px; }
.eroe .valore .n { font-size: 150px; font-weight: 600; line-height: 1.05; }
.eroe .valore .u { font-size: 56px; margin-left: 18px; }
.eroe-secondario .valore .n { font-size: 112px; }
.eroe-secondario .valore { margin-top: 30px; }
#c-curva-reg { left: 0; top: 270px; width: 1808px; height: 570px; }

/* energia */
.titolo-schermata { position: absolute; left: 4px; top: 0; height: 60px; font-size: 40px; font-weight: 600; white-space: nowrap; }
#tessere { position: absolute; left: 0; top: 76px; width: 1116px; height: 764px; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-align-content: flex-start; align-content: flex-start; }
.tessera { width: 548px; height: 372px; margin: 0 20px 20px 0; padding: 40px 44px; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: center; justify-content: center; }
.tessera.pari { margin-right: 0; }
.tessera .etichetta { font-size: 32px; }
.tessera .valore { margin-top: 14px; }
.tessera .valore .n { font-size: 104px; }
.tessera .valore .u { font-size: 44px; margin-left: 14px; }
.tessera .sotto { font-size: 24px; margin-top: 12px; min-height: 30px; }
#c-mesi { left: 1136px; top: 76px; width: 672px; height: 764px; }
#s-energia.senza-mesi #tessere { width: 1808px; }
#s-energia.senza-mesi .tessera { width: 894px; }

/* ambiente */
#pannelli { position: absolute; left: 0; top: 84px; width: 1808px; height: 756px; display: -webkit-flex; display: flex; }
.pannello { -webkit-flex: 1 1 0; flex: 1 1 0; margin-right: 20px; padding: 30px; text-align: center; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; }
.pannello.ultimo { margin-right: 0; }
.pannello .ico { width: 170px; height: 170px; margin-bottom: 26px; }
.pannello .valore .n { font-size: 118px; }
.pannello .valore .u { font-size: 48px; margin-left: 14px; }
.pannello .nome { font-size: 34px; color: #A9B4C4; margin-top: 10px; }
.pannello .formula { font-size: 22px; color: #74808F; margin-top: 26px; line-height: 1.35; max-width: 500px; }

/* sicilia */
#s-sicilia .titolo-schermata { display: none; }
#s-sicilia .col { height: 840px; }
#s-sicilia.con-titolo .titolo-schermata { display: block; }
#s-sicilia.con-titolo .col { top: 76px; height: 764px; }
#s-sicilia.con-titolo #mappa { top: 92px; height: 732px; }
#s-sicilia.con-titolo #mappa svg { height: 732px; }
#s-sicilia.con-titolo #c-elenco { top: 76px; height: 764px; }
#s-sicilia.con-titolo .riga-impianto { height: 82px; }
#s-sicilia .col .valore .n { font-size: 76px; }
#s-sicilia .col .valore .u { font-size: 34px; }
#mappa { position: absolute; left: 420px; top: 46px; width: 960px; height: 748px; }
#mappa svg { display: block; width: 960px; height: 748px; }
#c-elenco { position: absolute; left: 1400px; top: 0; width: 408px; height: 840px; padding: 22px 26px; }
#elenco { margin-top: 12px; }
.riga-impianto { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; height: 91px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.riga-impianto .num { -webkit-flex: 0 0 auto; flex: 0 0 auto; width: 38px; height: 38px; line-height: 38px; border-radius: 19px; text-align: center; font-size: 21px; font-weight: 700; color: #0B0F18; background: #F5B93F; }
.riga-impianto .chi { display: block; -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; overflow: hidden; margin-left: 14px; }
.riga-impianto .nome { display: block; font-size: 25px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.riga-impianto .sub { display: block; font-size: 19px; color: #74808F; margin-top: 2px; white-space: nowrap; }
.riga-impianto .kwh { -webkit-flex: 0 0 auto; flex: 0 0 auto; margin-left: 10px; text-align: right; font-size: 25px; font-weight: 600; white-space: nowrap; }
.riga-impianto .kwh small { font-size: 18px; font-weight: 500; color: #A9B4C4; margin-left: 5px; }
.riga-impianto.qui .nome { color: #FFFFFF; font-weight: 700; }

/* ---------- piede ---------- */
#piede { position: absolute; left: 56px; top: 974px; width: 1808px; height: 72px; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
#piede-sx .targa-logo { margin-right: 26px; }
#piede-sx { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-flex: 1 1 0; flex: 1 1 0; font-size: 22px; color: #74808F; white-space: nowrap; }
#badge-demo { display: none; margin-left: 18px; padding: 5px 14px; border: 1px solid #F5B93F; color: #F5B93F; border-radius: 20px; font-size: 19px; font-weight: 600; letter-spacing: 0.5px; }
#fonte-meteo { margin-left: 18px; font-size: 18px; }
#punti { -webkit-flex: 0 0 auto; flex: 0 0 auto; display: -webkit-flex; display: flex; }
#punti span { display: block; width: 10px; height: 10px; border-radius: 5px; margin: 0 6px; background: rgba(255, 255, 255, 0.2); -webkit-transition: all 0.6s; transition: all 0.6s; }
#punti span.attivo { width: 34px; background: #F5B93F; }
.con-comandi, .con-comandi body { cursor: auto; }
.con-comandi #punti span { cursor: pointer; width: 16px; height: 16px; border-radius: 8px; }
.con-comandi #punti span.attivo { width: 44px; }
#punti b { display: block; cursor: pointer; font-size: 44px; line-height: 40px; font-weight: 400; color: #F2F4F7; padding: 0 22px; margin-top: -8px; border: 1px solid rgba(255,255,255,0.25); border-radius: 12px; margin-left: 14px; margin-right: 14px; }
#punti { -webkit-align-items: center; align-items: center; }
#piede-dx { -webkit-flex: 1 1 0; flex: 1 1 0; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: flex-end; justify-content: flex-end; }
#dicitura { font-size: 22px; color: #A9B4C4; margin-right: 20px; white-space: nowrap; }
#logo-dussmann { height: 72px; width: auto; display: block; }

/* ---------- avviso dal pannello /admin: fascia in basso; le schermate si rimpiccioliscono un poco per fargli posto ---------- */
#avviso { display: none; position: absolute; left: 56px; top: 909px; width: 1808px; height: 56px; box-sizing: border-box; padding: 0 30px;
  border-radius: 14px; border: 1px solid rgba(245, 185, 63, 0.45); border-left: 8px solid #F5B93F; background: rgba(245, 185, 63, 0.13);
  color: #FFFFFF; font-size: 28px; font-weight: 500; line-height: 54px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#avviso.lungo { font-size: 21px; line-height: 26px; white-space: normal; padding-top: 1px; }
.con-avviso #avviso { display: block; }
.con-avviso #schermate { -webkit-transform-origin: 0 0; transform-origin: 0 0; -webkit-transform: translate(63px, 0) scale(0.93); transform: translate(63px, 0) scale(0.93); }
.tema-poste #avviso { border-color: rgba(255, 225, 0, 0.45); border-left-color: #FFE100; background: rgba(255, 225, 0, 0.11); }

/* ---------- schermo nero: modalità notte o schermo da configurare (sopra a tutto, animazioni ferme) ---------- */
#notte { display: none; position: fixed; left: 0; top: 0; width: 100%; height: 100%; background: #010102; z-index: 30; overflow: hidden; cursor: none; }
body.notte #notte { display: block; }
body.notte #palco, body.notte #avvio { visibility: hidden; }
body.notte #palco * { -webkit-animation-play-state: paused !important; animation-play-state: paused !important; -webkit-transition: none !important; transition: none !important; }
#notte-ora { position: absolute; left: 40px; top: 40px; white-space: nowrap; color: #3A4049; }
#notte-orario { font-size: 5vh; font-weight: 500; line-height: 1.1; letter-spacing: 1px; }
#notte-nota { font-size: 2.1vh; color: #59616D; margin-top: 0.8vh; }
#notte-nota:empty { display: none; }

/* ---------- schermata di avvio (mai una pagina di errore) ---------- */
#avvio { position: fixed; left: 0; top: 0; width: 100%; height: 100%; background: #080B12; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; z-index: 10; -webkit-transition: opacity 1s; transition: opacity 1s; }
#avvio.via { opacity: 0; pointer-events: none; }
#avvio-testo { font-size: 5vh; font-weight: 600; }
#avvio-sotto { font-size: 2.4vh; color: #74808F; margin-top: 1.6vh; }

/* ---------- animazioni discrete ---------- */
@-webkit-keyframes flusso { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -46; } }
@keyframes flusso { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -46; } }
@-webkit-keyframes respiro { 0% { opacity: 0.55; } 50% { opacity: 1; } 100% { opacity: 0.55; } }
@keyframes respiro { 0% { opacity: 0.55; } 50% { opacity: 1; } 100% { opacity: 0.55; } }
@-webkit-keyframes onda { 0% { opacity: 0.7; -webkit-transform: scale(0.6); } 100% { opacity: 0; -webkit-transform: scale(2.4); } }
@keyframes onda { 0% { opacity: 0.7; transform: scale(0.6); } 100% { opacity: 0; transform: scale(2.4); } }
.flusso { -webkit-animation: flusso 1.6s linear infinite; animation: flusso 1.6s linear infinite; }
.respiro { -webkit-animation: respiro 7s ease-in-out infinite; animation: respiro 7s ease-in-out infinite; }
.onda { -webkit-animation: onda 3.2s ease-out infinite; animation: onda 3.2s ease-out infinite; }
.senza-animazioni .flusso, .senza-animazioni .respiro, .senza-animazioni .onda { -webkit-animation: none !important; animation: none !important; }

/* ---------- tema Poste Italiane (spento di default: vedi impostazioni.json, "temaPoste") ---------- */
.tema-poste #badge-demo { border-color: #FFE100; color: #FFE100; }
.tema-poste #punti span.attivo { background: #FFE100; }
.tema-poste .riga-impianto .num { background: #FFE100; }
.tema-poste #logo-poste.presente { display: block; }

/* ---------- pagina accesso.html (configurazione dello schermo, si usa con il telecomando) ---------- */
html.pagina-accesso, html.pagina-accesso body { height: auto; min-height: 100%; overflow: auto; cursor: auto; }
html.pagina-accesso body { box-sizing: border-box; padding: 8vh 8vw; background: #0A0E17; }
.pagina-accesso h1 { font-size: 5vh; font-weight: 600; margin: 0 0 1.5vh 0; }
.pagina-accesso p { font-size: 2.6vh; color: #A9B4C4; margin: 0 0 4vh 0; max-width: 70vw; line-height: 1.35; }
.pagina-accesso label { display: block; font-size: 2.6vh; color: #A9B4C4; margin: 2.5vh 0 1vh 0; }
.pagina-accesso input { font-family: inherit; font-size: 4.5vh; padding: 1.2vh 1.5vw; width: 40vw; background: #18223A; color: #FFFFFF; border: 3px solid #2C3B5C; border-radius: 12px; letter-spacing: 0.3vw; text-transform: uppercase; }
.pagina-accesso input:focus { border-color: #F5B93F; outline: none; }
.pagina-accesso button { display: block; margin-top: 5vh; font-family: inherit; font-size: 3.2vh; padding: 1.6vh 3vw; background: #F5B93F; color: #0B0F18; border: 0; border-radius: 12px; font-weight: 700; cursor: pointer; }
.pagina-accesso button:focus { outline: 4px solid #FFFFFF; outline-offset: 4px; }
.pagina-accesso #esito { font-size: 2.6vh; color: #F5B93F; margin-top: 3vh; min-height: 3vh; }
