/* Mia OS V2 — Mia Bridge-statuspunt + paneel (04-10-2026, BRIDGE-DM-SPEC §5).
   Gebruikt de Strak-tokens (os-strak.css): werkt in Helder én Avond zonder os.css te raken.
   Brug-motief uit bridge-v2/08-merk: [computer] — stippellijn met stip — [teal M]. */

.bs-bron { position: absolute; width: 0; height: 0; border: 0; opacity: 0; pointer-events: none; }

/* ---------- punt in de bovenbalk ---------- */
.topbar .brug-punt {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--lijn); border-radius: var(--r1);
  background: var(--vlak2); color: var(--inkt2);
  font-family: var(--f); font-size: 12px; font-weight: 500; white-space: nowrap;
  cursor: pointer; transition: background .18s, border-color .18s, color .18s;
}
.topbar .brug-punt[hidden] { display: none; }
.topbar .brug-punt:hover, .topbar .brug-punt[aria-expanded="true"] { background: var(--zacht); border-color: var(--lijn2); color: var(--inkt); }
.topbar .brug-punt:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.topbar .brug-punt .bs-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--groen); box-shadow: 0 0 0 3px rgba(47,138,91,.15); }
.topbar .brug-punt.bezig .bs-dot { background: var(--teal); box-shadow: 0 0 0 3px rgba(14,110,115,.16); animation: bs-adem 2.4s ease-in-out infinite; }
.topbar .brug-punt.wacht .bs-dot { background: var(--oker); box-shadow: 0 0 0 3px rgba(185,130,26,.18); }
.topbar .brug-punt.uit .bs-dot { background: var(--inkt3); box-shadow: 0 0 0 3px rgba(139,149,153,.16); }
.topbar .brug-punt .bs-tekst { font-variant-numeric: tabular-nums; }
@keyframes bs-adem { 0%, 100% { box-shadow: 0 0 0 3px rgba(14,110,115,.16); } 50% { box-shadow: 0 0 0 5px rgba(14,110,115,.06); } }
@media (max-width: 1080px) { .topbar .brug-punt .bs-tekst { max-width: 150px; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 759px) { .topbar .brug-punt { display: none; } }

/* ---------- paneel ---------- */
.bs-paneel {
  position: fixed; z-index: 9000; width: 372px; max-width: calc(100vw - 16px); max-height: 70vh; overflow: auto;
  background: var(--vlak); color: var(--inkt);
  border: 1px solid var(--lijn); border-radius: var(--r2); box-shadow: var(--sh-m);
  font-family: var(--f); padding: 6px;
  animation: pm-in .16s cubic-bezier(.16,1,.3,1);
}
.bs-kop { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px; }
.bs-titel { font-size: 13px; font-weight: 600; color: var(--inkt); }
.bs-sub { font-size: 12px; color: var(--inkt3); margin-top: 1px; }
.bs-advies { margin: 0 6px 6px; padding: 8px 10px; border-radius: var(--r1); background: var(--teal-z); color: var(--inkt); font-size: 12px; line-height: 1.45; }
.bs-advies b { color: var(--teal); font-weight: 600; margin-right: 4px; }
.bs-advies.nee { background: var(--vlak2); color: var(--inkt2); }
.bs-advies.nee b { color: var(--inkt2); }

.bs-lijst { display: flex; flex-direction: column; gap: 2px; }
.bs-app { padding: 10px; border-radius: var(--r1); }
.bs-app + .bs-app { border-top: 1px solid var(--lijn); border-radius: 0 0 var(--r1) var(--r1); }
.bs-rij { display: flex; align-items: center; gap: 12px; }
.bs-wie { flex: 1; min-width: 0; }
.bs-naam { font-size: 13px; font-weight: 600; color: var(--inkt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-meta { font-size: 12px; line-height: 1.4; color: var(--inkt3); margin-top: 1px; }
.bs-app.s-offline .bs-naam, .bs-app.s-slaapt .bs-naam { color: var(--inkt2); }

/* het brug-motief */
.bs-brug { display: inline-flex; align-items: center; flex: none; }
.bs-brug i { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-style: normal; flex: none; }
.bs-brug .bs-pc { background: var(--grond2); color: var(--inkt); }
.bs-brug .bs-pc svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bs-brug .bs-m { background: var(--teal); }
.bs-brug .bs-m svg { width: 18px; height: 18px; }
.bs-brug .bs-lijn { position: relative; width: 26px; height: 2px; margin: 0 3px;
  background: repeating-linear-gradient(90deg, var(--teal) 0 4px, transparent 4px 7px); }
.bs-brug .bs-lijn b { position: absolute; top: 50%; left: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--teal); }
.bs-brug.aan .bs-lijn b { animation: bs-stip 1.6s ease-in-out infinite alternate; }
.bs-brug.wacht .bs-lijn { background: repeating-linear-gradient(90deg, var(--oker) 0 4px, transparent 4px 7px); }
.bs-brug.wacht .bs-lijn b { left: 50%; background: var(--oker); }
.bs-brug.pauze .bs-lijn b { display: none; }
.bs-brug.uit .bs-lijn { background: repeating-linear-gradient(90deg, var(--inkt3) 0 4px, transparent 4px 9px); opacity: .55; }
.bs-brug.uit .bs-lijn b { display: none; }
.bs-brug.uit .bs-m { background: var(--inkt3); opacity: .6; }
.bs-brug.uit .bs-pc { color: var(--inkt2); }
@keyframes bs-stip { from { left: 0; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .bs-brug.aan .bs-lijn b { animation: none; left: 44%; }
  .topbar .brug-punt.bezig .bs-dot { animation: none; }
}

/* staat-pil (kleur = staat, altijd met woord) */
.bs-pil { flex: none; font-size: 11px; font-weight: 500; line-height: 1; padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.bs-pil.s-verbonden { background: rgba(47,138,91,.10); color: var(--groen); }
.bs-pil.s-bezig { background: var(--teal-z); color: var(--teal); }
.bs-pil.s-wacht { background: rgba(185,130,26,.12); color: var(--oker); }
.bs-pil.s-gepauzeerd, .bs-pil.s-slaapt, .bs-pil.s-offline { background: var(--vlak2); color: var(--inkt3); border: 1px solid var(--lijn); }

/* wat er nu loopt */
.bs-nu { margin: 8px 0 0 94px; }
.bs-nu-t { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.bs-nu-naam { color: var(--inkt); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bs-nu-app { color: var(--inkt3); white-space: nowrap; }
.bs-nu-pct { margin-left: auto; font-family: var(--m); font-size: 11px; color: var(--inkt2); font-variant-numeric: tabular-nums; }
.bs-balk { height: 4px; margin-top: 5px; border-radius: 2px; background: var(--grond2); overflow: hidden; }
.bs-balk i { display: block; height: 100%; border-radius: 2px; background: var(--teal); transition: width .4s ease; }
.bs-noot { margin: 6px 0 0 94px; font-size: 12px; color: var(--oker); }
.bs-noot.rustig { color: var(--inkt3); }

.bs-vol { display: flex; align-items: center; gap: 8px; margin: 4px 6px 0; padding: 8px 10px; border-radius: var(--r1);
  background: rgba(194,74,66,.07); color: var(--warn); font-size: 12px; font-weight: 500; }
.bs-vol i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }

.bs-voet { display: flex; justify-content: flex-end; padding: 8px 6px 4px; margin-top: 4px; border-top: 1px solid var(--lijn); }
.bs-knop { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 0; border-radius: var(--r1); background: var(--teal); color: #fff;
  font-family: var(--f); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .18s; }
.bs-knop:hover { background: var(--teal2); }
.bs-knop:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.bs-knop svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Avond: tokens doen het meeste; alleen de vaste rgba-tinten bijstellen */
html[data-thema="avond"] .bs-paneel { background: var(--vlak2); border-color: var(--lijn2); box-shadow: 0 16px 40px -16px rgba(0,0,0,.6); }
html[data-thema="avond"] .bs-brug .bs-pc { background: #232C30; }
html[data-thema="avond"] .bs-pil.s-verbonden { background: rgba(93,190,138,.14); }
html[data-thema="avond"] .bs-pil.s-wacht { background: rgba(215,162,74,.16); }
html[data-thema="avond"] .bs-pil.s-gepauzeerd, html[data-thema="avond"] .bs-pil.s-slaapt, html[data-thema="avond"] .bs-pil.s-offline { background: #1E272A; }
html[data-thema="avond"] .bs-balk { background: #232C30; }
html[data-thema="avond"] .bs-vol { background: rgba(224,138,130,.10); }
html[data-thema="avond"] .bs-knop { color: #0E1315; }
html[data-thema="avond"] .bs-knop:hover { background: #6FD0C6; }
html[data-thema="avond"] .topbar .brug-punt .bs-dot { box-shadow: 0 0 0 3px rgba(93,190,138,.16); }
.bs-som { flex: none; align-self: flex-start; margin-top: 2px; font-size: 12px; color: var(--inkt3); }
.bs-som b { font-family: var(--m); font-weight: 400; font-size: 11px; color: var(--inkt2); font-variant-numeric: tabular-nums; }
