/* PRVN Affiliate TV in a browser. Sizes are px on a 1920x1080 stage that tv.js scales to the
   screen, as the Apple TV app's points are. Written for old TV browsers: flexbox without gap,
   no grid, no inset, no custom properties. Colours are the TV's (dark) Theme:
   gold #C8B081, background #0A0A0A, card #161616, raised #1F1F1F, muted #A3A3A3,
   line rgba(255,255,255,.1), on gold #0A0A0A. */

@font-face { font-family: "Barlow SC"; src: url("fonts/BarlowSemiCondensed-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Barlow SC"; src: url("fonts/BarlowSemiCondensed-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: "Barlow SC"; src: url("fonts/BarlowSemiCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: "Barlow SC"; src: url("fonts/BarlowSemiCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: "Barlow SC"; src: url("fonts/BarlowSemiCondensed-ExtraBold.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: block; }

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; background: #0A0A0A; color: #fff;
}
body {
  font-family: "Barlow SC", "Arial Narrow", Arial, sans-serif;
  font-weight: 400; line-height: 1.2;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body.idle, body.idle * { cursor: none !important; }
* { box-sizing: border-box; -webkit-box-sizing: border-box; }
img { display: block; border: 0; }
button { font-family: inherit; line-height: 1.2; margin: 0; outline: none; cursor: pointer; }
button::-moz-focus-inner { border: 0; }

#stage {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden;
  background: #0A0A0A;
  -webkit-transform-origin: 0 0; -ms-transform-origin: 0 0; transform-origin: 0 0;
}

/* Layout */
.row { display: -webkit-flex; display: flex; -webkit-flex-direction: row; flex-direction: row; }
.col { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.ai-c { -webkit-align-items: center; align-items: center; }
.ai-s { -webkit-align-items: flex-start; align-items: flex-start; }
.ai-b { -webkit-align-items: baseline; align-items: baseline; }
.ai-st { -webkit-align-items: stretch; align-items: stretch; }
.jc-c { -webkit-justify-content: center; justify-content: center; }
.grow { -webkit-flex: 1 1 0px; flex: 1 1 0px; min-width: 0; }
.spacer { -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 8px; }
.fixed { -webkit-flex: 0 0 auto; flex: 0 0 auto; }
.stretch { -webkit-align-self: stretch; align-self: stretch; }
.center-text { text-align: center; }
.nowrap { white-space: nowrap; }
.wrap { word-wrap: break-word; overflow-wrap: break-word; }
.sp18 { margin-top: 18px; }
.sp36 { margin-top: 36px; }

/* Type: Font.barlow weights */
.heavy { font-weight: 800; }
.bold { font-weight: 700; }
.semibold { font-weight: 600; }
.medium { font-weight: 500; }
.upper { text-transform: uppercase; }
.muted { color: #A3A3A3; }
.gold { color: #C8B081; }
.tnum { font-variant-numeric: tabular-nums; -webkit-font-feature-settings: "tnum" 1; font-feature-settings: "tnum" 1; }
.f26 { font-size: 26px; } .f30 { font-size: 30px; } .f36 { font-size: 36px; }
.f40 { font-size: 40px; } .f58 { font-size: 58px; }

/* Views: one at a time */
.view {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px;
  display: none;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
}
.view.on { display: -webkit-flex; display: flex; }
#v-showing { -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: stretch; align-items: stretch; -webkit-justify-content: flex-start; justify-content: flex-start; }

.spinner {
  width: 64px; height: 64px; border-radius: 50%;
  border: 6px solid rgba(200,176,129,.25); border-top-color: #C8B081;
  -webkit-animation: spin 1s linear infinite; animation: spin 1s linear infinite;
}
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pairing (PairingView) */
#v-pairing > .row { padding: 80px; }
.step-n {
  width: 52px; height: 52px; line-height: 52px; border-radius: 50%;
  background: #C8B081; color: #000; text-align: center;
  font-size: 30px; font-weight: 800;
  -webkit-flex: 0 0 auto; flex: 0 0 auto;
}
.step-n + div { margin-left: 20px; }
.pair-code { font-size: 150px; font-weight: 800; letter-spacing: 10px; color: #C8B081; line-height: 1.2; white-space: nowrap; }
.qr-box {
  margin-left: 120px; padding: 28px; background: #fff; border-radius: 24px;
  width: 476px; height: 476px; -webkit-flex: 0 0 auto; flex: 0 0 auto;
}
.qr-box svg, .ch-qr svg { display: block; }

/* Problem (ProblemView) */
.problem-text { max-width: 1200px; margin-top: 40px; }
#unpair { margin-top: 40px; }

/* TVChipStyle: gold fill and a slight lift on whatever the remote is on */
.chip {
  position: relative; display: block;
  padding: 10px 14px; border: 0; border-radius: 12px;
  background: transparent; color: #fff;
  -webkit-transition: -webkit-transform .15s ease-out, background-color .15s ease-out, box-shadow .15s ease-out;
  transition: transform .15s ease-out, background-color .15s ease-out, box-shadow .15s ease-out;
}
.chip.selected { background: #1F1F1F; }
.chip.selected:after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: #C8B081;
}
.chip.focused {
  background: #C8B081; color: #000;
  -webkit-transform: scale(1.08); transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  z-index: 2;
}
.chip.focused:after { display: none; }
.chip:active { -webkit-transform: scale(.96); transform: scale(.96); }
.chip.focused:active { -webkit-transform: scale(1.04); transform: scale(1.04); }
.chip.disabled { opacity: .35; cursor: default; }
.chip svg { display: block; }

/* Top bar */
#topbar { -webkit-flex: 0 0 auto; flex: 0 0 auto; }
.topbar {
  padding: 22px 60px; background: #161616;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.1);
}
.topbar > * + * { margin-left: 28px; }
.zoom > * + * { margin-left: 10px; }
.zoom-val { width: 90px; text-align: center; font-size: 24px; font-weight: 700; }
.days > * + * { margin-left: 6px; }
.day-chip .wd { font-size: 24px; font-weight: 800; text-align: center; }
.day-chip .dt { font-size: 16px; font-weight: 500; opacity: .8; text-align: center; margin-top: 2px; }
.day-chip .inner { width: 74px; }

/* Class bar (ClassBar) */
#classbar { -webkit-flex: 0 0 auto; flex: 0 0 auto; }
.classbar { background: #161616; }
.cb-row { padding: 14px 70px; }
.cb-row > .sp { margin-left: 28px; }

/* The main area: the board, a piece's clock, or the challenge */
#main { position: relative; -webkit-flex: 1 1 0px; flex: 1 1 0px; min-height: 0; overflow: hidden; }
.fill { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
.scroll {
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.board { padding: 40px 70px; }
.vs { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: center; align-items: center; text-align: center; }
.vs > * { max-width: 100%; }
.vsl { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: flex-start; align-items: flex-start; text-align: left; }
.line { background: rgba(255,255,255,.1); }
.rule { background: #C8B081; }
.cap { display: inline-block; border-style: solid; border-color: #C8B081; border-radius: 999px; }
.note-strip { position: relative; -webkit-align-self: stretch; align-self: stretch; background: rgba(200,176,129,.12); text-align: left; }
.note-strip .bar { position: absolute; left: 0; top: 0; bottom: 0; background: #C8B081; }
.meta-item { white-space: nowrap; }

/* Piece clock (PieceClockView) */
.pclock-panel {
  height: 100%; background: #161616; -webkit-flex: 0 0 auto; flex: 0 0 auto;
  display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column;
  -webkit-justify-content: center; justify-content: center;
  -webkit-align-items: center; align-items: center;
}
.pclock-side { position: relative; height: 100%; }
.clock-time { white-space: nowrap; font-weight: 800; line-height: 1.2; }
.progress { position: relative; overflow: hidden; background: rgba(255,255,255,.1); }
.progress .fillbar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #C8B081; }
.paused {
  display: inline-block; background: #C8B081; color: #0A0A0A; font-weight: 800;
  border-radius: 999px; white-space: nowrap;
}

/* Challenge (ChallengeScreen) */
.challenge { padding: 50px 80px; }
.ch-left { width: 620px; -webkit-flex: 0 0 auto; flex: 0 0 auto; }
.ch-left > * + * { margin-top: 22px; }
.ch-qr { width: 400px; height: 400px; padding: 22px; background: #fff; border-radius: 22px; }
.ch-right { margin-left: 70px; }
.ch-div + .ch-div { margin-left: 50px; }
.ch-div > * + * { margin-top: 14px; }
.ch-entry > * + * { margin-left: 18px; }
.ch-entry .rank { width: 46px; -webkit-flex: 0 0 auto; flex: 0 0 auto; }
.ch-entry .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }
.ch-entry .score { -webkit-flex: 0 0 auto; flex: 0 0 auto; }

/* Status along the edges */
#reconnecting {
  position: absolute; right: 24px; bottom: 18px; display: none;
  font-size: 20px; font-weight: 600; color: #A3A3A3; opacity: .8;
  padding: 6px 14px; border-radius: 999px; background: rgba(22,22,22,.85);
}
#reconnecting.on { display: block; }
#reconnecting .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #C8B081;
  margin-right: 10px; vertical-align: 1px;
}
#hint {
  position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; pointer-events: none;
}
#hint span, #hint {
  font-size: 22px; font-weight: 600; color: #A3A3A3;
}
#hint.off { display: none; }
