:root{
  --bg:#121418;
  --card:#1c1f26;
  --row1:#20242b;
  --row2:#252932;
  --accent:#ff4081;
  --txt:#e0e0e0;
  --time:#00e676;
  --blue:#42a5f5;
}

*{
  box-sizing:border-box;
}

body{
  margin:16px;
  font-family:"Segoe UI",Arial,sans-serif;
  color:var(--txt);
  background:var(--bg);
}

.card{
  background:var(--card);
  border:1px solid #333;
  border-radius:8px;
  box-shadow:0 2px 6px rgba(0,0,0,.6);
}

.maplink{
  color:#90caf9;
  font-weight:700;
  margin-left:6px;
  text-decoration:none;
}
.maplink:hover{
  text-decoration:underline;
}

/* ===== COMMANDO BAR ===== */
.commandbar-shell{
  position:relative;
  margin-bottom:16px;
}
.commandbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 14px;
  background:linear-gradient(145deg,#1f232c 0%,#1a1d24 60%);
  border:1px solid #2f3440;
  border-radius:8px;
  box-shadow:0 10px 30px rgba(0,0,0,.7),0 2px 4px rgba(0,0,0,.8);
}
.command-left,
.command-right{
  display:flex;
  align-items:center;
  gap:10px;
}
.command-center{
  flex:1;
  display:flex;
  justify-content:center;
}

