/* Functiestijlen (bovenop css/design.css). */
.cc-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.cc-thumb { display: block; background: var(--cc-surface); border: 1px solid var(--cc-border); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--cc-shadow); transition: transform .12s, box-shadow .12s; }
.cc-thumb:hover { transform: translateY(-2px); box-shadow: var(--cc-shadow-lg); color: inherit; }
.cc-thumb img, .cc-thumb .cc-noimg { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #0f1724; display: block; }
.cc-thumb div { padding: .5rem .65rem; font-size: .82rem; color: var(--cc-muted); }
.cc-thumb div strong { color: var(--cc-text); }
.cc-video { width: 100%; max-height: 75vh; background: #000; border-radius: 14px; display: block; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; width: 100%; padding: .7rem 1.25rem; background: var(--cc-warn-bg); color: var(--cc-text); border-top: 1px solid var(--cc-border); z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.blazor-error-boundary { background: var(--cc-danger-bg); padding: 1rem; border-radius: 12px; color: var(--cc-text); }
.blazor-error-boundary::after { content: "Er is een fout opgetreden."; }

.cc-zone { position: relative; width: 100%; max-width: 640px; aspect-ratio: 16/9; background: #1d2733; border-radius: .4rem; overflow: hidden; touch-action: none; }
.cc-zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cc-zone-layer { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(18, 1fr); }
.cc-zone-cell { border: 1px solid rgba(255,255,255,.25); background: rgba(40,167,69,.25); padding: 0; min-width: 0; min-height: 0; }
.cc-zone-cell.off { background: rgba(0,0,0,.55); }
details > summary { cursor: pointer; }

.cc-tl-hours { position: relative; height: 1.1rem; margin-left: 5.5rem; font-size: .7rem; color: var(--cc-subtle); }
.cc-tl-hours span { position: absolute; transform: translateX(-50%); }
.cc-tl-row { display: flex; align-items: center; gap: .5rem; margin: .3rem 0; }
.cc-tl-name { width: 5rem; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-tl-bar { position: relative; flex: 1; height: 28px; background: repeating-linear-gradient(90deg, var(--cc-border) 0 1px, var(--cc-surface-2) 1px calc(100%/8)); border-radius: 6px; overflow: hidden; }
.cc-tl-block { position: absolute; top: 3px; bottom: 3px; min-width: 3px; border: 0; padding: 0; border-radius: 2px; cursor: pointer; }
.cc-tl-block.motion, .cc-tl-key.motion { background: #dc2626; }
.cc-tl-block.cont, .cc-tl-key.cont { background: #2563eb; opacity: .75; }
.cc-tl-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; vertical-align: middle; }

/* ---- Mozaïek ---- */
.cc-mosaic-app { background: #070b12; color: #e5e7eb; border-radius: 16px; padding: .6rem; margin: 0 0 1rem; border: 1px solid #1a2333; box-shadow: var(--cc-shadow); }
.cc-mosaic-app .form-select, .cc-mosaic-app .form-control { background-color: #121a27; color: #e5e7eb; border-color: #263247; min-height: 34px; }
.cc-mosaic-bar, .cc-mosaic-play { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .5rem; }
.cc-mosaic-bar .form-select, .cc-mosaic-play .form-select { width: auto; }
.cc-mosaic-play input[type=date] { width: auto; }
.cc-mosaic-clock { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 5.5rem; }
.cc-mosaic-scrub { position: relative; flex: 1 1 100%; }
.cc-mosaic-marks { position: absolute; left: 0; right: 0; top: 50%; height: 8px; transform: translateY(-50%); pointer-events: none; }
.cc-mark { position: absolute; top: 0; bottom: 0; min-width: 2px; border-radius: 1px; }
.cc-mark.motion { background: #ef4444; } .cc-mark.cont { background: #3b82f6; opacity: .7; }
.cc-mosaic-pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .5rem; scrollbar-width: none; }
.cc-mosaic-pages::-webkit-scrollbar { display: none; }
.cc-mosaic-page { flex: 0 0 100%; scroll-snap-align: start; display: grid; gap: 3px; max-height: 80vh; }
.cc-tile { position: relative; background: #111827; overflow: hidden; border-radius: 3px; min-height: 0; min-width: 0; cursor: pointer; }
.cc-tile video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.cc-tile.empty video { display: none; }
.cc-tile.drop { outline: 2px dashed #60a5fa; outline-offset: -2px; }
.cc-tile-label { position: absolute; left: .3rem; top: .2rem; font-size: .72rem; text-shadow: 0 0 3px #000; pointer-events: none; }
.cc-tile-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-size: .75rem; color: #9ca3af; padding: .5rem; pointer-events: none; }
.cc-tile.norec .cc-tile-msg { background: rgba(0,0,0,.6); color: #e5e7eb; }
.cc-tile-pick { position: absolute; right: .25rem; bottom: .25rem; width: auto; max-width: 70%; font-size: .7rem; padding: 0 1.4rem 0 .3rem; opacity: 0; transition: opacity .15s; }
.cc-tile:hover .cc-tile-pick, .cc-tile.empty .cc-tile-pick, .cc-tile-pick:focus { opacity: .95; }
.cc-mosaic-dots { display: flex; justify-content: center; gap: .35rem; margin: .4rem 0; }
.cc-mosaic-dots span { width: .5rem; height: .5rem; border-radius: 50%; background: #4b5563; }
.cc-mosaic-dots span.on { background: #e5e7eb; }
.cc-mosaic-cams { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.cc-chip { background: #1f2937; border: 1px solid #374151; border-radius: 1rem; padding: .1rem .6rem; font-size: .78rem; cursor: grab; user-select: none; }
.cc-mosaic-mobile { display: none; }
.cc-mosaic-full { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; }
.cc-mosaic-full video { flex: 1; width: 100%; min-height: 0; object-fit: contain; }
.cc-mosaic-full-bar { display: flex; align-items: center; gap: .5rem; padding: .5rem; padding-bottom: max(.5rem, env(safe-area-inset-bottom)); color: #fff; }
@media (max-width: 767px) {
  .cc-mosaic-mobile { display: inline-flex; gap: .25rem; }
  .cc-mosaic-cams { display: none; }
  .cc-tile-pick { opacity: .9; }
}
