/* ---------------------------------------------------------------
   Fototransfer - stijl
   Kleuren overgenomen van arjanvanbruggen.nl: donker antraciet met
   helderblauw accent. Alles zit in de variabelen hieronder; de
   accentkleur wordt door de server ingevuld vanuit config.json.
   --------------------------------------------------------------- */

:root {
  --accent: #1190f1;
  --accent-hover: #38a5f5;
  --bg: #191e24;
  --surface: #232a32;
  --surface-2: #2b333c;
  --ink: #ffffff;
  --ink-soft: #d7dee5;
  --muted: #8d99a5;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ok: #3fbf7f;
  --warn: #ff7a59;
  --radius: 4px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 18px 40px -20px rgba(0, 0, 0, 0.65);
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
.link { color: var(--accent); text-decoration: none; }
.link:hover { color: var(--accent-hover); text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------------------------------------------------------- kop ---- */
.topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 46px; width: auto; display: block; }
.brand-name {
  font: 700 19px/1.15 var(--sans);
  letter-spacing: 0.01em;
  color: var(--ink);
}
.brand-tag {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 3px;
}

/* ------------------------------------------------------- layout ---- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 44px 28px 80px; }
.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.narrow { max-width: 420px; width: 100%; padding: 40px; text-align: center; }
.card.pad { padding: 28px; }

.title {
  font: 600 30px/1.25 var(--sans);
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}
.subtitle { color: var(--muted); margin: 0 0 32px; }
h2.section { font: 600 20px/1.3 var(--sans); color: var(--ink); margin: 0 0 4px; }
.section-hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.columns { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 880px) { .columns { grid-template-columns: 1fr; } }

/* ------------------------------------------------------ dropzone ---- */
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 60px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--surface-2); }
.dropzone.over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.dropzone-icon { color: var(--accent); margin-bottom: 14px; }
.dropzone-title { font: 600 20px/1.3 var(--sans); color: var(--ink); margin-bottom: 6px; }
.dropzone-sub { color: var(--muted); font-size: 13.5px; }

/* ----------------------------------------------------- bestanden ---- */
.filelist { margin-top: 20px; }
.filelist-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
}
.filelist-title { font-weight: 600; color: var(--ink); font-size: 14px; }
.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.file-thumb {
  width: 34px; height: 34px; flex: none;
  border-radius: 3px;
  background: var(--surface-2) center/cover no-repeat;
  border: 1px solid var(--line);
}
.file-name {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink-soft);
}
.file-size { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.file-remove {
  border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1;
  padding: 4px 6px; border-radius: 3px;
}
.file-remove:hover { color: var(--warn); background: var(--surface-2); }

/* --------------------------------------------------------- form ---- */
label.field { display: block; margin-bottom: 18px; }
.label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 600;
}
input[type='text'], input[type='email'], input[type='password'], textarea, select {
  width: 100%;
  font: 15px/1.5 var(--sans);
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: #6f7a86; }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
textarea { resize: vertical; min-height: 96px; }
select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select option { background: var(--surface-2); color: var(--ink); }

.chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 8px;
  background: var(--surface-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.chips.focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
  padding: 4px 6px 4px 11px;
  font-size: 13.5px;
  color: var(--ink);
}
.chip.bad { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.chip button { border: 0; background: none; cursor: pointer; color: inherit; opacity: .6; font-size: 15px; line-height: 1; padding: 0 2px; }
.chip button:hover { opacity: 1; }
.chips input {
  border: 0; padding: 5px 4px; flex: 1; min-width: 150px;
  font: 14.5px/1.5 var(--sans); outline: none; background: transparent; color: var(--ink);
}
.chips input:focus { box-shadow: none; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin-bottom: 20px; }
.check input { margin: 2px 0 0; accent-color: var(--accent); width: 16px; height: 16px; }
.check span { font-size: 14px; color: var(--ink-soft); }

/* -------------------------------------------------------- knoppen ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--sans);
  padding: 14px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { font-size: 13px; padding: 8px 13px; }
.btn-link { background: none; border: 0; color: var(--accent); cursor: pointer; font: 13px var(--sans); padding: 4px; }
.btn-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* -------------------------------------------------------- meldingen -- */
.note { border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; }
.note-warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: #ffb69f; border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.note-ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: #8fe0b6; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.note strong { color: #fff; }

/* -------------------------------------------------------- overzicht -- */
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: 0 12px 10px 0; border-bottom: 1px solid var(--line);
}
table.list td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
table.list tr:last-child td { border-bottom: 0; }
.pill {
  display: inline-block; white-space: nowrap; font-size: 11.5px; padding: 3px 9px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted);
}
.pill.live { color: #8fe0b6; border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.pill.dead { color: #ffb69f; border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }

/* --------------------------------------------------------- modal ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(10, 13, 16, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 460px; width: 100%; padding: 36px; text-align: center;
}
.progress { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin: 22px 0 10px; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.25s; }
.copyrow { display: flex; gap: 8px; margin-top: 18px; }
.copyrow input { font-size: 13px; color: var(--ink-soft); }

/* ------------------------------------------------- downloadpagina ---- */

/* logobalk bovenaan */
.dl-top {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 22px 24px;
  text-align: center;
}
.dl-logo {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
  border-radius: var(--radius);
  transition: opacity 0.15s;
}
.dl-logo:hover { opacity: 0.75; }
.dl-logo img { height: 58px; width: auto; display: block; }
.dl-logo-tekst { display: block; line-height: normal; }
.dl-logo-tekst .brand-name { display: block; font-size: 20px; }

/* videoband - de speler vult zichzelf aan met zwart, net als de band */
.dl-video {
  position: relative;
  width: 100%;
  background: #000;
  /* Op een breed scherm een band; op een telefoon gewoon 16:9. */
  height: min(56.25vw, 460px);
  overflow: hidden;
}
.dl-video iframe {
  /* Het hele beeld blijft zichtbaar. Is de band breder dan 16:9, dan vult de
     speler de rest met zwart - en omdat de band ook zwart is, loopt dat
     naadloos door. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none; /* niets om aan te klikken, het is sfeerbeeld */
}

/* inhoud */
.dl-body {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  text-align: center;
}
.dl-title {
  font: 600 30px/1.25 var(--sans);
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.dl-filemeta { color: var(--muted); font-size: 14px; margin: 0 0 34px; }
.dl-lead {
  font: 600 22px/1.35 var(--sans);
  color: var(--ink);
  margin: 0 0 28px;
}
.dl-message {
  white-space: pre-wrap;
  text-align: left;
  font: 16px/1.7 var(--sans);
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 28px;
  overflow-wrap: anywhere;
}

/* de downloadknop: het middelpunt van de pagina */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 20px 26px;
  font: 600 17px/1.2 var(--sans);
  color: #fff;
  text-decoration: none;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, #fff);
  border-radius: var(--radius);
  box-shadow: 0 6px 22px -8px color-mix(in srgb, var(--accent) 85%, transparent);
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.btn-download:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--accent) 95%, transparent);
}
.btn-download:active { transform: translateY(0); }
.btn-download svg { flex: none; }
@media (max-width: 480px) {
  .btn-download { font-size: 15.5px; padding: 18px 18px; gap: 9px; }
  .dl-lead { font-size: 19px; }
  .dl-title { font-size: 25px; }
}