/* knop-stijl */
.command-btn{
  appearance:none;
  border:1px solid #3a3f4f;
  background:#262b35;
  color:#fff;
  font-size:12px;
  font-weight:600;
  line-height:1;
  padding:8px 10px;
  border-radius:6px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:6px;
  box-shadow:0 4px 12px rgba(0,0,0,.6);
}
.command-btn:hover{
  background:#2f3542;
}
.command-btn-label{color:#fff;}
.command-btn-arrow{
  color:var(--accent);
  font-weight:700;
}

/* klok */
.clock{
  display:inline-block;
  background:#0f1217;
  border:2px solid #30343d;
  border-radius:8px;
  padding:6px 12px;
  font:700 16px/1.1 "Consolas","SFMono-Regular","Menlo",monospace;
  color:#9ee2ff;
  text-shadow:0 0 8px rgba(66,165,245,.35);
  letter-spacing:1px;
  user-select:none;
  box-shadow:0 2px 6px rgba(0,0,0,.35);
}
.clock.ok{
  border-color:#2e7d32;
  box-shadow:0 0 10px rgba(46,125,50,.45);
}
.clock.stale{
  border-color:#8b1d1d;
  box-shadow:0 0 10px rgba(139,29,29,.45);
}

.quick-info{
  font-size:11px;
  font-weight:500;
  color:#9e9e9e;
  line-height:1.3;
}

/* ===== PANELS (Filters / Instellingen) ===== */
.panel-block{
  position:relative;
  margin-top:8px;
  background:var(--card);
  border:1px solid #333;
  border-radius:8px;
  box-shadow:0 18px 40px rgba(0,0,0,.8);
  padding:16px;
  animation:panelFade .18s ease-out;

  /* belangrijke anti-scroll safety net */
  max-width:100%;
  overflow-x:hidden;
}
@keyframes panelFade{
  0%{opacity:0;transform:translateY(-4px) scale(.98);}
  100%{opacity:1;transform:translateY(0) scale(1);}
}

/* binnenkant van panel */
.panel-inner{
  display:flex;
  flex-wrap:wrap;
  gap:20px;

  /* ook afkappen voor zekerheid */
  max-width:100%;
  overflow-x:hidden;
}

/* kolommen binnen panels */
.filtercol,
.filtersearch,
.settingscol,
.settingsactions{
  /* flex-basis iets kleiner gemaakt dan 200 zodat 2-3 kolommen + gap passen
     zonder dat ze de container oprekken */
  flex:1 1 180px;
  min-width:180px;
  max-width:100%;

  background:#1a1d24;
  border:1px solid #2d303a;
  border-radius:6px;
  padding:12px;

  /* standaard: mag verticaal scrollen als hij te lang is */
  max-height:260px;
  overflow-y:auto;
  overflow-x:hidden;

  box-shadow:inset 0 0 12px rgba(0,0,0,.6);
}

/* kolommen die géén eigen scroll/hoogtebeperking hoeven */
.settingscol{
  max-height:none;
  overflow-y:visible;
}
.settingsactions{
  max-height:none;
  overflow-y:visible;

  /* acties-kolom vaak smaller, duw ‘m niet breder dan nodig */
  flex:0 0 150px;
  min-width:150px;
  max-width:100%;
}

.filtersearch{
  /* zoekvak kolom mag gewoon meegroeien en hoeft niet te scrollen */
  max-height:none;
  overflow-y:visible;
}

.panel-head{
  font-size:12px;
  font-weight:700;
  color:var(--accent);
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.panel-body{
  font-size:12px;
  line-height:1.4;
  color:#ccc;
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
}

/* checkboxen */
.filter-check{
  display:flex;
  align-items:flex-start;
  gap:6px;
  cursor:pointer;
  user-select:none;
}
.filter-check input[type="checkbox"]{
  appearance:none;
  width:16px;
  height:16px;
  border-radius:4px;
  background:#11141a;
  border:1px solid #4a4f5f;
  cursor:pointer;
  flex-shrink:0;
  position:relative;
}
.filter-check input[type="checkbox"]:checked{
  background:var(--accent);
  border-color:var(--accent);
  box-shadow:0 0 10px rgba(255,64,129,.6);
}
.filter-check input[type="checkbox"]:checked::after{
  content:'?';
  position:absolute;
  top:-2px;
  left:2px;
  font-size:12px;
  font-weight:700;
  color:#000;
  text-shadow:0 0 2px rgba(0,0,0,.8);
}
.filter-check .lbl-main{
  font-size:12px;
  font-weight:600;
  color:#fff;
  line-height:1.3;
}
.filter-check .lbl-sub{
  font-size:11px;
  font-weight:400;
  color:#888;
  line-height:1.3;
}

/* zoekveld */
.search-input-wrap{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-width:100%;
}
.search-input-wrap input{
  width:100%;
  height:32px;
  border-radius:4px;
  border:1px solid #4a4f5f;
  background:#11141a;
  color:#fff;
  font-size:12px;
  font-weight:600;
  padding:0 8px;
  outline:none;
  box-shadow:0 0 8px rgba(0,0,0,.8);
  box-sizing:border-box; /* belangrijk op mobiel om overflow te voorkomen */
}
.search-input-wrap input:focus{
  border-color:var(--accent);
  box-shadow:0 0 10px rgba(255,64,129,.5);
}
.search-help{
  font-size:11px;
  color:#888;
  line-height:1.4;
  word-break:break-word;
}

/* instellingen rows */
.settings-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 0;
  border-bottom:1px solid #2d303a;
  font-size:12px;
  line-height:1.4;
  color:#ccc;
}
.settings-row:last-child{
  border-bottom:0;
}
.settings-label{
  flex:1;
  font-weight:600;
  color:#fff;
  display:flex;
  align-items:center;
  gap:6px;
}
.settings-label small{
  font-weight:400;
  color:#888;
  font-size:11px;
  line-height:1.3;
}
.settings-control{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:6px;
}
.settings-select{
  height:26px;
  font-size:12px;
  border:1px solid #555;
  border-radius:4px;
  background:#1e2127;
  color:#fff;
  padding:0 6px;
  font-weight:600;
  cursor:pointer;
}
.settings-select option{
  background:#1e2127;
  color:#fff;
}

/* switches */
.switch{
  position:relative;
  width:56px;
  height:28px;
  border-radius:999px;
  cursor:pointer;
  border:1px solid #555;
  background:#7a1d1d;
  transition:background .2s, border-color .2s;
}
.switch.on{
  background:#1f6d2e;
  border-color:#3a8f52;
}
.switch .knob{
  position:absolute;
  top:2px;
  left:2px;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#eee;
  transition:left .2s;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:14px;
  color:#333;
}
.switch.on .knob{
  left:30px;
}
.switch.voice .knob::after{
  content: attr(data-sym);
}

/* Actieknoppen rechts */
.panel-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.btn-apply,
.btn-clear{
  appearance:none;
  border-radius:6px;
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  padding:8px 10px;
  cursor:pointer;
  border:1px solid transparent;
  box-shadow:0 4px 12px rgba(0,0,0,.7);
  text-align:center;
  width:80%;
  min-width:110px;
}
.btn-apply{
  background:var(--accent);
  border-color:var(--accent);
  color:#000;
  width:80%;
  text-shadow:0 0 2px rgba(0,0,0,.4);
}
.btn-apply:hover{
  filter:brightness(1.1);
  box-shadow:0 0 12px rgba(255,64,129,.8),0 4px 12px rgba(0,0,0,.8);
}
.btn-clear{
  background:#2a2f38;
  border:1px solid #444a5f;
  color:#fff;
}
.btn-clear:hover{
  background:#303644;
}

/* Kleinere schermen */
@media(max-width:900px){
  /* kleinere gap zodat rij + gap niet buiten parent duwt */
  .panel-inner{
    gap:16px;
  }

  .clock{
    font-size:15px;
    padding:5px 10px;
  }
  .switch{
    width:52px;
    height:26px;
  }
  .switch .knob{
    width:22px;
    height:22px;
  }
  .switch.on .knob{
    left:28px;
  }

  /* verberg de grijze statusregels */
  .quick-info{
    display:none !important;
  }

  .commandbar{
    flex-wrap:nowrap;
    justify-content:space-between;
  }
  .command-left,
  .command-right{
    gap:6px;
  }
  .command-btn{
    padding:8px 9px;
    font-size:12px;
  }
  .clock{
    font-size:14px;
    padding:5px 10px;
  }
}

@media(max-width:600px){
  .panel-inner{
    flex-direction:column;
    gap:16px;
    max-width:100%;
  }

  .filtercol,
  .filtersearch,
  .settingscol,
  .settingsactions{
    min-width:0;
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    max-height:none;
    overflow-y:visible;
  }

  .settingsactions{
    flex:1 1 auto;
  }

  .panel-actions{
    flex-direction:row;
    flex-wrap:wrap;
  }
  .btn-apply,
  .btn-clear{
    flex:0 1 auto;
    min-width:100px;
  }
}

/* Tabel met meldingen */
#meldingen-container{
  margin-top:12px;
}
.p2000-table{
  width:100%;
  border-collapse:collapse;
}
.p2000-table td{
  padding:8px 10px;
  border:1px solid #333;
  font-size:13px;
  line-height:1.35;
  text-align:left;
  vertical-align:top;
}
.p2000-table tr:nth-child(odd) td{background:var(--row1);}
.p2000-table tr:nth-child(even) td{background:var(--row2);}
.p2000-table td.time{
  width:110px;
  text-align:center;
  background:#1f232a;
  color:#bdbdbd;
}
.time-text{
  color:var(--time);
}
.bullet{
  color:var(--blue);
  margin-right:4px;
}
.cap{
  color:#ccc;
  margin-right:4px;
}
.loading{
  text-align:center;
  color:#ccc;
  padding:14px;
}
i{
  font-style:italic;
}

