/* Dashboard-layouts (gedeeld tussen player en dashboard-editor). Alle maten in cqh/cqw zodat het op elke schermgrootte klopt. */
@font-face { font-family: "SG Jost"; src: url("/shared/fonts/jost.woff2") format("woff2"); font-weight: 100 900; font-display: block; }
@font-face { font-family: "SG Oswald"; src: url("/shared/fonts/oswald.woff2") format("woff2"); font-weight: 200 700; font-display: block; }

.lay {
  position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column;
  background: var(--l-bg); color: var(--l-text);
  --gap: 2.2cqh; --pad: 3.4cqh; --radius: 0.5cqh;
  font-family: "SG Jost", "Futura", "Century Gothic", sans-serif;
  padding: var(--pad) calc(var(--pad) * 1.15);
  gap: var(--gap);
}
.lay.head-oswald .lay-title, .lay.head-oswald .lay-label, .lay.head-oswald .lay-hclock b,
.lay.head-oswald .clk b, .lay.head-oswald .wx-now b, .lay.head-oswald .cd b, .lay.head-oswald .lay-ticker .lab {
  font-family: "SG Oswald", "Oswald", "Bebas Neue", "Arial Narrow", sans-serif; text-transform: uppercase;
}
.lay.head-jost .lay-title, .lay.head-jost .lay-label { font-family: "SG Jost", sans-serif; }

/* diagonale vlakken zoals op carre1749.com */
.lay-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.lay-decor i { position: absolute; background: var(--l-accent); }
.lay-decor .d1 { left: 0; bottom: 0; width: 38cqw; height: 46cqh; clip-path: polygon(0 18%, 100% 100%, 0 100%); opacity: .22; }
.lay-decor .d2 { right: 0; top: 0; width: 30cqw; height: 40cqh; clip-path: polygon(0 0, 100% 0, 100% 70%); opacity: .14; }
.lay > *:not(.lay-decor) { position: relative; z-index: 1; }

