/* Pannello iPad per iOS 9: niente variabili CSS, niente grid; flexbox con prefissi */
* { box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,0); margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: #0b0c0f; color: #fff; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; -webkit-user-select: none; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
.mdi:before { line-height: 1; }

#bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #121317; background: -webkit-radial-gradient(50% 0%, ellipse cover, #23252b 0%, #121317 55%, #08090b 100%); background: radial-gradient(ellipse at 50% 0%, #23252b 0%, #121317 55%, #08090b 100%); }
#glow { position: absolute; width: 700px; height: 700px; left: -250px; top: -420px; border-radius: 50%; background: #ffb547; opacity: .18; -webkit-filter: blur(80px); filter: blur(80px); -webkit-transition: background .8s; transition: background .8s; }
body.sila #glow { background: #3ccf8e; }

/* top bar */
#top { position: absolute; top: 14px; left: 18px; right: 18px; height: 52px; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; z-index: 2; }
#tabs { display: -webkit-flex; display: flex; padding: 4px; border-radius: 30px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.13); }
.tab { display: block; width: 150px; height: 42px; line-height: 42px; text-align: center; border-radius: 22px; font-size: 18px; font-weight: 600; color: rgba(255,255,255,.72); }
.tab .mdi { font-size: 20px; }
.tab.sel { background: #fff; color: #111; }
#who { -webkit-flex: 1; flex: 1; text-align: center; font-size: 15px; color: rgba(255,255,255,.6); }
#clock { font-size: 26px; font-weight: 300; letter-spacing: -.5px; text-align: right; }
#clock small { display: block; font-size: 13px; color: rgba(255,255,255,.6); letter-spacing: 0; }

/* layout */
#stage { position: absolute; top: 80px; left: 18px; right: 18px; bottom: 16px; }
.page { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.page.hide { display: none; }
.row { display: -webkit-flex; display: flex; margin-bottom: 12px; }
.row:last-child { margin-bottom: 0; }
.r1 { -webkit-flex: 1.35; flex: 1.35; }
.r2 { -webkit-flex: 1; flex: 1; }
.r3 { height: 150px; }
.row > .tile { -webkit-flex: 1; flex: 1; margin-right: 12px; min-width: 0; }
.row > .tile:last-child { margin-right: 0; }
.r1 .weather { -webkit-flex: 1.15; flex: 1.15; }
.r1 .heat { -webkit-flex: 1.4; flex: 1.4; }

.tile { position: relative; border-radius: 22px; padding: 16px 16px; overflow: hidden;
  background: rgba(255,255,255,.08); background: -webkit-linear-gradient(-65deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 50%, rgba(255,255,255,.04) 100%); background: linear-gradient(155deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 50%, rgba(255,255,255,.04) 100%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 26px rgba(0,0,0,.35); }
.tile.press { -webkit-transform: scale(.97); transform: scale(.97); }
.k { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; color: rgba(255,255,255,.55); text-transform: uppercase; }
.k .mdi { font-size: 15px; }
.big { font-size: 64px; font-weight: 300; letter-spacing: -2px; line-height: 1; }
.mid { font-size: 34px; font-weight: 600; letter-spacing: -1px; line-height: 1.05; }
.d { font-size: 14px; color: rgba(255,255,255,.72); line-height: 1.4; margin-top: 6px; }
.d b { color: #fff; }

/* weather */
.weather .wtop { display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between; font-size: 14px; color: rgba(255,255,255,.75); }
.weather .wmain { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin-top: 10px; }
.weather .wmain .mdi { font-size: 62px; margin-right: 12px; }
.weather .wcond { font-size: 18px; font-weight: 600; margin-top: 4px; }
.weather .wfoot { position: absolute; left: 16px; right: 16px; bottom: 14px; display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between; font-size: 14px; color: rgba(255,255,255,.8); border-top: 1px solid rgba(255,255,255,.15); padding-top: 10px; }
.weather.rain { background: #22304a; background: -webkit-linear-gradient(-65deg, #2c3d5c, #1b2436); background: linear-gradient(155deg, #2c3d5c, #1b2436); }
.weather.sun { background: #2f5d8a; background: -webkit-linear-gradient(-65deg, #3c78b0, #234766); background: linear-gradient(155deg, #3c78b0, #234766); }

/* cams */
.cam { padding: 0; background: #000; }
.cam img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.camlbl { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; font-size: 16px; font-weight: 700; background: -webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,.75)); background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.75)); }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: #ff453a; margin-right: 4px; vertical-align: 2px; }
.camoff { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; text-align: center; padding-top: 30%; color: rgba(255,255,255,.6); font-size: 15px; }
.camoff .mdi { display: block; font-size: 40px; }
.cam.off img, .cam.off .live { display: none; }
.cam.off .camoff { display: block; }

/* buttons */
.btn { text-align: center; padding-top: 18px; }
.btn .ic { width: 60px; height: 60px; line-height: 60px; border-radius: 30px; margin: 0 auto 10px; background: rgba(255,255,255,.1); font-size: 32px; }
.btn .t { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn .st { font-size: 13px; color: rgba(255,255,255,.65); margin-top: 3px; }
.btn.on { background: #fff; color: #111; }
.btn.on .ic { background: #ffb547; color: #111; }
body.sila .btn.on .ic { background: #3ccf8e; }
.btn.on .st { color: rgba(0,0,0,.55); }
.btn.warn .ic { background: #ff453a; }
.stepper .row2 { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; margin-top: 6px; }
.stepper .row2 a { display: block; width: 46px; height: 46px; line-height: 44px; border-radius: 23px; background: rgba(255,255,255,.14); font-size: 30px; font-weight: 300; }
.stepper .val { font-size: 34px; font-weight: 600; width: 92px; }

/* heat */
.heat .hv { display: -webkit-flex; display: flex; -webkit-align-items: baseline; align-items: baseline; margin-top: 14px; }
.heat .hv .big { font-size: 78px; margin-right: 10px; }
.bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.14); margin-top: 14px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: #3ccf8e; }
.bar.w i { background: #ff9f43; } .bar.r i { background: #ff453a; }
.heat.on { background: #1f6b4c; background: -webkit-linear-gradient(-65deg, #2a8a62, #164a36); background: linear-gradient(155deg, #2a8a62, #164a36); }
.chips { margin-top: 12px; }
.chip { display: inline-block; padding: 5px 10px; border-radius: 14px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 600; margin: 0 4px 6px 0; }
.chip.red { background: rgba(255,69,58,.35); }

/* info grid */
.kv { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin-top: 8px; }
.kv div { width: 50%; padding: 6px 0; }
.kv b { display: block; font-size: 24px; font-weight: 600; }
.kv span { font-size: 12px; color: rgba(255,255,255,.6); }

/* forecast / gas strip */
.wide { display: -webkit-flex; display: flex; }
.wide .col { -webkit-flex: 1; flex: 1; text-align: center; border-right: 1px solid rgba(255,255,255,.08); }
.wide .col:last-child { border-right: 0; }
.wide .col.lbl { -webkit-flex: 1.4; flex: 1.4; text-align: left; padding-right: 10px; }
.fh { font-size: 14px; color: rgba(255,255,255,.65); }
.fi { font-size: 30px; margin: 6px 0; }
.ft { font-size: 20px; font-weight: 600; }
.fp { font-size: 12px; color: #7fb2ff; margin-top: 2px; }
.gasbox { -webkit-flex: 1; flex: 1; padding: 0 12px; border-right: 1px solid rgba(255,255,255,.08); }
.gasbox:last-child { border-right: 0; }
.bars { display: -webkit-flex; display: flex; -webkit-align-items: flex-end; align-items: flex-end; height: 92px; margin-top: 8px; }
.bars .b { -webkit-flex: 1; flex: 1; margin: 0 2px; text-align: center; font-size: 11px; color: rgba(255,255,255,.55); height: 100%; position: relative; }
.bars .b i { position: absolute; left: 15%; right: 15%; bottom: 16px; background: #ff9f43; border-radius: 3px 3px 0 0; }
.bars .b em { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; }
.bars .b.cur em { color: #3ccf8e; font-weight: 700; }

/* popup */
#overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); z-index: 10; }
#overlay.on { display: block; }
#pop { position: absolute; left: 50%; top: 50%; width: 520px; margin-left: -260px; -webkit-transform: translateY(-50%); transform: translateY(-50%); border-radius: 26px; padding: 26px; background: #1d1f24; border: 1px solid rgba(255,255,255,.12); text-align: center; }
#pop.camp { width: 960px; margin-left: -480px; padding: 14px; }
#pop.camp img { width: 100%; border-radius: 16px; display: block; background: #000; min-height: 400px; }
#pop h2 { font-size: 26px; margin-bottom: 6px; }
#pop p { font-size: 16px; color: rgba(255,255,255,.7); margin-bottom: 20px; }
.pbtns { display: -webkit-flex; display: flex; margin-top: 12px; }
.pbtns a { display: block; -webkit-flex: 1; flex: 1; margin: 0 6px; padding: 18px 0; border-radius: 18px; background: rgba(255,255,255,.12); font-size: 20px; font-weight: 700; }
.pbtns a.go { background: #ffb547; color: #111; }
body.sila .pbtns a.go { background: #3ccf8e; }
.pbtns a.danger { background: #ff453a; color: #fff; }

#toast { position: fixed; left: 50%; bottom: 30px; width: 420px; margin-left: -210px; padding: 14px 18px; border-radius: 18px; background: #fff; color: #111; font-size: 17px; font-weight: 600; text-align: center; opacity: 0; -webkit-transition: opacity .3s; transition: opacity .3s; z-index: 20; pointer-events: none; }
#toast.on { opacity: 1; }
#toast.err { background: #ff453a; color: #fff; }

/* login / setup */
body.login { overflow: auto; background: #121317; -webkit-user-select: text; }
.box { width: 400px; margin: 60px auto; padding: 30px; border-radius: 26px; background: #1d1f24; border: 1px solid rgba(255,255,255,.12); }
.box.boxwide { width: 520px; max-width: 94%; display: block; }
.qr canvas { display: none !important; }
.qr img { display: block; width: 200px; height: 200px; }
.logo { font-size: 34px; font-weight: 700; text-align: center; }
.sub { text-align: center; color: rgba(255,255,255,.6); margin: 4px 0 20px; }
.box label { display: block; font-size: 14px; color: rgba(255,255,255,.7); margin-bottom: 14px; }
.box input { display: block; width: 100%; margin-top: 6px; padding: 14px; font-size: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: #0f1013; color: #fff; -webkit-appearance: none; }
.box button { display: block; width: 100%; padding: 16px; margin-top: 8px; font-size: 20px; font-weight: 700; border: 0; border-radius: 14px; background: #ffb547; color: #111; -webkit-appearance: none; }
.box .hint, .small { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 14px; text-align: center; line-height: 1.4; }
.box ol { margin: 10px 0 10px 20px; font-size: 15px; line-height: 1.4; color: rgba(255,255,255,.85); }
.err { background: rgba(255,69,58,.25); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 15px; }
.qr { width: 216px; margin: 10px auto; padding: 8px; background: #fff; border-radius: 10px; }
.center { text-align: center; } .center a { color: #ffb547; font-weight: 600; }
code { font-size: 13px; word-break: break-all; }

/* portrait */
@media (orientation: portrait) {
  .r1 { -webkit-flex: 1.2; flex: 1.2; }
  .big { font-size: 52px; }
  .heat .hv .big { font-size: 64px; }
  .tab { width: 130px; }
  #pop.camp { width: 740px; margin-left: -370px; }
}

/* v2: meteo cliccabile, popup larghe, aperture, pioggia */
.whint { position: absolute; right: 16px; bottom: 54px; font-size: 13px; color: rgba(255,255,255,.55); }
#pop.pw { width: 900px; margin-left: -450px; text-align: left; max-height: 720px; overflow: auto; -webkit-overflow-scrolling: touch; }
#pop.pw h2 { margin-bottom: 4px; }
#pop.pw p { margin-bottom: 12px; }
.wxnow { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin: 8px 0 12px; }
.wxnow > .mdi { font-size: 70px; margin-right: 14px; }
.wxnow .big { font-size: 60px; }
.wxkv { -webkit-flex: 1; flex: 1; margin-left: 30px; }
.wxkv div { width: 50%; }
.alert { padding: 12px 14px; border-radius: 14px; background: rgba(127,178,255,.16); font-size: 16px; line-height: 1.5; margin-bottom: 6px; }
.alert.ok { background: rgba(60,207,142,.18); }
.sec { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; color: rgba(255,255,255,.55); text-transform: uppercase; margin: 14px 0 6px; }
.strip { display: -webkit-flex; display: flex; background: rgba(255,255,255,.05); border-radius: 14px; padding: 10px 0; }
.strip .fi { font-size: 26px; margin: 4px 0; }
.strip .ft { font-size: 18px; }
.ft small { font-size: 14px; color: rgba(255,255,255,.55); font-weight: 400; }
.src { font-size: 12px !important; color: rgba(255,255,255,.45) !important; margin-top: 10px; }
.list { border-radius: 14px; background: rgba(255,255,255,.05); }
.lrow { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 17px; }
.lrow:last-child { border-bottom: 0; }
.lrow .mdi { font-size: 24px; width: 36px; }
.lrow b { width: 140px; }
.lrow span { width: 230px; color: rgba(255,255,255,.8); }
.lrow em { -webkit-flex: 1; flex: 1; font-style: normal; color: rgba(255,255,255,.5); font-size: 14px; text-align: right; }
.gaskv div { width: 33.33%; }
.bars.tall { height: 160px; margin-top: 16px; }
.bars .b span { position: absolute; left: 0; right: 0; top: 0; font-size: 12px; color: rgba(255,255,255,.75); }
.rainal { border-radius: 12px; }
.rainal .k { color: #7fb2ff; }
.rainal.ok .k { color: #3ccf8e; }
.rainal .d b { font-weight: 600; }
.info { cursor: pointer; }
.pbtns a { text-align: center; }

/* v3: illustrazioni, uniformità tra le case */
.weather .art { position: absolute; right: 0; bottom: 44px; width: 72%; height: 74%; pointer-events: none; opacity: .85; }
.weather .art svg { position: absolute; right: 0; bottom: 0; width: 100%; height: 100%; }
.weather .wtop, .weather .wmain, .weather .wchips, .weather .wfoot, .weather .whint { position: relative; z-index: 1; }
.weather .wfoot { position: absolute; }
.weather .whint { position: absolute; top: 16px; right: 16px; bottom: auto; display: none; }
.wchips { margin-top: 10px; }
.chip.blue { background: rgba(127,178,255,.3); }
.chip.dim { background: rgba(0,0,0,.18); color: rgba(255,255,255,.75); font-weight: 400; }
#who b { color: #fff; font-weight: 700; }
#net { width: 10px; height: 10px; border-radius: 5px; margin: 0 14px; background: #3ccf8e; }
#net.off { background: #ff453a; }
/* accento per casa */
body.tiriolo .k .mdi, body.tiriolo .rainal .k { color: #ffb547; }
body.sila .k .mdi, body.sila .rainal .k { color: #3ccf8e; }
.weather .k .mdi { color: inherit; }
.btn .ic { border: 2px solid rgba(255,255,255,.08); }
body.tiriolo .btn .ic { color: #ffd08a; }
body.sila .btn .ic { color: #8de6bd; }
.btn.on .ic { color: #111; }
.btn.warn .ic { color: #fff; }
/* ultime aperture */
.r2 .opens { -webkit-flex: 1.5; flex: 1.5; }
.orow { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 16px; }
.orow:last-of-type { border-bottom: 0; }
.orow .mdi { font-size: 22px; width: 32px; color: #ffd08a; }
.orow b { -webkit-flex: 1; flex: 1; }
.orow span { color: rgba(255,255,255,.7); font-size: 14px; }
.opens .k { margin-bottom: 6px; }
.more { position: absolute; right: 16px; bottom: 12px; font-size: 13px; color: rgba(255,255,255,.55); }
/* striscia in basso uguale nelle due case */
.col.tom { background: rgba(255,255,255,.05); border-radius: 12px; }
.rainal .d { font-size: 13px; }
/* popup meteo con illustrazione */
.banner { position: relative; height: 130px; margin: -26px -26px 12px; padding: 22px 26px; border-radius: 26px 26px 0 0; overflow: hidden; background: #2a3448; }
.banner.rain { background: -webkit-linear-gradient(-65deg, #2c3d5c, #1b2436); background: linear-gradient(155deg, #2c3d5c, #1b2436); }
.banner.sun { background: -webkit-linear-gradient(-65deg, #3c78b0, #234766); background: linear-gradient(155deg, #3c78b0, #234766); }
.banner .art { position: absolute; right: 10px; bottom: 0; width: 300px; height: 100%; }
.banner .art svg { width: 100%; height: 100%; }
.banner h2, .banner .bsub { position: relative; z-index: 1; }
.bsub { font-size: 14px; color: rgba(255,255,255,.7); }

.wide .col.lbl.rainal { -webkit-flex: 1.9; flex: 1.9; }
.rainal .k { letter-spacing: 1px; line-height: 1.35; }

/* v4: illustrazioni a tutta superficie */
.weather, .weather.rain, .weather.sun { background: #2a3442; }
.weather .art { top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; opacity: 1; }
.weather .art svg { width: 100%; height: 100%; }
.shade { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none;
  background: -webkit-linear-gradient(top, rgba(8,12,18,.62) 0%, rgba(8,12,18,.18) 45%, rgba(8,12,18,.15) 60%, rgba(8,12,18,.78) 100%);
  background: linear-gradient(180deg, rgba(8,12,18,.62) 0%, rgba(8,12,18,.18) 45%, rgba(8,12,18,.15) 60%, rgba(8,12,18,.78) 100%); }
.weather .wtop, .weather .wmain, .weather .wchips, .weather .wfoot { text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.weather .wfoot { border-top-color: rgba(255,255,255,.22); }
.weather .chip.dim { background: rgba(0,0,0,.35); }
.banner { height: 170px; background: #2a3442; }
.banner .art { top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.banner .shade { background: -webkit-linear-gradient(left, rgba(8,12,18,.7) 0%, rgba(8,12,18,.15) 55%); background: linear-gradient(90deg, rgba(8,12,18,.7) 0%, rgba(8,12,18,.15) 55%); }
.banner h2 { text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.banner { height: 210px; }