/* Blink animatie */
@keyframes blink{
  0%,100%{opacity:1}
  50%{opacity:.2}
}
.melding-title.blink{
  animation:blink .8s steps(1,end) infinite;
}

/* iets compacter op <=720px */
@media (max-width:720px){
  .p2000-table td{
    padding:7px 9px;
    font-size:12.5px;
  }
  .p2000-table td.time{
    width:100px;
  }
  .clock{
    font-size:14px;
  }
}

/* oude control-card is verborgen */
.control.card{
  display:none;
}

/* ===== "Scherm bovenop" modus ===== */
.commandbar-shell.onTopActive{
  position:sticky;
  top:0;
  z-index:9999;
}
.commandbar-shell.onTopActive .commandbar{
  box-shadow:0 12px 24px rgba(0,0,0,.9),0 0 12px rgba(0,0,0,.8);
}

/* ===== Dynamische tekstschaal ===== */
body.textScale-small .p2000-table td {
  font-size:11.5px;
}
body.textScale-small .clock {
  font-size:14px;
  padding:5px 10px;
}

body.textScale-normal .p2000-table td {
  font-size:13px;
}
body.textScale-normal .clock {
  font-size:16px;
  padding:6px 12px;
}

body.textScale-large .p2000-table td {
  font-size:14.5px;
}
body.textScale-large .clock {
  font-size:18px;
  padding:7px 13px;
}

body.textScale-xlarge .p2000-table td {
  font-size:16px;
}
body.textScale-xlarge .clock {
  font-size:20px;
  padding:8px 14px;
}

