/* snapshot.css - load AFTER style.css. The weather widget (top right) and the shelf of widgets along the bottom.
   Every widget has the same anatomy: a small coloured label with an icon on top, the value below it.
   Sizes come only from the steps in style.css. No blur is used on the widgets (it made some TVs flash). */

/* ---- flash fixes ---- */
#hud, #snap { will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
#hud { transform: translate3d(0, 0, 0); }
#scene { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(30, 30, 32, .72); }
#fade { z-index: 3; pointer-events: none; }

/* ---- the layer that holds every widget (the whole screen, so each piece can sit in its own corner) ---- */
#snap {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; pointer-events: none;
  color: var(--ink); text-shadow: none;
  transform: translate3d(0, 0, 0);
  transition: transform 25s ease-in-out, opacity .8s;
  animation: snapin 1.4s .5s cubic-bezier(.2, .8, .2, 1) backwards;
}
@keyframes snapin { from { opacity: 0; } to { opacity: 1; } }
body.nohud #snap { opacity: 0; }

/* glass look shared by every widget */
#sw, .tile {
  box-sizing: border-box; padding: 1.4vw 1.6vw; border-radius: 2.2vw;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .05) 100%), rgba(16, 16, 20, .5);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1vw 3vw rgba(0, 0, 0, .35);
}

