/* style-radio.css - the DESIGN of: Kappy Radio and My radio (players, lyrics, song-added notice, LIVE tag). Part of the old single style.css (split 2026-11-03); loaded in the order listed in index.html. */
/* --- Kappy Radio (2026-10-29, see docs/RADIO_PLAN.md) --- */
/* The two views used to be height:100% of #app-screen; with the mini player under them they share the column. */
#app-screen > #chat-list-view, #app-screen > #chat-view { flex: 1; min-height: 0; height: auto; }
#mini-player {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  background: #1C1C1E; border-top: 1px solid #2C2C2E; flex-shrink: 0;
}
#mini-cover { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #2A2A2C; }
#mini-text { flex: 1; min-width: 0; cursor: pointer; }
#mini-title, #mini-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mini-title { font-size: 14px; font-weight: 600; }
#mini-artist { font-size: 12px; color: #9A9A9A; }
#mini-player .icon-btn { font-size: 22px; }

.music-head { display: flex; align-items: center; justify-content: space-between; }
.music-head h2 { margin: 0; }
.music-head .icon-btn { font-size: 26px; }
#music-now { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 8px 0; }
#music-cover { width: min(60vw, 240px); aspect-ratio: 1; border-radius: 12px; object-fit: cover; background: #2A2A2C; }
#music-now-title { font-size: 17px; font-weight: 600; text-align: center; margin-top: 8px; }
#music-now-artist { font-size: 14px; color: #9A9A9A; text-align: center; }
#music-seek { width: 100%; accent-color: #06C755; margin-top: 8px; }
.music-times { width: 100%; display: flex; justify-content: space-between; font-size: 12px; color: #9A9A9A; }
.music-controls { display: flex; align-items: center; gap: 28px; }
.music-controls .icon-btn { font-size: 28px; }
#music-play { width: 60px; height: 60px; border-radius: 50%; font-size: 24px; padding: 0; }
.music-status { font-size: 13px; color: #9A9A9A; min-height: 16px; text-align: center; }
.music-status.error { color: #FF6B60; }
.music-search { display: flex; gap: 8px; margin: 4px 0; }
.music-search input { flex: 1; }
.music-list { list-style: none; margin: 0; padding: 0; }
.music-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #232325; }
.music-list li img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: #2A2A2C; flex-shrink: 0; }
.music-list .song-text { flex: 1; min-width: 0; }
.music-list .song-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-list .song-sub { font-size: 12px; color: #9A9A9A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-list .song-by { color: #2FDE76; }
.music-list button { padding: 6px 10px; font-size: 13px; flex-shrink: 0; }
.music-list .empty { color: #9A9A9A; font-size: 13px; border: none; }
#music-panel .panel-inner > * { flex-shrink: 0; }   /* a long list must scroll the panel, not squeeze the player */
.music-room { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9A9A9A; margin-top: 2px; }
.music-speaker { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px;
  color: #9A9A9A; background: #232325; border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.music-speaker:has(#music-speaker-text:empty) { display: none; }
#music-play:disabled { opacity: 0.4; }
.music-add-open { width: 100%; margin: 6px 0; }
.vote-skip { font-size: 14px; font-weight: 600; }

/* --- Kappy Radio view + My radio (2026-10-29): both players are built from one template (app.js musicRoomHTML) --- */
#app-screen > #radio-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#app-screen > #radio-view.hidden { display: none !important; }
#radio-view .topbar span#radio-title { font-weight: 600; }
.topbar-spacer { width: 34px; }
#radio-body { flex: 1; overflow-y: auto; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 4px; }
#radio-body > *, #my-radio-body > * { flex-shrink: 0; }
#my-radio-body { display: flex; flex-direction: column; gap: 4px; }
.music-now { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 8px 0; }
.music-cover { width: min(60vw, 240px); aspect-ratio: 1; border-radius: 12px; object-fit: cover; background: #2A2A2C; }
.music-now-title { font-size: 17px; font-weight: 600; text-align: center; margin-top: 8px; }
.music-now-artist { font-size: 14px; color: #9A9A9A; text-align: center; }
.music-seek { width: 100%; accent-color: #06C755; margin-top: 8px; }
.music-play { width: 60px; height: 60px; border-radius: 50%; font-size: 24px; padding: 0; }
.music-play:disabled { opacity: 0.4; }
.music-next .vote-skip { font-size: 14px; }
.music-add-row { display: flex; gap: 8px; margin: 6px 0; }
.music-add-row button { flex: 1; }
.friend-item.radio .radio-avatar {
  display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: pointer;
  background: #06C755; box-shadow: 0 0 0 2px #2FDE76;
}
.pl-songs { display: block !important; padding: 0 0 6px 18px !important; border-bottom: 1px solid #232325; }
.pl-actions { display: flex; gap: 8px; margin: 6px 0; }
.pl-picker { display: flex !important; flex-wrap: wrap; gap: 6px; padding: 6px 0 10px !important; }
.music-dj-line { font-size: 13px; color: #2FDE76; text-align: center; margin-top: 4px; font-style: italic; }
.music-owner { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.music-owner select { width: auto; padding: 6px 8px; font-size: 14px; margin-left: 6px; }
/* My radio as a full player (2026-10-31) */
.music-controls { gap: 18px; }
.music-skip { position: relative; font-size: 26px; }
.music-skip small { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 9px; font-weight: 700; }
.music-modes { display: flex; gap: 8px; margin-top: 6px; }
.music-modes button.on { background: #06C755; color: #08170D; }
.music-next-head { display: flex; align-items: center; justify-content: space-between; }
.drag-handle { font-size: 18px; color: #9A9A9A; padding: 6px 4px; cursor: grab; touch-action: none; user-select: none; }
.music-list li.dragging { opacity: 0.6; background: #232325; }

/* Kappy Radio owner buttons + choosers, lyrics, karaoke (2026-10-31) */
.music-ownerbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin: 2px 0 6px; }
.ob-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; background: #232325;
  color: #EDEDED; border: 1px solid #2C2C2E; border-radius: 12px; font-weight: 600; }
.ob-btn .ob-icon { font-size: 18px; line-height: 1; }
.ob-btn .ob-word { font-size: 12px; }
.ob-btn .ob-value { font-size: 11px; color: #2FDE76; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-chooser { background: #232325; border: 1px solid #2C2C2E; border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.music-chooser .ch-title { font-weight: 700; font-size: 15px; }
.music-chooser .ch-about { font-size: 12.5px; color: #9A9A9A; margin: 3px 0 8px; }
.music-chooser .ch-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.music-modes { flex-wrap: wrap; justify-content: center; }
.music-modes button.on { background: #06C755; color: #08170D; }
.music-lyrics { width: 100%; min-height: min(60vw, 240px); display: flex; flex-direction: column; justify-content: center;
  gap: 6px; text-align: center; padding: 8px 4px; }
.ly-line { font-size: 16px; color: #6E6E73; transition: color .2s, font-size .2s; }
.ly-line.past { color: #4A4A4E; }
.ly-line.now { color: #FFFFFF; font-size: 20px; font-weight: 700; }
.ly-note { color: #9A9A9A; font-size: 14px; }
.ly-plain { font-size: 14px; color: #CFCFCF; max-height: 50vh; overflow-y: auto; text-align: center; }
.music-countdown { font-size: 22px; font-weight: 700; color: #2FDE76; text-align: center; margin: 6px 0; }
.music-countdown b { font-size: 34px; color: #FFFFFF; margin-left: 6px; }
#lyrics-full { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px 16px; gap: 14px; }
#lyrics-full-close { position: absolute; top: 10px; right: 14px; background: transparent; color: #EDEDED; font-size: 34px; }
#lyrics-full-title { color: #9A9A9A; font-size: 14px; text-align: center; }
#lyrics-full-count { font-size: 30px; font-weight: 700; color: #2FDE76; text-align: center; }
#lyrics-full-count b { font-size: 48px; color: #FFF; margin-left: 8px; }
#lyrics-full-lines { display: flex; flex-direction: column; gap: 12px; text-align: center; max-width: 900px; }
#lyrics-full-lines .ly-line { font-size: clamp(20px, 5vw, 34px); }
#lyrics-full-lines .ly-line.now { font-size: clamp(28px, 7.5vw, 54px); }
/* lyrics: the next line lights up while the current one is sung (2026-10-31) */
.ly-line.next { color: #FFFFFF; font-size: 18px; font-weight: 600; transform-origin: center; transition: opacity .25s, transform .25s; }
#lyrics-full-lines .ly-line.next { font-size: clamp(24px, 6vw, 44px); }
.ly-line { color: #5A5A5E; }
/* the Player chooser with many friends: a scrolling list + search */
.ch-search { margin-bottom: 8px; }
.ch-list { flex-direction: column; flex-wrap: nowrap; max-height: 45vh; overflow-y: auto; }
.ch-list button { width: 100%; text-align: left; }

/* Kappy Radio, 2026-10-31 (Kuma): search + "From my list" full screen, bigger player for listeners, x to remove */
.music-pop { position: fixed; inset: 0; z-index: 30; background: #111; display: flex; flex-direction: column;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; }
.music-pop.hidden { display: none !important; }
.music-pop-head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; margin-bottom: 8px; position: sticky; top: -10px; background: #111; padding: 6px 0; z-index: 1; }
.music-pop-head .icon-btn { font-size: 28px; }
.music-pop .music-list { flex: 1; }
.music-search-head { font-size: 13px; opacity: .7; margin: 6px 2px; }
.music-add-row { flex-wrap: nowrap; }
.music-add-row button { flex: 1 1 auto; min-width: 0; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.music-add-row [data-r="lyrics-full"] { flex: 0 0 auto; }
.music-x { min-width: 36px; padding: 6px 10px; }
.music-save { margin: 4px 0 2px; }
/* (Kuma, 18:07) listeners want to see more of the queue: a smaller but clear cover; lyrics get the room instead */
#radio-view .music-cover { width: min(42vw, 170px); }
.music-viewer .music-cover { width: min(36vw, 140px); }
.music-viewer .music-lyrics { max-height: 46vh; font-size: 17px; }
.music-qbtn { flex: 0 0 auto !important; min-width: 44px; }
.music-viewer .music-seek { pointer-events: none; }
.ch-own { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; }
.ch-own .ch-num { width: 64px; }
.ly-line.now span { transition: color .12s; }
.ly-line.now .ly-gold { color: #FFD24A; text-shadow: 0 0 10px rgba(255,210,74,.45); }

/* "song added" notice (Kuma 2026-11-02) */
.music-toast { position: fixed; z-index: 150; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  background: #30D158; color: #000; font-weight: 700; padding: 12px 18px; border-radius: 16px; box-shadow: 0 6px 20px #000a; max-width: 88vw;
  text-align: center; font-size: 15px; transition: opacity .45s; }
.music-toast.error { background: #FF453A; color: #fff; } .music-toast.out { opacity: 0; }
button.added { background: #30D158 !important; color: #000 !important; }
li.song-added { background: #30D15833 !important; outline: 2px solid #30D158; border-radius: 12px; flex-wrap: wrap; }
li.song-add-failed { background: #FF453A22 !important; outline: 2px solid #FF453A; border-radius: 12px; flex-wrap: wrap; }
.song-add-note { flex-basis: 100%; font-size: 13px; font-weight: 700; padding: 2px 6px 4px; }
li.song-added .song-add-note { color: #30D158; } li.song-add-failed .song-add-note { color: #FF6961; }
/* LIVE tag next to the play button (Kuma 2026-11-03): red pill with a softly blinking dot while music is playing */
.music-live { display: inline-flex; align-items: center; gap: 5px; background: #E5252A; color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .6px; padding: 4px 8px; border-radius: 999px; line-height: 1; flex: none; }
.music-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: live-blink 1.4s ease-in-out infinite; }
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