body.textScale-large   .p2000-table td.time,
body.textScale-xlarge  .p2000-table td.time{
  font-size:14px;
}
body.textScale-small   .p2000-table td.time{
  font-size:11.5px;
}
.clock-and-stats{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.recent-stats {
  font-size: 11px;
  line-height: 1.4;
  color: #ccc;
  text-align: center;
  margin: 4px 0 8px 0;
  white-space: nowrap;
}

.recent-stats span {
  margin-left: 6px;
}

.update-label {
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  background: #444;
  display: inline-block;
  padding: 2px 4px;
  border-radius: 3px;
  margin-top: 6px;
  margin-bottom: 2px;
}

/* =========================
   THEATER MODE
   ========================= */

/* Body in theater mode */
body.theater-active {
  /* neem de hele viewport */
  margin: 0;
  padding: 0;
  background: #000;              /* donker, meldkamer vibe */
  height: 100vh;
  width: 100vw;
  overflow: hidden;              /* geen scrollbalk graag op meldkamer-scherm */
  display: flex;
  flex-direction: column;
}

/* Balk bovenin vast en full width */
body.theater-active #commandBarShell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #111;
  box-shadow: 0 4px 12px rgba(0,0,0,0.8);
  border-bottom: 1px solid #333;
}

/* commandbar zelf iets compacter/strakker in theater */
body.theater-active .commandbar.card {
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding-left: 12px;
  padding-right: 12px;
}

/* Panels (Filters/Instellingen) in theater mode fullscreen-breed onder de balk */
body.theater-active .panel-block.card {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid #333;
  background: #000;
  box-shadow: none;
  color: #fff;
}

/* Meldingenlijst vullend onder de balk (en onder evt. open panel) */
body.theater-active #meldingen-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  /* top = onderkant van de commandbar/panel.
     We lossen dit slim met padding-top op via JS (zie script),
     maar geven hier alvast basis als fallback: */
  top: 90px;

  background: #000;
  color: #fff;
  overflow-y: auto;
  padding: 8px 12px 120px 12px; /* ruimte onder voor adem */
  font-size: 5.1em;
  line-height: 1.4;
}

/* Kaart met meldingen full-breed, zonder extra witte randjes */
body.theater-active #meldingen-container .card {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #fff;
  padding: 0;
  margin: 0;
}

/* Tabel in theater mooi strak en goed leesbaar */
body.theater-active .p2000-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
  font-size: inherit;
}
body.theater-active .p2000-table td.time {
  white-space: nowrap;
  vertical-align: top;
  padding: 4px 8px 4px 0;
  color: #aaa;
  font-weight: 600;
  min-width: 70px;
  border-right: 1px solid #333;
}
body.theater-active .p2000-table td.msg {
  padding: 4px 8px;
  color: #fff;
}

/* klokje in de commandbar in theater mode iets alarmerender zichtbaar
   (groen/rood randje gebruik je al met .ok/.stale, dat laten we met rust) */
body.theater-active #clock {
  font-size: 18px;
  font-weight: bold;
}

/* quick-info tekstkleur iets lichter */
body.theater-active .quick-info {
  color: #ccc;
}

/* Theater-knop zelf visueel "aan" */
.command-btn.theater-active-btn {
  background: #222;
  border: 1px solid #666;
  color: #fff;
}
.command-btn.theater-active-btn .command-btn-arrow {
  color: #0f0; /* klein groen lampje */
}

.mobile-break {
  display: none;
}
@media (max-width: 600px) {
  .mobile-break {
    display: inline;
  }
}


/* =========================
   THEATER MODE EXTRA CSS
   ========================= */

/* Body in theater mode */
body.theater-active {
  margin: 0;
  padding: 0;
  background: #000;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Balk bovenin vast en full width */
body.theater-active #commandBarShell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #111;
  box-shadow: 0 4px 12px rgba(0,0,0,0.8);
  border-bottom: 1px solid #333;
}

/* commandbar in theater iets strakker */
body.theater-active .commandbar.card {
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding-left: 12px;
  padding-right: 12px;
}

/* Panels (Filters/Instellingen) in theater mode breed onder de balk */
body.theater-active .panel-block.card {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid #333;
  background: #000;
  box-shadow: none;
  color: #fff;
}

/* Meldingenlijst onder de balk, full screen */
body.theater-active #meldingen-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  /* top wordt dynamisch gezet via JS voor exacte hoogte van de balk/panel */
  top: 90px;

  background: #000;
  color: #fff;
  overflow-y: auto;
  padding: 8px 12px 120px 12px;
  font-size: 1.1em;
  line-height: 1.4;
}

/* Kaart met meldingen full-breed, geen rand */
body.theater-active #meldingen-container .card {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #fff;
  padding: 0;
  margin: 0;
}

