/* The jukebox panel (js/jukebox.js). While closed it is moved off screen rather than hidden, so the YouTube or
   Spotify player inside it keeps playing. */
.jukebox { max-height: calc(100vh - 80px); overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.jukebox.jclosed { position: fixed; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }
.jukebox .pophead { margin-bottom: 0; }

/* the header button: little bars dance while music plays */
#jukeBtn .jbars { display: none; align-items: flex-end; gap: 2px; height: 14px; margin-left: 2px; }
#jukeBtn.playing .jbars { display: inline-flex; }
#jukeBtn .jbars i { width: 3px; background: currentColor; border-radius: 1px; animation: jbar .9s ease-in-out infinite; }
#jukeBtn .jbars i:nth-child(2) { animation-delay: -.3s; }
#jukeBtn .jbars i:nth-child(3) { animation-delay: -.6s; }
@keyframes jbar { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) { #jukeBtn .jbars i { animation: none; height: 10px; } }

.jidle { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); margin: 4px 0 0; line-height: 1.4; }
.jidle .ic { flex: none; width: 1.6em; height: 1.6em; }

.jnow { display: flex; align-items: center; gap: 10px; }
.jnow .jsong b { font-size: 1.08em; }
.jtime { margin-left: auto; flex: none; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9em; }
.jsrc { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 13px; }
.jsrc.yt { background: #e62117; }
.jsrc.sp { background: #1db954; font-size: 16px; }
.jsong { display: flex; flex-direction: column; min-width: 0; }
.jsong b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jsong small { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.jdot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }

/* one row, always: Play/Pause keeps one width (so swapping the word moves nothing) and the volume slider takes
   whatever room is left */
.jctl { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: nowrap; }
.jctl .btn { flex: none; min-height: 40px; padding: .3em .9em; justify-content: center; }
.jctl .btn[data-j="pause"] { min-width: 8.2em; }
.jvol { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: 1 1 60px; min-width: 0; justify-content: flex-end; }
.jvol input { width: 100%; max-width: 130px; min-width: 40px; }
.jvol input[disabled] { opacity: .4; }
.jtap { width: 100%; margin-top: 10px; justify-content: center; }

.jplayer { width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
.jplayer.yt { aspect-ratio: 16 / 9; }
.jplayer.sp { height: 152px; background: transparent; }
.jplayer iframe { display: block; width: 100%; height: 100%; border: 0; }

.jonrow { padding: 6px 0; }
.jmode { width: 100%; justify-content: center; min-height: 44px; font-family: var(--display); font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #ff4fa3, #ff9f1c, #ffe14d, #3ddc84, #3aa0ff, #a46bff); background-size: 200% 100%;
  text-shadow: 0 1px 2px rgba(0,0,0,.45); box-shadow: 0 3px 0 rgba(0,0,0,.25); animation: jmode 4s linear infinite; }
@keyframes jmode { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .jmode { animation: none; } }
.jform { display: flex; gap: 8px; }
.jform input { flex: 1; min-width: 0; font: inherit; padding: .55em .8em; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.95); color: #111; }
.jform .btn { flex: none; }
.jmsg { margin: -2px 0 0; min-height: 1.2em; font-size: .9em; color: var(--muted); }
.jmsg.bad { color: #ffb4a8; }

.jqhead { font-family: var(--display); font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.jqlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jqlist li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.06); }
.jqbtns { margin-left: auto; display: flex; flex: none; }
.jqempty { margin: 0; color: var(--muted); font-size: .9em; }

/* ---------------- the panel dressed as a jukebox ----------------
   A walnut cabinet with glowing amber edges and chrome trim; an orange arch with JUKEBOX in neon; the song
   playing on a dark LED readout; the player in a chrome bezel; the queue as cream title strips with red number
   buttons; cream keys for Pause and Skip. */
.jukebox {
  --jw: #5a3216; --jw-hi: #7a4520; --jw-lo: #3a1e0b; --jcard: #f4ecc6; --jcard-lo: #e9dca6; --jink: #3a2410;
  padding: 0 14px 14px; border-radius: 26px 26px 14px 14px; border: 0; color: #fff4e0;
  background:
    linear-gradient(90deg, rgba(255,150,40,.55) 0, rgba(255,150,40,0) 10px, rgba(255,150,40,0) calc(100% - 10px), rgba(255,150,40,.55) 100%),
    repeating-linear-gradient(92deg, rgba(0,0,0,0) 0 7px, rgba(0,0,0,.09) 7px 9px, rgba(255,255,255,.04) 9px 13px),
    repeating-linear-gradient(88deg, rgba(0,0,0,.06) 0 23px, rgba(0,0,0,0) 23px 41px),
    linear-gradient(180deg, var(--jw-hi), var(--jw) 40%, var(--jw-lo));
  box-shadow: 0 0 0 3px #2a1406, 0 0 0 5px #c9ced3, 0 0 0 7px #6d7278, 0 18px 50px rgba(0,0,0,.6), inset 0 0 30px rgba(0,0,0,.45);
}
/* the arch with the neon name */
.jukebox .pophead {
  position: sticky; top: 0; z-index: 2; margin: 0 -14px 4px; padding: 16px 16px 12px; border: 0;
  border-radius: 26px 26px 0 0 / 26px 26px 0 0; justify-content: center;
  background: radial-gradient(ellipse at 50% 120%, #ffcf6b 0%, #ff8a1f 40%, #c2410c 75%, #5a1a05 100%);
  box-shadow: inset 0 -3px 0 #9aa0a6, inset 0 0 22px rgba(255,200,80,.7);
}
.jukebox .pophead b {
  font-family: 'Righteous', var(--display); font-weight: 400; font-size: 1.5em; letter-spacing: .14em; text-transform: uppercase;
  color: #fff4d6; padding: 2px 22px; border-radius: 10px; background: linear-gradient(180deg, #2a0f02, #120600);
  box-shadow: 0 0 0 2px #d8dde2, 0 0 0 4px #6d7278, inset 0 0 12px rgba(255,120,0,.35);
  text-shadow: 0 0 4px #ffb02e, 0 0 12px #ff7a00, 0 0 22px #ff5500;
}
.jukebox .pophead .iconbtn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin: 0; width: 34px; height: 34px; border-radius: 50%;
  color: #3a1e0b; background: linear-gradient(180deg, #fdfdfd, #b9bec4 40%, #e8ebee 70%, #a3a8ae);
  box-shadow: 0 2px 0 #4a4f55, 0 3px 6px rgba(0,0,0,.4);
}
/* nothing playing / what's playing: a dark LED readout */
.jukebox .jidle, .jukebox .jnow {
  margin: 0; padding: 10px 12px; border-radius: 10px; background: #140404;
  box-shadow: inset 0 0 14px #000, 0 0 0 2px #2d2f33, 0 0 0 4px #b8bdc3;
}
.jukebox .jidle { font-family: 'VT323', monospace; font-size: 1.2em; line-height: 1.2; color: #ffb02e; text-shadow: 0 0 6px rgba(255,140,0,.7); }
.jukebox .jnow .jsong b { font-family: 'VT323', monospace; font-weight: 400; font-size: 1.45em; letter-spacing: .02em; text-transform: uppercase; color: #ffb02e; text-shadow: 0 0 6px rgba(255,140,0,.8); }
.jukebox .jnow .jsong small { color: #ff9a7a; }
.jukebox .jtime { font-family: 'VT323', monospace; font-size: 1.35em; color: #ff3b2f; text-shadow: 0 0 6px #ff1a00; }
/* Pause and Skip: chunky cream keys */
.jukebox .jctl .btn {
  border: 0; border-radius: 8px; color: #2a1406; font-family: 'Righteous', var(--display); font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff8e6, #f2dfb0 60%, #d9bf82);
  box-shadow: 0 4px 0 #8a6a2a, 0 6px 8px rgba(0,0,0,.35), inset 0 1px 0 #fff;
}
.jukebox .jctl .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a6a2a, 0 2px 3px rgba(0,0,0,.35); }
.jukebox .jvol { color: #ffdca0; }
.jukebox .jvol input { accent-color: #ff8a1f; }
.jukebox .jtap { color: #fff; background: linear-gradient(180deg, #ff6b5e, #c8102e); box-shadow: 0 4px 0 #6e0a1a; border: 0; }
/* the player, framed in chrome */
.jukebox .jplayer { border-radius: 8px; box-shadow: 0 0 0 3px #d8dde2, 0 0 0 5px #6d7278, 0 3px 8px rgba(0,0,0,.5); }
.jukebox .jplayer.sp { background: #000; }
/* the mute switch on a chrome plate */
.jukebox .jonrow {
  padding: 8px 12px; border: 0; border-radius: 10px; color: #2a2d31;
  background: linear-gradient(180deg, #fdfdfd 0%, #b9bec4 30%, #f4f6f8 55%, #a3a8ae 100%);
  box-shadow: 0 0 0 2px #50555b, inset 0 1px 0 #fff;
}
.jukebox .jonrow .setlabel { font-family: 'Righteous', var(--display); font-weight: 400; letter-spacing: .03em; }
/* paste a link: a blank title strip, and a red code button to add it */
.jukebox .jform input {
  border: 0; border-radius: 7px; background: linear-gradient(180deg, var(--jcard), var(--jcard-lo)); color: var(--jink);
  font-family: 'Jost', var(--display); font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(80,55,20,.35), inset 0 2px 4px rgba(0,0,0,.15), 0 0 0 2px #d8dde2;
}
.jukebox .jform input::placeholder { color: #8a6a3a; }
.jukebox .jform .btn {
  border: 2px solid #d9dde1; border-radius: 8px; color: #fff3e6; font-family: 'Righteous', var(--display); font-weight: 400; letter-spacing: .06em;
  background: radial-gradient(circle at 50% 35%, #ff7b4f, #e0401f 55%, #a9230d);
  box-shadow: 0 0 0 1px #6d7278, inset 0 1px 2px rgba(255,255,255,.5), 0 3px 0 #6e0a1a;
}
.jukebox .jmsg { color: #ffdca0; }
/* up next: cream title strips, each with a red number button */
.jukebox .jqhead { font-family: 'Righteous', var(--display); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: #ffcf6b; text-shadow: 0 0 8px rgba(255,140,0,.6); }
.jukebox .jqlist { counter-reset: jq; }
.jukebox .jqlist li {
  counter-increment: jq; position: relative; padding: 7px 8px 7px 46px; border-radius: 7px; color: var(--jink);
  background:
    linear-gradient(transparent calc(50% - 1px), rgba(232,120,42,.0) calc(50% - 1px)),
    linear-gradient(180deg, var(--jcard), var(--jcard-lo));
  box-shadow: inset 0 0 0 1px rgba(80,55,20,.35), inset 0 0 8px rgba(150,110,30,.2), 0 2px 3px rgba(0,0,0,.45);
}
.jukebox .jqlist li::before {
  content: counter(jq); position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center; font-family: 'Jost', var(--display); font-weight: 800; color: #fff3e6;
  border: 2px solid #d9dde1; background: radial-gradient(circle at 50% 35%, #ff7b4f, #e0401f 55%, #a9230d);
  box-shadow: 0 0 0 1px #6d7278, inset 0 1px 2px rgba(255,255,255,.5);
}
.jukebox .jqlist .jsong b { font-family: 'Jost', var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--jink); }
.jukebox .jqlist .jsong small { color: #6b4a1f; }
.jukebox .jqlist .iconbtn { color: #6b4a1f; }
.jukebox .jqempty { color: #ffdca0; }
/* All of the menu's lettering (text, buttons, the paste box, the queue) in the LED readout's font, VT323. It runs
   small, so the panel's text is a size up. (The Humpershmink jukebox, .humper, is separate and keeps its own.) */
.jukebox { font-size: 1.2rem; }
.jukebox, .jukebox :is(b, small, span, p, label, button, input, li, div)::placeholder,
.jukebox :is(b, small, span, p, label, button, input, li, div), .jukebox .jqlist li::before {
  font-family: 'VT323', ui-monospace, monospace !important; font-weight: 400 !important;
}
.jukebox .pophead b { font-size: 1.7em; letter-spacing: .1em; }
.jukebox .jctl .btn, .jukebox .jform .btn { font-size: 1em; letter-spacing: .08em; }
.jukebox .jform input { font-size: 1.05em; }
.jukebox .jqlist .jsong b { font-size: 1.1em; letter-spacing: .03em; }
.jukebox .jsong small, .jukebox .jmsg, .jukebox .jqempty { font-size: .95em; }
.jukebox .jonrow .setlabel { font-size: 1em; white-space: nowrap; }
.jukebox .jmode { font-size: 1.05em; letter-spacing: .04em; white-space: nowrap; }
.jukebox .jqhead { font-size: 1.15em; }
/* phones: the mute label may wrap, and the volume slider gets the speaker icon's room */
@media (max-width: 480px) {
  .jukebox .jonrow .setlabel { white-space: normal; }
  .jukebox .jvol .ic { display: none; }
  .jukebox .jctl .btn { padding: .3em .6em; }
  .jukebox .jctl .btn[data-j="pause"] { min-width: 7.4em; }
}
.jukebox .jcode { background: radial-gradient(circle at 50% 35%, #ff7b4f, #e0401f 55%, #a9230d); border: 2px solid #d9dde1; border-radius: 6px; font-family: 'Jost', var(--display); font-weight: 800; font-size: 11px; width: 32px; }