/* header */
.lay-head { display: flex; align-items: center; justify-content: space-between; flex: none; padding-bottom: 1.6cqh; border-bottom: 0.18cqh solid color-mix(in srgb, var(--l-accent) 55%, transparent); }
.lay-brand { display: flex; align-items: center; gap: 2cqh; }
.lay-brand img { height: 7.5cqh; width: auto; object-fit: contain; }
.lay-title { font-size: 5.6cqh; line-height: 1; font-weight: 500; letter-spacing: .04em; color: var(--l-accent); }
.lay-sub { font-size: 2.3cqh; letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin-top: .6cqh; }
.lay-hclock { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.lay-hclock b { font-size: 5.2cqh; line-height: 1; font-weight: 500; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.lay-hclock span { display: block; font-size: 2cqh; opacity: .8; margin-top: .5cqh; }
.lay-hclock span::first-letter, .clk span::first-letter, .wx-days span::first-letter { text-transform: uppercase; }

/* body-templates */
.lay-body { flex: 1; min-height: 0; display: flex; gap: var(--gap); }
.tpl-side .lay-main { flex: 1 1 auto; }
.tpl-side .lay-tiles { flex: 0 0 29cqw; display: flex; flex-direction: column; gap: var(--gap); }
.tpl-bottom .lay-body { flex-direction: column; }
.tpl-bottom .lay-main { flex: 1 1 auto; }
.tpl-bottom .lay-tiles { flex: 0 0 27cqh; display: flex; gap: var(--gap); }
.tpl-bottom .lay-tile { flex-basis: 0; }
.tpl-tiles > .lay-body { display: block; }
.tpl-tiles > .lay-body > .lay-tiles { height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: var(--gap); }
.tpl-tiles .lay-tile { grid-row: span var(--span, 1); }
.tpl-full { padding: 0; }
.tpl-full .lay-main { position: absolute; inset: 0; border-radius: 0; }
.tpl-full .lay-body { position: absolute; inset: 0; pointer-events: none; }
.tpl-full .lay-tiles { position: absolute; right: 3cqh; top: 3cqh; bottom: 3cqh; width: 27cqw; display: flex; flex-direction: column; justify-content: flex-end; gap: 2cqh; }
.tpl-full .lay-tile { flex-grow: 0 !important; background: color-mix(in srgb, var(--l-surface) 88%, transparent); backdrop-filter: blur(8px); }
.tpl-full.has-ticker .lay-tiles { bottom: 10cqh; }
.tpl-full .lay-ticker { position: absolute; left: 0; right: 0; bottom: 0; }

/* hoofdzone */
.lay-main { position: relative; overflow: hidden; border-radius: var(--radius); background: #000; min-width: 0; box-shadow: 0 1.2cqh 3cqh rgba(0, 0, 0, .28); }
.lay-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.lay-slide.on { opacity: 1; }
.lay-slide > img, .lay-slide > video { width: 100%; height: 100%; object-fit: var(--fit, cover); display: block; }
.lay-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: color-mix(in srgb, var(--l-bg) 80%, #000); }
.lay-placeholder .lay-title { font-size: 9cqh; }
.lay-vph { width: 100%; height: 100%; background: repeating-linear-gradient(135deg, #1d2a38 0 2cqh, #22303f 2cqh 4cqh); }

/* beeld-in-beeld */
.lay-pip { position: absolute; width: var(--pip, 32%); aspect-ratio: 16 / 9; z-index: 4; background: #000; overflow: hidden;
  border: 0.45cqh solid var(--l-accent); border-radius: var(--radius); box-shadow: 0 1cqh 3cqh rgba(0, 0, 0, .45); }
.lay-pip > img, .lay-pip > video, .lay-pip > .lay-vph { width: 100%; height: 100%; object-fit: cover; display: block; }
.lay-pip.pos-br { right: 2.5cqh; bottom: 2.5cqh; }
.lay-pip.pos-bl { left: 2.5cqh; bottom: 2.5cqh; }
.lay-pip.pos-tr { right: 2.5cqh; top: 2.5cqh; }
.lay-pip.pos-tl { left: 2.5cqh; top: 2.5cqh; }
.lay-pip-label { position: absolute; left: 1cqh; top: 1cqh; background: var(--l-accent); color: var(--l-bg); font-size: 1.6cqh; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: .3cqh 1cqh; }

/* tegels */
.lay-tile { position: relative; min-height: 0; min-width: 0; flex: 1 1 0; overflow: hidden; display: flex; flex-direction: column;
  background: var(--l-surface); color: var(--l-stext); border-radius: var(--radius); padding: 1.9cqh 2.4cqh;
  border-top: 0.5cqh solid var(--l-accent); box-shadow: 0 .8cqh 2.4cqh rgba(0, 0, 0, .16); }
.lay-label { font-size: 1.9cqh; letter-spacing: .16em; font-weight: 500; color: color-mix(in srgb, var(--l-accent) 70%, var(--l-stext)); margin-bottom: 0.9cqh; flex: none; }
.lay-tile.media { padding: 0; border-top: 0; }
.lay-tile.media > img, .lay-tile.media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lay-tile.media .lay-label { position: absolute; left: 0; bottom: 0; margin: 0; padding: .8cqh 1.6cqh; background: var(--l-accent); color: var(--l-bg); z-index: 1; }

.clk { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.clk b { font-size: calc(9cqh * var(--ts, 1)); line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }
.clk span { display: block; font-size: calc(2.4cqh * var(--ts, 1)); opacity: .8; }

.txt { flex: 1 1 auto; min-height: 0; font-size: calc(2.3cqh * var(--ts, 1) * var(--fit, 1)); line-height: 1.35; overflow: hidden; }
.txt ul { margin: .4cqh 0; padding-left: 2.4cqh; }
.txt strong { color: color-mix(in srgb, var(--l-accent) 55%, var(--l-stext)); }

.cd { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cd b { font-size: calc(7.5cqh * var(--ts, 1)); line-height: 1; font-weight: 500; }
.cd span { font-size: calc(2.3cqh * var(--ts, 1)); opacity: .8; margin-top: .8cqh; }

.wx { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 1cqh; min-height: 0; }
.wx-desc { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-now { display: flex; align-items: center; gap: 2cqh; }
.wx-now i { width: calc(7.5cqh * var(--ts, 1)); height: calc(7.5cqh * var(--ts, 1)); color: color-mix(in srgb, var(--l-accent) 70%, var(--l-stext)); flex: none; }
.wx-now i svg { width: 100%; height: 100%; }
.wx-now b { display: block; font-size: calc(6.8cqh * var(--ts, 1)); line-height: 1; font-weight: 500; }
.wx-desc { font-size: calc(2.1cqh * var(--ts, 1)); opacity: .8; }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1cqh; border-top: .15cqh solid color-mix(in srgb, var(--l-stext) 15%, transparent); padding-top: 1.2cqh; }
.wx-days > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1cqh; align-items: center; font-size: calc(2cqh * var(--ts, 1)); }
.wx-days span { display: block; grid-column: 1 / 3; opacity: .7; font-size: calc(1.8cqh * var(--ts, 1)); }
.wx-days svg { width: calc(3.6cqh * var(--ts, 1)); height: calc(3.6cqh * var(--ts, 1)); grid-row: 2; }
.wx-days b { font-weight: 600; grid-row: 2; }
.wx-days em { display: none; }

.nw { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; }
.nw-item { flex: 1 1 auto; min-height: 0; opacity: 0; transform: translateY(1cqh); transition: opacity .35s, transform .35s; overflow: hidden; }
.nw-item.on { opacity: 1; transform: none; }
.nw-item b { display: block; font-size: calc(3cqh * var(--ts, 1) * var(--fit, 1)); line-height: 1.25; font-weight: 600; }
.nw-item p { font-size: calc(2.2cqh * var(--ts, 1) * var(--fit, 1)); line-height: 1.4; margin: 1.2cqh 0 0; opacity: .8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.nw-dots { display: flex; gap: .8cqh; margin-top: 1cqh; }
.nw-dots i { width: 1cqh; height: 1cqh; border-radius: 50%; background: color-mix(in srgb, var(--l-stext) 22%, transparent); }
.nw-dots i.on { background: var(--l-accent); }

/* lichtkrant */
.lay-ticker { flex: none; display: flex; align-items: stretch; height: 6.2cqh; background: var(--l-surface); color: var(--l-stext); border-radius: var(--radius); overflow: hidden; }
.lay-ticker .lab { flex: none; display: flex; align-items: center; padding: 0 2.4cqh; background: var(--l-accent); color: var(--l-bg); font-size: 2.4cqh; letter-spacing: .14em; font-weight: 500; }
.lay-ticker .win { flex: 1; overflow: hidden; display: flex; align-items: center; }
.lay-ticker .track { white-space: nowrap; font-size: 2.7cqh; padding-left: 100%; animation: lay-ticker 40s linear infinite; }
@keyframes lay-ticker { to { transform: translateX(-100%); } }