/* Tabel strak en leesbaar in theater */
body.theater-active .p2000-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
  font-size: inherit;
}
body.theater-active .p2000-table td.time {
  white-space: nowrap;
  vertical-align: top;
  padding: 4px 8px 4px 0;
  color: #aaa;
  font-weight: 600;
  min-width: 70px;
  border-right: 1px solid #333;
}
body.theater-active .p2000-table td.msg {
  padding: 4px 8px;
  color: #fff;
}

/* klok iets prominenter */
body.theater-active #clock {
  font-size: 18px;
  font-weight: bold;
}

/* quick-info lichtere tekst */
body.theater-active .quick-info {
  color: #ccc;
}

/* Theater-knop actief uiterlijk */
.command-btn.theater-active-btn {
  background: #222;
  border: 1px solid #666;
  color: #fff;
}
.command-btn.theater-active-btn .command-btn-arrow {
  color: #0f0;
}

/* =========================
   STATUS ONTVANGERS
   ========================= */
.receiver-status-block{
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #333;
  font-size: 11px;
}

.receiver-title{
  font-weight: 600;
  margin-bottom: 4px;
  color: #ccc;
  text-align: center;
  
}

.receivers-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:100%;
}

.receiver-pill {
  width: 100%;
  max-width: 100%;
  white-space: normal;     /* laat tekst afbreken */
  word-break: break-word;  /* forceer breken bij lange woorden */
  display: block;
  text-align: center;
  padding: 6px 6px;        /* iets smaller zodat hij beter past */
}



.receiver-pill.online{
  background: #1b5e20;
  border-color: #43a047;
}

.receiver-pill.offline{
  background: #641515;
  border-color: #e53935;
}

.copy-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  margin-left: 4px;
}
.copy-btn:hover {
  transform: scale(1.1);
}

.copy-feedback {
  font-size: 14px;
  color: #8bc34a;     /* zacht groen */
  margin-left: 4px;
  transition: opacity 0.6s ease;
}

/* =========================
   POPUP ONTVANGER-DETAILS
   ========================= */
.receiver-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.receiver-modal.visible {
  display: block;
}

.receiver-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.receiver-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #242933;
  color: #eee;
  border-radius: 8px;
  border: 1px solid #555;
  padding: 14px 16px 16px 16px;
  max-width: 420px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  font-size: 12px;
}

.receiver-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.receiver-modal-title {
  font-weight: 600;
  font-size: 13px;
}

.receiver-modal-close {
  border: none;
  background: transparent;
  color: #eee;
  font-size: 16px;
  cursor: pointer;
}

.receiver-modal-close:hover {
  color: #fff;
}

.receiver-modal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}

.receiver-modal-table th,
.receiver-modal-table td {
  padding: 3px 4px;
  border-bottom: 1px solid #333;
  vertical-align: top;
}

.receiver-modal-table th {
  text-align: left;
  width: 45%;
  color: #ccc;
  font-weight: 500;
}

.receiver-modal-table td {
  text-align: right;
  color: #eee;
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 11px;
}

/* =========================
   STATUS ONTVANGERS
   ========================= */
.receiver-status-block{
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #333;
  font-size: 11px;
}

.receiver-title{
  font-weight: 600;
  margin-bottom: 4px;
  color: #ccc;
  font-weight:700;
}

.receivers-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:100%;
}

.receiver-pill{
  padding: 6px 10px;
  border-radius:6px;
  font-size: 12px;
  font-weight:600;
  background:#3a3f47;
  border:1px solid #555;
  color:#eee;
  width:80%;        /* volledige breedte */
  display:block;     /* volgordeblok */
  text-align:center;
  
}


.receiver-pill.online{
  background: #1b5e20;
  border-color: #43a047;
}

.receiver-pill.offline{
  background: #641515;
  border-color: #e53935;
}

.receiver-modal-grid{
  display:flex;
  gap:14px;
  align-items:flex-start;
}

.receiver-modal-left{ flex: 1 1 auto; min-width: 360px; }
.receiver-modal-right{
  flex: 0 0 auto;
  padding:10px;
  border:1px solid #333;
  border-radius:10px;
  background: rgba(0,0,0,0.25);
}

.receiver-field-link{
  all:unset;
  cursor:pointer;
  color:#42a5f5;
  font-weight:600;
}
.receiver-field-link:hover{ text-decoration: underline; }

.receiver-chart-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
}
.receiver-chart-title{ font-weight:700; font-size:13px; }
.receiver-chart-close{
  all:unset;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  padding:0 6px;
  opacity:0.85;
}
.receiver-chart-close:hover{ opacity:1; }

.receiver-chart-meta{
  margin-top:6px;
  font-size:11px;
  color:#bbb;
}

