/* TeleLista TV page. Written for old TV browsers: no flexbox, no CSS variables, no calc. */
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: #07080a; color: #f4f4f0;
  font-family: Arial, Helvetica, sans-serif; font-size: 20px; line-height: 1.3;
  overflow: hidden;
}
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
a { color: #f4f4f0; text-decoration: none; }
h2 { margin: 0; height: 44px; line-height: 44px; font-size: 22px; text-transform: uppercase; letter-spacing: 2px; color: #33d6e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h3 { margin: 24px 0 4px; font-size: 20px; color: #33d6e0; text-transform: uppercase; letter-spacing: 1px; }
.hide { display: none !important; }
.small { font-size: 16px; color: #a9adb8; margin: 8px 0; }
.msg { color: #a9adb8; font-size: 20px; margin: 16px 0; }
.msg b { color: #f4f4f0; }
.err { color: #ff6b6b; }

/* Teletext header */
#top { position: absolute; top: 0; left: 0; right: 0; height: 56px; background: #000000; border-bottom: 2px solid #2a2f3a; padding: 0 16px; white-space: nowrap; overflow: hidden; }
#top .brand { display: inline-block; vertical-align: middle; background: #ffd400; color: #000000; font-weight: bold; font-size: 22px; letter-spacing: 3px; padding: 4px 10px; margin: 10px 12px 0 0; }
#top .pnum { display: inline-block; vertical-align: middle; font-family: "Courier New", monospace; color: #ffd400; font-size: 22px; margin: 10px 20px 0 0; }
#tabs { display: inline-block; vertical-align: middle; margin-top: 8px; }
.tab { display: inline-block; padding: 6px 16px; margin-right: 6px; font-size: 20px; text-transform: uppercase; letter-spacing: 1px; color: #a9adb8; border: 2px solid #2a2f3a; }
.tab.on { color: #f4f4f0; border-color: #33d6e0; }
#clock { position: absolute; right: 16px; top: 14px; font-family: "Courier New", monospace; font-size: 24px; color: #ffd400; }

/* Focus: unmistakable from across the room */
.f { outline: none; }
a.f:focus, .tab:focus, .row:focus, .btn:focus { background: #ffd400 !important; color: #000000 !important; border-color: #ffd400 !important; }
a.f:focus .ct, a.f:focus .no, a.f:focus .fav { color: #000000 !important; }
input.f:focus, textarea.f:focus { border-color: #ffd400; background: #1b1e25; }

/* Views */
.view { position: absolute; top: 64px; bottom: 44px; left: 0; right: 0; }
.col, .half { position: absolute; top: 0; bottom: 0; }
.scroll { position: absolute; top: 48px; bottom: 0; left: 0; right: 0; overflow-x: hidden; overflow-y: auto; }
#col-groups { left: 1.5%; width: 21%; }
#col-ch { left: 24%; width: 36%; }
#col-info { left: 62%; width: 36.5%; }
#col-info { overflow: hidden; }

.row { display: block; position: relative; height: 44px; line-height: 40px; padding: 0 12px; margin-bottom: 4px; background: #121419; border: 2px solid #121419; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 22px; }
.row .ct { position: absolute; right: 12px; top: 0; color: #a9adb8; font-size: 18px; }
.row.grp { padding-right: 60px; }
.row.grp.on { border-color: #33d6e0; }
.row .no { display: inline-block; width: 64px; font-family: "Courier New", monospace; color: #ffd400; font-size: 22px; }
.row.ch { padding-right: 70px; }
.row .fav { position: absolute; right: 10px; top: 0; font-size: 14px; font-weight: bold; color: #ffd400; letter-spacing: 1px; }
.row.play { border-color: #3ddc84; }
.row.more { color: #33d6e0; text-align: center; }
h2 .ct { color: #a9adb8; font-size: 18px; letter-spacing: 0; }

.note { background: #1b1e25; border-left: 6px solid #ffd400; padding: 8px 12px; margin-bottom: 8px; font-size: 16px; color: #f4f4f0; }
.note .btn { margin: 6px 8px 0 0; padding: 4px 12px; font-size: 16px; }

/* Picture */
#screen, #tscreen { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; background: #000000; border: 2px solid #2a2f3a; margin-top: 4px; }
#screen video, #tscreen video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000000; }
.vmsg { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; background: #000000; color: #f4f4f0; font-size: 18px; }
.vmsg.err { color: #ff6b6b; }
.vmsg.empty { display: none; }
#info { padding-top: 12px; }
#info .logo { float: right; max-width: 120px; max-height: 64px; margin: 0 0 8px 12px; background: #1b1e25; }
#info .big { font-size: 30px; font-weight: bold; margin: 0 0 4px; word-wrap: break-word; }
#info .meta { font-size: 18px; color: #a9adb8; margin: 0 0 12px; word-wrap: break-word; }
#info .meta b { color: #ffd400; font-family: "Courier New", monospace; }

/* Fullscreen */
body.full #screen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: auto; padding: 0; margin: 0; border: 0; z-index: 50; }
body.full #vmsg { bottom: 40px; left: 40px; right: auto; max-width: 70%; }
body.full #vmsg.empty { display: none; }
body.full #hints, body.full #top { display: none; }

/* OSD: the channel number, like a TV */
#osd { position: fixed; top: 32px; right: 40px; z-index: 60; background: #000000; border: 2px solid #ffd400; padding: 8px 18px; text-align: right; max-width: 60%; }
#osd b { display: block; font-family: "Courier New", monospace; font-size: 64px; line-height: 1; color: #ffd400; }
#osd span { display: block; font-size: 22px; color: #f4f4f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#toast { position: fixed; left: 50%; bottom: 60px; width: 640px; margin-left: -320px; z-index: 70; background: #1b1e25; border: 2px solid #33d6e0; padding: 12px 16px; font-size: 18px; text-align: center; }

/* Forms */
.half { left: 1.5%; width: 47%; }
.half + .half { left: 51.5%; }
.half.wide { width: 58%; }
.half.narrow { left: 61.5% !important; width: 37%; }
label { display: block; font-size: 18px; color: #a9adb8; margin: 12px 0 4px; }
input, textarea { display: block; width: 100%; font-family: Arial, Helvetica, sans-serif; font-size: 22px; padding: 8px 10px; background: #121419; color: #f4f4f0; border: 2px solid #2a2f3a; border-radius: 0; -webkit-appearance: none; }
textarea { height: 96px; font-size: 16px; }
.btn { display: inline-block; padding: 8px 18px; margin: 8px 8px 0 0; background: #1b1e25; border: 2px solid #2a2f3a; font-size: 20px; }
.btn.primary { border-color: #ffd400; color: #ffd400; }
.btn.danger { border-color: #ff6b6b; color: #ff6b6b; }
.fmsg { min-height: 24px; margin: 8px 0 0; font-size: 18px; }
.fmsg.ok { color: #3ddc84; }
.fmsg.bad { color: #ff6b6b; }
.lst { background: #121419; border: 2px solid #121419; padding: 8px 12px; margin-bottom: 8px; }
.lst.on { border-color: #3ddc84; }
.lst .nm { font-size: 22px; font-weight: bold; word-wrap: break-word; }
.lst .u { font-size: 14px; color: #a9adb8; word-wrap: break-word; overflow: hidden; }
.lst .btn { font-size: 18px; padding: 4px 12px; }

/* Checks */
.chk { border-bottom: 2px solid #1b1e25; padding: 8px 0; }
.chk .r { display: inline-block; min-width: 90px; font-weight: bold; text-transform: uppercase; font-size: 16px; padding: 2px 8px; margin-right: 10px; color: #000000; text-align: center; }
.chk .r.si { background: #3ddc84; }
.chk .r.no { background: #ff6b6b; }
.chk .r.parcial { background: #ffd400; }
.chk .t { font-weight: bold; }
.chk .d { display: block; font-size: 16px; color: #a9adb8; margin-top: 4px; word-wrap: break-word; }

/* Remote hints */
#hints { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; line-height: 40px; padding: 0 16px; background: #000000; border-top: 2px solid #2a2f3a; font-size: 16px; color: #a9adb8; white-space: nowrap; overflow: hidden; }
#hints b { color: #f4f4f0; }
.k { display: inline-block; width: 14px; height: 14px; margin: 0 6px 0 12px; vertical-align: middle; }
.k.red { background: #ff4d4d; } .k.green { background: #3ddc84; } .k.yellow { background: #ffd400; } .k.blue { background: #3d7bff; }

/* Phones and small windows: stack everything */
@media screen and (max-width: 760px) {
  body { overflow: auto; font-size: 16px; }
  #top { position: static; height: auto; white-space: normal; padding: 8px 12px; }
  #top .brand, #top .pnum, #tabs { margin-top: 4px; }
  #clock { display: none; }
  .tab { font-size: 15px; padding: 6px 10px; margin-bottom: 4px; }
  .view { position: static; padding: 0 12px; }
  .col, .half, .half.wide, .half.narrow, #col-groups, #col-ch, #col-info { position: static; width: auto; left: auto !important; margin-bottom: 16px; }
  h2 { height: auto; line-height: 1.3; padding: 8px 0; white-space: normal; }
  .scroll { position: static; max-height: 440px; }
  #col-info { overflow: visible; }
  .row { font-size: 18px; }
  #info .big { font-size: 22px; }
  #hints { display: none; }
  #toast { width: auto; left: 12px; right: 12px; margin-left: 0; }
  #osd { right: 12px; top: 12px; }
  #osd b { font-size: 40px; }
}