.dl-expiry { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }

.dl-files { margin-top: 44px; text-align: left; }
.dl-file {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  margin-top: -1px; /* randen vallen samen, ook als de lijst is ingekort */
  background: var(--surface);
  text-decoration: none;
  color: var(--ink-soft);
  transition: background 0.12s;
}
.dl-file:first-of-type { border-radius: var(--radius) var(--radius) 0 0; margin-top: 0; }
.dl-file:last-of-type { border-radius: 0 0 var(--radius) var(--radius); }
.dl-file:hover { background: var(--surface-2); color: var(--ink); }
.dl-file .arrow { color: var(--accent); opacity: 0; transition: opacity 0.15s; }
.dl-file:hover .arrow { opacity: 1; }

/* voet met keurmerken, adres en privacyverklaring */
.dl-footer {
  border-top: 1px solid var(--line);
  padding: 44px 24px 40px;
  text-align: center;
}
.keurmerken {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px 48px;
  margin-bottom: 34px;
}
.keurmerk { width: auto; opacity: 0.92; }
.keurmerk-1 { height: 58px; }
.keurmerk-2 { height: 40px; }
@media (max-width: 560px) {
  .keurmerken { gap: 24px; }
  .keurmerk-1 { height: 44px; }
  .keurmerk-2 { height: 30px; }
}
.footer-tekst {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
  margin: 0;
}
.voet-deel { white-space: nowrap; }
.footer-privacy { margin: 10px 0 0; font-size: 12.5px; }

/* de oude opmaak van de knop blijft in gebruik op andere plekken */
.dl-cta { display: block; width: 100%; font-size: 16px; padding: 18px 24px; }
.dl-meta { text-align: center; color: var(--muted); font-size: 13px; margin-top: 14px; }
.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 32px 24px 48px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ galerij ---- */
/* De galerij mag breder zijn dan de tekstkolom eromheen. */
.gallery-wrap {
  margin-top: 48px;
  width: min(1080px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}
@media (max-width: 700px) {
  .gallery-wrap { width: 100%; margin-left: 0; transform: none; }
}
.gallery {
  display: grid;
  /* auto-fit + justify-content: center zorgt dat een halve rij - of één
     enkele foto - netjes in het midden staat in plaats van links. */
  grid-template-columns: repeat(auto-fit, minmax(112px, 132px));
  justify-content: center;
  gap: 8px;
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(auto-fit, minmax(92px, 110px)); gap: 6px; }
}
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.25s;
}
.tile img[src] { opacity: 1; }
.tile-leeg img { display: none; }

/* ----------------------------------------------------------- lichtbak ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: #0d1116;
  display: flex; flex-direction: column;
}
.lb-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  flex: none;
}
.lb-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-name {
  flex: 1; min-width: 0;
  color: var(--ink-soft); font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: transparent; color: var(--ink-soft);
  cursor: pointer; text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.lb-btn:hover { border-color: var(--accent); color: var(--accent); }

.lb-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative;
}
.lb-stage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}
.lb-stage img.geladen { opacity: 1; }

.lb-spinner {
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: draai 0.7s linear infinite;
}
@keyframes draai { to { transform: rotate(360deg); } }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(25, 30, 36, 0.75);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.lb-nav:hover { border-color: var(--accent); color: var(--accent); background: var(--bg); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
@media (max-width: 560px) {
  .lb-nav { width: 40px; height: 40px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-stage { padding: 10px; }
}

/* ---------------------------------------------------------- opslagbalk ---- */
.storage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 28px;
}
.storage-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 10px;
}
.storage-title {
  font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.storage-numbers { font-size: 13.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.storage-bar {
  display: flex;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.storage-bar > i {
  display: block; height: 100%; width: 0;
  transition: width 0.3s;
}
#storageUsed { background: var(--accent); }
#storageBatch { background: color-mix(in srgb, var(--accent) 45%, var(--ink)); opacity: 0.75; }
.storage.vol #storageUsed { background: var(--warn); }
.storage-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-top: 9px;
  font-size: 12.5px; color: var(--muted);
}
.storage.vol .storage-foot { color: var(--warn); }
#storageBatchNote { text-align: right; }