/* label that starts every widget */
.tl-h { display: flex; align-items: center; font-size: 1.05vw; font-weight: 600; letter-spacing: .005em; color: var(--ink2); white-space: nowrap; }
.tl-h svg { flex: none; width: 1.2vw; height: 1.2vw; margin-right: .5vw; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- weather widget: top right ---- */
#sw { position: absolute; top: 5vh; right: var(--edge); width: 28vw; display: flex; flex-wrap: wrap; align-items: center; }
#sw-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
#loc { display: flex; align-items: center; font-size: var(--body); font-weight: 600; letter-spacing: 0; color: var(--ink); }
#loc::before {
  content: ''; flex: none; width: 1.2vw; height: 1.2vw; margin-right: .5vw;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z'/><circle cx='12' cy='10' r='2.4'/></svg>") center / contain no-repeat;
}
#sunt { font-size: var(--cap); font-weight: 500; color: var(--ink3); }
#sw-row { flex: 0 0 auto; display: flex; align-items: center; margin-top: .5vw; }
#wt { font-size: var(--hero); font-weight: 300; line-height: 1; letter-spacing: -.05em; white-space: nowrap; font-variant-numeric: tabular-nums; }
#wi { margin-left: 1vw; }
#wi svg { width: 3.6vw; height: 3.6vw; display: block; stroke: #fff; fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
#sw-sub { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; margin-top: .5vw; text-align: right; white-space: pre; }
#wc { font-size: var(--title); font-weight: 600; letter-spacing: -.01em; }
#wh { margin: .2vw 0 0; font-size: var(--body); color: var(--ink2); font-variant-numeric: tabular-nums; }
#sd { width: 100%; margin-top: 1vw; padding-top: 1vw; border-top: 1px solid var(--line); }
#sd:empty { display: none; }
.sn-soon { display: inline-block; margin-bottom: .9vw; padding: .35vw 1.1vw; border-radius: 99px; background: rgba(100, 210, 255, .18); color: var(--cyan); font-size: var(--body); font-weight: 600; }
.sn-stats { display: flex; justify-content: space-between; }
.sn-stats b { display: block; font-size: var(--title); font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sn-stats span { display: block; margin-top: .15vw; font-size: var(--cap); color: var(--ink3); white-space: nowrap; }

/* ---- the bottom shelf: school day, dinner, schedule (left) and countdown (right). Every widget is the same height. ---- */
#sb { position: absolute; left: var(--edge); right: calc(var(--edge) + 18.6vw); bottom: 6.5vh; display: flex; align-items: stretch; }
#snap.hide-count #sb { right: var(--edge); }
#bd { position: absolute; right: var(--edge); bottom: 6.5vh; width: 17vw; }
#bd:empty { display: none; }
#sb .tile, #snap #bd > .tile { height: var(--tile-h); overflow: hidden; }
#sb .tiles .tile, #snap #bd > .tile { margin: 0; }
#sb .sn-err { position: absolute; left: .5vw; top: 100%; margin-top: .5vw; white-space: nowrap; }
.sn-err { font-size: var(--cap); color: var(--ink3); }

/* school + dinner: label on top, value at the bottom */
.tiles { display: flex; flex: none; align-items: stretch; }
.tiles .tile { flex: none; width: 15vw; display: flex; flex-direction: column; justify-content: space-between; }
#sb .tiles .tile + .tile { margin-left: 1.6vw; }
#snap.hide-school .tiles .t-dinner { margin-left: 0; }
.tl-b { margin-top: auto; }
.tl-v { font-size: var(--title); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.tl-v.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tl-s { margin-top: .3vw; font-size: var(--body); color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-f { margin-top: .6vw; padding-top: .6vw; border-top: 1px solid var(--line); font-size: var(--cap); color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-dinner .tl-h { color: var(--orange); }

/* the school tile is tinted by the day: a Red Day tile is red, a White Day tile is white */
.t-school.red { background: linear-gradient(160deg, #ff6a60 0%, #c1271d 100%); border-color: rgba(255, 255, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.t-school.red .tl-h, .t-school.red .tl-s, .t-school.red .tl-f { color: rgba(255, 255, 255, .86); }
.t-school.red .tl-f { border-color: rgba(255, 255, 255, .26); }
.t-school.white { background: linear-gradient(160deg, #ffffff 0%, #d9d9e0 100%); color: #1c1c1e; border-color: rgba(255, 255, 255, .8); box-shadow: inset 0 1px 0 #fff; }
.t-school.white .tl-h, .t-school.white .tl-s, .t-school.white .tl-f { color: rgba(0, 0, 0, .56); }
.t-school.white .tl-f { border-color: rgba(0, 0, 0, .14); }

/* ---- schedule: fills the rest of the shelf, events in two columns ---- */
#sb .tiles + .t-sched { margin-left: 1.6vw; }
#snap.hide-school.hide-dinner .tiles + .t-sched { margin-left: 0; }
.t-sched { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-content: flex-start; }
.t-sched .tl-h { width: 100%; color: var(--red); }
.ev { position: relative; margin-top: 1vw; padding-left: 1.3vw; }
.ev::before { content: ''; position: absolute; left: 0; top: .2vw; bottom: .2vw; width: .28vw; border-radius: 99px; background: rgba(255, 255, 255, .3); }
.ev.next::before { background: #fff; }
.ev.now::before { background: var(--red); }
.ev.allday::before { background: var(--cyan); }
.ev.past::before { background: rgba(255, 255, 255, .16); }
.ev.past .evt { color: var(--ink2); }
.evt { font-size: var(--title); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.evs { margin-top: .2vw; font-size: 1.2vw; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.evs.loc { display: none; }
.ev.now .evs { color: var(--red); }
.ev.past .evs { color: var(--ink3); }
.t-sched .ev { width: 50%; box-sizing: border-box; padding-right: 1vw; }
.t-sched .sn-more { position: absolute; top: 1.5vw; right: 1.7vw; margin: 0; padding: 0; font-size: var(--cap); font-weight: 600; color: var(--ink3); }
.t-sched .sn-empty { width: 100%; margin-top: 1.2vw; font-size: var(--body); color: var(--ink2); }

/* ---- countdown: name on the left, days on the right ---- */
.t-count .tl-h { color: var(--green); }
.t-count .ev { display: flex; align-items: baseline; justify-content: space-between; margin-top: .9vw; }
.t-count .evt { flex: 1 1 0; min-width: 0; display: block; font-size: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-count .evs { flex: none; margin: 0 0 0 .8vw; font-size: var(--body); }

/* ---- board tools (timer, music, notes) moved to the top centre so they never cover the clock or the weather ---- */
body #bs { left: 50%; top: 4vh; transform: translateX(-50%); align-items: center; }
body .bnote { top: 17vh; }

/* school tile: always the same grey glass as the other tiles */
#sb .t-school, #sb .t-school.red, #sb .t-school.white {
  background: linear-gradient(180deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .05) 100%), rgba(16, 16, 20, .5) !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1vw 3vw rgba(0, 0, 0, .35) !important;
  color: var(--ink) !important;
}
#sb .t-school .tl-h, #sb .t-school .tl-s, #sb .t-school .tl-f { color: var(--ink2) !important; }
#sb .t-school .tl-f { border-color: var(--line) !important; }