/* Radio Aa & Hunze – live chat. Huisstijl: marineblauw, paars-blauw en groen. */
:root {
  --navy: #1a1844; --purple: #352c89; --blue: #0c71c3; --green: #2da834; --green-dark: #23862a; --red: #e11d48;
  --bg: #eef0f6; --surface: #ffffff; --surface-2: #f5f6fa; --text: #1b1b2f; --muted: #62647a; --line: #e1e3ec;
  --mine: #e9f7ea; --dm: #f1edff; --staff: #fff8e6; --hl: #fff3c4; --link: #352c89;
  --radius: 14px; --shadow: 0 2px 10px rgba(26, 24, 68, .08);
  --heading: "Lato", "Open Sans", Arial, sans-serif; --body: "Open Sans", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d0c22; --surface: #17163a; --surface-2: #1f1e48; --text: #ececf6; --muted: #a2a3c0; --line: #2c2a5c;
  --mine: #173a22; --dm: #2a2160; --staff: #3a3016; --hl: #4a3f12; --link: #b1a6ff;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); display: flex; flex-direction: column; }
a { color: var(--link); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
svg { width: 1em; height: 1em; fill: currentColor; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* --- top bar --- */
.bar {
  display: flex; align-items: center; gap: 14px; padding: 8px 16px; flex: none;
  background: linear-gradient(90deg, var(--navy), var(--purple)); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); z-index: 5;
}
.bar-logo img { display: block; height: 44px; width: auto; border-radius: 8px; }
.bar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bar-title strong { font: 900 1.15rem var(--heading); }
.np { font-size: .82rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.pill { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: .85rem; white-space: nowrap; }
#online { color: #b9f5bc; }
.pill-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pill-btn:hover { background: rgba(255,255,255,.2); }
.pill-btn .av { width: 22px; height: 22px; font-size: .65rem; }
#onair.on { background: var(--red); border-color: var(--red); animation: glow 2s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(225,29,72,.3); } }
.icon-btn { background: none; border: 0; color: #fff; cursor: pointer; font-size: 1.1rem; width: 34px; height: 34px; border-radius: 50%; }
.icon-btn:hover { background: rgba(255,255,255,.12); }

/* --- layout --- */
.app { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px 1fr; gap: 14px; padding: 14px; max-width: 1500px; width: 100%; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }

/* player */
.player { padding: 12px; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 3px; margin-bottom: 12px; }
.tab { flex: 1; border: 0; background: none; border-radius: 999px; padding: 6px; cursor: pointer; font-weight: 700; color: var(--muted); }
.tab.on { background: var(--navy); color: #fff; }
#pane-radio { display: flex; gap: 14px; align-items: center; }
.big-play {
  flex: none; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; font-size: 2rem;
  background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(45,168,52,.4);
}
.big-play:hover { background: var(--green-dark); }
.big-play .i-pause, .big-play.playing .i-play { display: none; }
.big-play.playing .i-pause { display: block; }
.big-play.playing { animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(45,168,52,.15); } }
.radio-info { flex: 1; min-width: 0; }
.live-tag { background: var(--red); color: #fff; font-weight: 700; font-size: .7rem; padding: 1px 7px; border-radius: 4px; }
.radio-title { font-weight: 700; margin: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#volume { width: 100%; accent-color: var(--green); }
#video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; display: block; }
#pane-video p { margin: 6px 0 0; }
.side-link { display: block; margin-top: 12px; font-weight: 700; text-decoration: none; font-size: .9rem; }

/* users */
.users-card { padding: 12px 8px 8px; flex: 1; min-height: 120px; display: flex; flex-direction: column; }
.users-card h3 { margin: 0 8px 8px; font: 900 1rem var(--heading); display: flex; align-items: center; gap: 8px; }
.count { background: var(--green); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 8px; }
.users { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.user {
  width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer;
  padding: 6px 8px; border-radius: 10px; text-align: left;
}
.user:hover { background: var(--surface-2); }
.user.onair { background: color-mix(in srgb, var(--red) 10%, var(--surface)); }
.u-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.u-name i { color: var(--muted); font-weight: 400; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font: 700 .75rem var(--body); flex: none; }
.badge { font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.badge.studio { background: var(--purple); color: #fff; }
.badge.guest { border: 1px solid var(--line); color: var(--muted); }
.badge.onair { background: var(--red); color: #fff; }
.badge.dm { background: var(--purple); color: #fff; }
.btn-request { width: 100%; }
.mobile-only { display: none; }

/* --- chat --- */
.chat { display: flex; flex-direction: column; min-height: 0; position: relative; overflow: hidden; }
.pinned { background: linear-gradient(90deg, var(--green), var(--green-dark)); color: #fff; padding: 10px 16px; font-weight: 600; }
.pinned a, .pinned .mention { color: #fff; }
.staffbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .82rem; }
.staffbar button, .staffbar a { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; cursor: pointer; text-decoration: none; color: var(--text); font-size: .82rem; }
.staffbar button:hover, .staffbar a:hover { border-color: var(--green); }
.msgs { flex: 1; overflow-y: auto; padding: 14px 16px 6px; scroll-behavior: smooth; }
.welcome { text-align: center; color: var(--muted); font-size: .9rem; padding: 10px 20px 16px; border-bottom: 1px dashed var(--line); margin-bottom: 10px; }
.sys { text-align: center; color: var(--muted); font-size: .82rem; margin: 8px 0; font-style: italic; }
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 3px 6px; border-radius: 12px; position: relative; margin-top: 8px; transition: opacity .3s; }
.msg.grouped { margin-top: 1px; }
.msg:hover { background: var(--surface-2); }
.msg.removed { opacity: 0; }
.av-btn { border: 0; background: none; padding: 0; cursor: pointer; }
.av-space { width: 30px; flex: none; }
.bubble { flex: 1; min-width: 0; }
.msg.mine .bubble, .msg.dm .bubble, .msg.staff .bubble, .msg.hl .bubble { padding: 4px 10px; border-radius: 10px; margin-left: -4px; }
.msg.mine .bubble { background: var(--mine); }
.msg.staff .bubble { background: var(--staff); }
.msg.dm .bubble { background: var(--dm); }
.msg.hl .bubble { background: var(--hl); }
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.who { border: 0; background: none; padding: 0; font-weight: 700; cursor: pointer; }
.meta time { color: var(--muted); font-size: .75rem; }
.text { overflow-wrap: anywhere; white-space: pre-wrap; }
.text.big { font-size: 2rem; line-height: 1.25; }
.mention { background: color-mix(in srgb, var(--purple) 15%, transparent); color: var(--link); border-radius: 4px; padding: 0 3px; font-weight: 700; }
.mention.me { background: var(--green); color: #fff; }
.quote { font-size: .82rem; color: var(--muted); border-left: 3px solid var(--purple); padding-left: 8px; margin: 2px 0 4px; }
.img-link img { max-width: min(320px, 100%); max-height: 260px; border-radius: 10px; display: block; margin: 4px 0; cursor: zoom-in; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.react { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0 8px; cursor: pointer; font-size: .85rem; }
.react.on { border-color: var(--green); background: color-mix(in srgb, var(--green) 15%, var(--surface)); }
.actions { position: absolute; right: 8px; top: -12px; display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.msg:hover .actions, .msg:focus-within .actions { display: flex; }
.actions button { border: 0; background: none; cursor: pointer; padding: 3px 8px; font-size: .9rem; }
.actions button:hover { background: var(--surface-2); border-radius: 999px; }
.request { border: 2px solid var(--green); border-radius: 12px; padding: 10px 12px; margin: 4px 0; background: color-mix(in srgb, var(--green) 6%, var(--surface)); max-width: 420px; }
.request.done { border-color: var(--line); opacity: .8; }
.req-head { font-weight: 700; color: var(--green-dark); display: flex; gap: 8px; align-items: center; }
:root[data-theme="dark"] .req-head { color: var(--green); }
.req-done { font-size: .75rem; background: var(--green); color: #fff; border-radius: 999px; padding: 0 8px; }
.req-song { font-size: 1.05rem; }
.req-note { font-style: italic; color: var(--muted); }
.req-toggle { margin-top: 6px; border: 1px solid var(--green); background: none; color: var(--green-dark); border-radius: 999px; padding: 2px 12px; cursor: pointer; font-weight: 700; font-size: .82rem; }
.typing { min-height: 22px; padding: 0 18px; font-size: .8rem; color: var(--muted); font-style: italic; }
.to-bottom { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%); border: 0; background: var(--purple); color: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; box-shadow: var(--shadow); font-weight: 700; }
.replybar { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 6px 12px; background: var(--surface-2); border-radius: 10px 10px 0 0; font-size: .85rem; }
.replybar.dm { background: var(--dm); }
.replybar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replybar button { border: 0; background: none; cursor: pointer; }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.c-btn { border: 0; background: var(--surface-2); width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; flex: none; }
.c-btn:hover { background: var(--line); }
#text { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 22px; padding: 10px 16px; font: inherit; background: var(--surface-2); color: var(--text); max-height: 140px; line-height: 1.4; }
#text:focus { outline: 2px solid var(--green); border-color: transparent; }
.send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--green); color: #fff; cursor: pointer; font-size: 1.3rem; display: grid; place-items: center; }
.send:hover { background: var(--green-dark); }
.emoji-pop { position: absolute; bottom: 70px; left: 12px; width: min(340px, calc(100% - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); z-index: 10; }
.emoji-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.emoji-tabs button { border: 0; background: none; font-size: 1.2rem; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.emoji-tabs button.on { background: var(--surface-2); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); padding: 6px; max-height: 220px; overflow-y: auto; }
.emoji-grid button { border: 0; background: none; font-size: 1.45rem; padding: 4px; border-radius: 8px; cursor: pointer; }
.emoji-grid button:hover { background: var(--surface-2); transform: scale(1.15); }

/* --- buttons, dialogs, menus --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--green); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 999px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--green-dark); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }
.small-btn { padding: 4px 12px; font-size: .82rem; }
.modal { position: fixed; inset: 0; background: rgba(13, 12, 34, .6); display: grid; place-items: center; z-index: 50; padding: 16px; backdrop-filter: blur(3px); }
.modal-box { background: var(--surface); border-radius: 18px; padding: 24px; width: min(440px, 100%); max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.modal-box h2 { font: 900 1.4rem var(--heading); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.modal-x { position: absolute; right: 12px; top: 12px; border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.note { background: var(--hl); padding: 8px 12px; border-radius: 10px; }
.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; margin: 12px 0; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 7px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--navy); color: #fff; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.form input, .form select { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.form p { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.colors button.on { border-color: var(--text); }
.menu { position: fixed; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 6px; min-width: 210px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--red); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-note { padding: 8px 10px; color: var(--muted); font-size: .85rem; }
.react-pick { display: flex; gap: 2px; }
.react-pick button { font-size: 1.4rem; width: auto; padding: 4px 6px; }
.req-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.req-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.req-list li.done { opacity: .6; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 60; display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 92vh; border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 70; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }
.toast.bad { background: var(--red); }

/* --- small screens --- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding: 8px; gap: 8px; }
  .side { flex-direction: row; flex-wrap: wrap; }
  .player { flex: 1 1 100%; padding: 8px 10px; }
  .users-card, .btn-request { display: none; }
  #pane-radio { gap: 10px; }
  .big-play { width: 48px; height: 48px; font-size: 1.5rem; }
  .side-link { display: none; }
  .tabs { margin-bottom: 8px; }
  .bar { padding: 6px 10px; gap: 8px; }
  .bar-logo img { height: 36px; }
  #onair:not(.on), .np { display: none; }
  .bar-title strong { font-size: 1rem; white-space: nowrap; }
  .bar-actions { gap: 4px; }
  .icon-btn { width: 30px; }
  .mobile-only { display: inline-block; }
  #account span { display: none; }
}
@media (max-width: 900px) and (max-height: 700px) { #pane-video video { max-height: 30vh; } }

/* --- verzoekjes: studio panel, status chips and buttons --- */
.req-panel { padding: 12px; display: flex; flex-direction: column; min-height: 0; max-height: 52vh; border: 2px solid var(--green); }
.req-panel.flash { animation: reqflash 1.2s 2; }
@keyframes reqflash { 50% { box-shadow: 0 0 0 6px rgba(45,168,52,.35); } }
.req-panel-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.req-panel-head h3 { margin: 0; font: 900 1.05rem var(--heading); display: flex; align-items: center; gap: 8px; }
.count.zero { background: var(--line); color: var(--muted); }
.seg.mini { margin: 0; }
.seg.mini button { padding: 4px; font-size: .82rem; }
.req-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.req-item { border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); }
.req-item.st-queued { border-left-color: #d98f00; }
.req-item.st-done { border-left-color: var(--line); opacity: .75; }
.req-item.st-declined { border-left-color: var(--red); opacity: .75; }
.req-item-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 2px; }
.req-item .req-song { font-size: .98rem; line-height: 1.3; }
.req-empty { color: var(--muted); text-align: center; padding: 14px 6px; font-size: .9rem; }
.req-chip { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.req-chip i { font-weight: 400; font-style: normal; opacity: .85; }
.req-chip.open { background: var(--green); color: #fff; }
.req-chip.queued { background: #d98f00; color: #fff; }
.req-chip.done { background: var(--purple); color: #fff; }
.req-chip.declined { background: var(--red); color: #fff; }
.req-reason { color: var(--red); margin-top: 2px; }
.req-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.req-btns.compact { margin-top: 6px; }
.rb { border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .82rem; cursor: pointer; color: #fff; flex: 1 1 auto; }
.rb.queued { background: #d98f00; }
.rb.done { background: var(--green); }
.rb.declined { background: var(--red); }
.rb.undo { background: var(--surface); color: var(--text); border: 1px solid var(--line); flex: 0 0 auto; }
.rb:hover { filter: brightness(1.08); }
.request.st-queued { border-color: #d98f00; }
.request.st-done { border-color: var(--purple); opacity: .85; }
.request.st-declined { border-color: var(--red); opacity: .85; }
.decline { display: flex; flex-direction: column; gap: 8px; width: min(320px, 86vw); padding: 6px; }
.decline .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.decline .chips button { width: auto; display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .8rem; background: var(--surface-2); }
.decline .chips button.on, .decline .chips button:hover { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--surface)); }
.decline textarea { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; resize: vertical; }
.decline .check { display: flex; gap: 6px; align-items: center; font-size: .82rem; }
.decline-btns { display: flex; gap: 6px; }
.decline-btns .rb { width: auto; }
/* staff: request panel on top, a bit less room for the users list */
.is-staff .users-card { min-height: 90px; }
@media (max-width: 900px) { .req-panel { display: none !important; } }
/* studio names stay readable in dark mode */
:root[data-theme="dark"] .msg.staff .who, :root[data-theme="dark"] .msg .who[style*="#352c89"] { color: #b1a6ff !important; }