.receiver-chart-hint{
  margin-top:8px;
  font-size:11px;
  color:#888;
}

/* =========================
   Receiver modal — breder + geen horizontale scroll
   ========================= */

.receiver-modal-content{
  /* breder dan nu, maar blijft binnen viewport */
  width: min(1180px, calc(100vw - 48px));
  max-width: 1180px;
  overflow-x: hidden; /* voorkom horizontale schuifbalk */
}

.receiver-modal-grid{
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 600px; /* links flexibel, rechts vaste grafiek kolom */
  gap: 16px;
  align-items: start;
  overflow-x: hidden;
}

/* rechterpaneel mag niet de boel breder duwen */
#receiverChartPane{
  width: 600px;
  max-width: 600px;
  overflow: hidden;
}

/* canvas past binnen de kolom */
#receiverChartCanvas{
  width: 100%;
  height: auto;
  display: block;
}

/* tabel/tekst mag wrappen i.p.v. overflow */
.receiver-modal-table{
  width: 100%;
  table-layout: fixed;
}

.receiver-modal-table th,
.receiver-modal-table td{
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Als je op kleinere schermen zit: onder elkaar */
@media (max-width: 1100px){
  .receiver-modal-grid{
    grid-template-columns: 1fr;
  }
  #receiverChartPane{
    width: auto;
    max-width: none;
  }
}

/* =========================
   PROCESSING OVERLAY
   ========================= */
.processing-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:20000;
  backdrop-filter: blur(2px);
}

.processing-overlay[hidden]{
  display:none !important;
}

.processing-box{
  background:#151922;
  border:1px solid #2d3340;
  border-radius:12px;
  padding:16px 18px;
  min-width:260px;
  box-shadow:0 18px 50px rgba(0,0,0,.85);
  color:#fff;
  text-align:center;
}

.processing-title{
  font-weight:800;
  letter-spacing:.02em;
  margin-bottom:6px;
}

.processing-sub{
  font-size:12px;
  color:#b9c0cf;
}

.processing-spinner{
  width:26px;
  height:26px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,255,255,.85);
  margin:12px auto 0;
  animation:spin .85s linear infinite;
}

@keyframes spin{
  to{ transform:rotate(360deg); }
}

body.theater-active .p2000-table td{
  font-size: inherit !important;
}

body.theater-active #clock{
  font-size: 2.2em !important;   /* klok extra groot */
  padding: 10px 16px !important;
}

body.theater-active .recent-stats{
  font-size: 1.2em !important;   /* stat-regel onder klok */
}

body.theater-active .p2000-table td.time{
  min-width: 85px !important;  /* of 70/80/95 */
  padding-right: 10px !important;
 
}

/* ===== THEATER MODE – GROTERE MELDTEKST (override, helemaal onderaan plaatsen) ===== */
body.theater-active #meldingen-container{
  font-size: 1.85em !important;   /* <-- pas dit aan (1.4–1.9 is meestal fijn) */
  line-height: 1.45 !important;
}

body.theater-active .p2000-table td.time{
  font-size: 0.95em !important;   /* tijd iets kleiner dan melding, beter scanbaar */
}

body.theater-active .melding-title{
  font-size: 1.05em !important;   /* titel nét iets extra */
  font-weight: 800;
}

body.theater-active .msg-line{
  font-size: 1.00em !important;   /* cap/omschrijving gelijk aan basis */
}

body.theater-active #recentStatsRow{
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  padding: 6px 0;
}

.recent-stats span{
  display: inline-block;
  min-width: 110px;
  font-variant-numeric: tabular-nums;
}

.seo-context{
  max-width:1200px;
  margin:14px auto 10px auto;
  padding:10px 14px;
  border:1px solid #222;
  border-radius:12px;
  background:#0f1116;
  color:#aab;
  font-size:12px;
  line-height:1.5;
}
.seo-context h2{
  margin:0 0 6px 0;
  font-size:13px;
  color:#dde;
}
.seo-context p{
  margin:0;
}

.p2000-table td.time{
  width:110px;
  text-align:center;
  background:#1f232a;
  color:#bdbdbd;
  vertical-align:middle;
}

.disc-icon-wrap{
  margin-top:6px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.disc-icon{
  width:30px;
  height:30px;
  opacity:0.95;
}
.theater-mode .disc-icon{
  width:50px;
  height:50px;
}
.melding-title.copyable{
  cursor:pointer;
}
.melding-title.copyable:hover{
  text-decoration: underline;
}
