/* Zelfde huisstijl als de PV Opwekdashboard-pagina's (theme.css): ONN-kleuren, Lexend + Unbounded. */
:root {
  --onn-green: #1a7c4b; --onn-green-dark: #125835; --onn-green-deep: #0b3420;
  --onn-green-soft: #e8f2ed; --onn-green-light: #90c09d;
  --onn-orange: #ef6b35; --onn-yellow: #efc502;
  --bg: #f5f4ef; --surface: #fff; --ink: #231f20; --ink-soft: #5e5c56; --line: #e5e2d6;
  --red: #d92d20;
  --radius: 14px; --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(35,31,32,.06), 0 4px 14px rgba(35,31,32,.06);
  --shadow-md: 0 2px 4px rgba(35,31,32,.07), 0 12px 28px rgba(35,31,32,.12);
  --font-body: 'Lexend', system-ui, sans-serif;
  --font-display: 'Unbounded', 'Lexend', system-ui, sans-serif;
  --side-w: 24;
  --bar-h: 60px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--font-body); overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }
.hint { color: var(--ink-soft); font-size: 14px; margin: 6px 0 12px; }

button {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease, border-color .15s ease;
}
button:not(:disabled):hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); border-color: var(--onn-green); }
button:not(:disabled):active { transform: none; box-shadow: none; }
button:disabled { opacity: .4; cursor: default; }
button.primary { background: var(--onn-green); border-color: var(--onn-green); color: #fff; font-weight: 500; }
button.primary:hover { background: var(--onn-green-dark); }
input[type=text], select { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
input:focus, select:focus { outline: none; border-color: var(--onn-green); box-shadow: 0 0 0 3px rgba(26,124,75,.18); }
input[type=range], input[type=checkbox], input[type=radio] { accent-color: var(--onn-green); }

#app { display: flex; flex-direction: column; height: 100%; }
body.bar-hidden #bar { display: none; }

/* ---- merkbalk met vensterknoppen ---- */
#bar { height: var(--bar-h); flex: none; display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: var(--onn-green); color: #fff; box-shadow: 0 2px 12px rgba(35,31,32,.25); position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand svg { height: 28px; width: auto; display: block; }
.brand .name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand .product { font-size: 11px; font-weight: 300; letter-spacing: .08em; text-transform: uppercase; color: #cce2d1; }
#tabs { flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 0; }
#tabs::-webkit-scrollbar { display: none; }
#bar button { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
#bar button:not(:disabled):hover { background: rgba(255,255,255,.22); border-color: #fff; }
.tab { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 18px; padding: 8px 20px; }
.tab .num { color: #cce2d1; font-size: 12px; font-family: var(--font-display); }
#bar .tab.active { background: #fff; border-color: #fff; color: var(--onn-green); font-weight: 500; }
.tab.active .num { color: var(--ink-soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.35); flex: none; }
.dot.on { background: var(--onn-yellow); }
.tools { display: flex; gap: 8px; }
.tools button { font-size: 14px; }

/* ---- podium + zijbalk ---- */
#layout { flex: 1; min-height: 0; display: flex; }
#layout[data-pos="left"] { flex-direction: row-reverse; }
#stage { flex: 1; min-width: 0; position: relative; background: var(--ink); }
#stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
#side { position: relative; flex: none; width: calc(var(--side-w) * 1%); background: var(--ink);
  border-left: 3px solid var(--onn-green); overflow: hidden; }
#layout[data-pos="left"] #side { border-left: 0; border-right: 3px solid var(--onn-green); }
#layout.no-side #side { display: none; }
.crop { position: absolute; inset: 0; overflow: hidden; }
.crop video { width: 100%; height: 100%; display: block; }

.wheel-overlay { position: absolute; display: none; z-index: 2; background: transparent; touch-action: none; }
.empty { position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px; text-align: center; padding: 24px; background: var(--bg);
  color: var(--ink-soft); font-size: 20px; }
.empty.show { display: flex; }
#side .empty { font-size: 15px; }

/* ---- help (zelfde patroon als het PV Dashboard: ronde ?-knop + venster) ---- */
.help-btn { position: fixed; bottom: 22px; right: 22px; width: 42px; height: 42px; padding: 0; border-radius: 50%;
  background: var(--onn-green-deep); color: #fff; border: none; font-family: var(--font-display); font-size: 17px; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow-md); z-index: 900; display: flex; align-items: center; justify-content: center; }
.help-btn:not(:disabled):hover { background: var(--onn-green); transform: none; border: none; }
body.bar-hidden .help-btn { opacity: .35; }
body.bar-hidden .help-btn:hover { opacity: 1; }
.help-overlay { position: fixed; inset: 0; background: rgba(35,31,32,.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.help-overlay[hidden] { display: none; }
.help-box { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; width: 720px; max-width: 100%;
  max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(35,31,32,.28); }
.help-box h3 { font-size: 16px; margin: 0 0 12px; color: var(--ink); text-transform: none; letter-spacing: -.01em; }
.help-body { overflow-y: auto; flex: 1; min-height: 0; font-size: 14px; line-height: 1.6; color: var(--ink); }
.help-body h4 { font-family: var(--font-display); font-weight: 500; font-size: 13px; margin: 18px 0 4px; color: var(--onn-green); }
.help-body h4:first-child { margin-top: 0; }
.help-body ul { margin: 4px 0; padding-left: 18px; }
.help-body li { margin-bottom: 4px; }
.help-body p { margin: 4px 0; }
.help-actions { flex-shrink: 0; display: flex; justify-content: flex-end; padding-top: 14px; margin-top: 10px; border-top: 1px solid var(--line); }

/* ---- mededelingenbalk ---- */
#ticker { flex: none; display: flex; align-items: center; gap: 20px; padding: 12px 24px;
  padding-right: 84px; /* ruimte voor de help-knop */
  background: var(--onn-green-deep); color: #fff; font-size: 26px; border-top: 3px solid var(--onn-yellow); }
#ticker[hidden] { display: none; }
#ticker .tag { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  background: var(--onn-yellow); color: var(--onn-green-deep); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
#tickerText { transition: opacity .35s ease; min-width: 0; line-height: 1.3; }
#tabs .hint { color: #cce2d1; margin: 0; align-self: center; }
#tickerText.fade { opacity: 0; }
.grid .row { display: flex; gap: 8px; flex-wrap: wrap; }
.grid a { color: var(--onn-green); font-weight: 500; }
.grid label input[type=password] { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }

/* ---- instellingen ---- */
#settings { position: fixed; inset: 0; background: rgba(35,31,32,.5); backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end; z-index: 10; }
#settings[hidden] { display: none; }
.panel { width: min(580px, 100%); height: 100%; overflow-y: auto; background: var(--bg); padding: 24px;
  box-shadow: -12px 0 40px rgba(35,31,32,.25); }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
h2 { margin: 0; font-size: 18px; }
h3 { margin: 24px 0 6px; font-size: 13px; color: var(--onn-green); }
#srcList { background: var(--surface); border: 1px solid rgba(35,31,32,.06); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 4px 14px; margin-bottom: 12px; }
.src-row .scroll-info { flex-basis: 100%; margin: 0; font-size: 12px; }
.src-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.src-row:last-child { border-bottom: 0; }
.src-row .dot { background: var(--line); }
.src-row .dot.on { background: var(--onn-green); }
.src-row input[type=text] { flex: 1; min-width: 0; }
.src-row button { padding: 5px 12px; font-size: 14px; }
.src-row label { font-size: 13px; color: var(--ink-soft); display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.grid { display: grid; gap: 12px; background: var(--surface); border: 1px solid rgba(35,31,32,.06);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 16px; }
.grid label { display: grid; grid-template-columns: 170px 1fr auto; gap: 10px; align-items: center; font-size: 15px; }
.grid select, .grid input[type=range] { width: 100%; }

/* ---- bedieningsvenster ---- */
body.remote #app { display: none; }
body.remote #remote { display: block !important; }
body.remote { overflow: auto; }
#remote { padding: 18px; max-width: 520px; margin: 0 auto; }
#remote[hidden] { display: none; }
#remote h1 { margin: 0 0 4px; font-size: 18px; color: var(--onn-green); }
#remoteList { display: grid; gap: 10px; margin: 12px 0; }
#remoteList button { display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 20px; text-align: left;
  border-radius: var(--radius); box-shadow: var(--shadow-sm); }
#remoteList button.active { background: var(--onn-green); border-color: var(--onn-green); color: #fff; }
#remoteList .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#remoteList button { min-width: 0; }
#remoteList .num { color: var(--ink-soft); font-family: var(--font-display); font-size: 13px; width: 18px; }
#remoteList button.active .num { color: #cce2d1; }
#remoteList .dot { background: var(--line); }
#remoteList .dot.on { background: var(--onn-green); }
#remoteList button.active .dot.on { background: var(--onn-yellow); }
#remoteSide { width: 100%; }
#remoteLogin { display: grid; gap: 8px; margin: 8px 0 14px; padding: 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
#remoteLogin[hidden] { display: none; }
#remoteLogin label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); }
#remoteLogin input { font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
#remoteScroll { display: flex; gap: 10px; margin-bottom: 10px; }
#remoteScroll[hidden] { display: none; }
#remoteScroll button { flex: 1; font-size: 20px; padding: 14px; }
#bar button[hidden] { display: none; }
