/* The admin panel: a full screen over the page. Pop-ups (the password, a pass phrase) open on top of it. */
.adminp { position: fixed; inset: 0; z-index: 25; display: none; flex-direction: column; background: var(--bg); }
.adminp.open { display: flex; animation: risein var(--t-in) var(--ease-out); }
@keyframes risein { from { opacity: 0; transform: translateY(24px); } }
body.admin-open { overflow: hidden; }
.adminp .dhead { flex: none; }
.adminp .dhead button.txt { width: auto; padding: 0 18px; font: 600 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.atabs { display: flex; flex: none; overflow-x: auto; border-bottom: 1px solid var(--line); }
.atabs button { height: var(--hit); padding: 0 18px; border-right: 1px solid var(--line); white-space: nowrap; color: var(--muted);
  font: 600 12px var(--display); letter-spacing: .12em; text-transform: uppercase; }
@media (hover: hover) { .atabs button:hover { color: var(--text); } }
.atabs button.on { color: var(--text); box-shadow: inset 0 -3px 0 var(--red); }
.abody { flex: 1; overflow-y: auto; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.abody > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.abody .body { padding: 12px 16px 16px; border-bottom: 1px solid var(--line); }
.abody .body p { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.abody .body p.hint { margin: 10px 0 0; }
.abody code { font: 12px ui-monospace, Consolas, monospace; background: var(--s2); padding: 1px 5px; color: var(--text); }
.abody .whoform { display: flex; flex-direction: column; gap: 10px; }
.abody .whoform .field { flex: none; }

/* rows: a person in the list; a playlist, like, play or log entry with its buttons */
.aperson, .arow { display: grid; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); }
.aperson { grid-template-columns: 32px minmax(0, 1fr) auto; min-height: 56px; }
@media (hover: hover) { .aperson:hover { background: var(--s1); } }
.arow { grid-template-columns: minmax(0, 1fr) auto; min-height: var(--hit); }
.aperson:last-child, .arow:last-of-type { border-bottom: 0; }
.aperson .t, .arow .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aperson .s, .arow .s { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aperson .go { color: var(--faint); font-size: 20px; padding-right: 4px; }
.arow .acts { display: flex; }
.arow .acts button { height: var(--hit); padding: 0 10px; color: var(--muted); font: 600 11px var(--display); letter-spacing: .1em; text-transform: uppercase; }
@media (hover: hover) { .arow .acts button:hover { color: var(--red); } }
.arow .acts .n { color: var(--muted); font-size: 12px; }
.arow.ev-fail .t, .arow.ev-lockout .t { color: var(--red); }
.abody .mark { margin-left: 6px; padding: 1px 5px; border: 1px solid var(--red); color: var(--red); font: 600 10px/1.3 var(--display);
  letter-spacing: .08em; text-transform: uppercase; font-style: normal; vertical-align: 1px; }
.abody .lock { font-size: 11px; margin-left: 2px; }

/* one person */
.ahero { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px; }
.ahero .av { width: 64px; height: 64px; font-size: 28px; }
.ahero h1 { margin: 0 0 4px; font: 700 26px/1.1 var(--display); overflow-wrap: anywhere; }
.astats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.astats div { background: var(--bg); padding: 12px 16px; }
.astats b { display: block; font: 700 20px var(--display); }
.astats span { color: var(--muted); font: 600 10px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.aform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.aform label { flex: 1 1 100%; color: var(--muted); font-size: 12.5px; }
.aform select.field { flex: 0 1 160px; }
.aform .field.num { flex: 0 0 96px; }
.aform.agroup { margin: 0; padding: 12px; background: var(--s1); border-bottom: 1px solid var(--line); }
.aform.agroup .optrow { flex: 1 1 100%; padding-bottom: 0; }
.abody .arow .sem { font-size: 12px; padding: 3px 7px; }
.abody .presets small { text-align: center; }

/* Local songs: how full the disk (or the cap) is */
.meter { display: flex; height: 14px; background: var(--s2); border: 1px solid var(--line-2); }
.meter i { display: block; height: 100%; }
.meter .other { background: var(--faint); }
.meter .mine { background: var(--red); min-width: 2px; }

/* the top bar says so while the admin is unlocked on this device */
.top .adminbadge { display: none; padding: 0 14px; border-left: 1px solid var(--line); color: var(--red);
  font: 700 10px var(--display); letter-spacing: .14em; text-transform: uppercase; }
html[data-admin] .top .adminbadge { display: block; }
@media (hover: hover) { .top .adminbadge:hover { background: var(--s1); } }

/* songs keep failing to load: a bar along the top for the admin, offering a yt-dlp update (admin-ytdlp.js) */
#ytdlpBar:not([hidden]) { position: fixed; top: 0; left: 0; right: 0; z-index: 99; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px 16px; background: var(--red); color: #fff; font: 600 13px var(--ui); }
#ytdlpBar span { min-width: 0; }
#ytdlpBar button { flex: none; height: 30px; padding: 0 12px; border: 1px solid #fff; color: #fff; font: 700 11px var(--display); letter-spacing: .12em; text-transform: uppercase; }
#ytdlpBar button:disabled { opacity: .6; }
#ytdlpBar button.x { border: 0; padding: 0 8px; font-size: 20px; letter-spacing: 0; }
html[data-offline] #ytdlpBar { display: none; }
.abody .body p.warn { color: var(--red); }
