/* ui/ui.css: gedeelde UI-kit voor de template-editor en het eventbeheer (R0, 2026-10-11).
   Huisstijl van het dashboard: Poppins, --grad als accent, witte vlakken, radius 9 tot 14, randen in
   var(--line). Variabelen komen uit styles.css, laad die dus eerst. Voorvoegsels: ui-tf (tekstveld),
   ui-bk (bestandsknop), ui-modal (bevestig), ui-menu, ui-zt (tabs), ui-sec (sectie), ed-f (de
   veldcomponenten uit velden.js). */

/* ---------------- Tekstveld ---------------- */
.ui-tf { margin-bottom: 14px; }
.ui-tf-kop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; min-height: 18px; }
.ui-tf-label { font-size: 13px; color: var(--muted); }
.ui-tf-stand { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.ui-tf-stand[data-stand="bewaard"] { color: #15803D; }
.ui-tf-stand svg { width: 14px; height: 14px; }
.ui-tf-box { display: flex; align-items: center; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.ui-tf-box:hover { border-color: #d4d4da; }
.ui-tf-box:focus-within { border-color: #EB2027; box-shadow: 0 0 0 3px rgba(235,32,39,.12); }
.ui-tf-box-fout, .ui-tf-box-fout:hover { border-color: #c81e1e; }
.ui-tf-input { flex: 1; min-width: 0; width: 100%; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; color: var(--ink); padding: 0; }
.ui-tf-input::placeholder { color: var(--muted); }
.ui-tf-hulp { margin: 5px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.ui-tf-fout { margin: 5px 0 0; font-size: 12px; line-height: 1.4; color: #c81e1e; }
.ui-tf-hulp[hidden], .ui-tf-fout[hidden] { display: none; }

/* ---------------- Bestandsknop ---------------- */
.ui-bk { display: inline-flex; }

/* ---------------- Bevestig-modal ---------------- */
.ui-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.55); }
.ui-modal-kaart { width: 100%; max-width: 420px; max-height: 88vh; overflow: auto; padding: 22px; border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.ui-modal-titel { font-size: 18px; font-weight: 700; line-height: 1.3; margin: 0 0 8px; }
.ui-modal-tekst { font-size: 14px; line-height: 1.5; color: #3a3a40; margin: 0 0 18px; }
.ui-modal-acties { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.btn.ui-gevaar { background: #e02424; }
.ui-modal .btn:focus-visible, .ui-menu-item:focus-visible, .ui-menu-knop:focus-visible, .ui-zt-tab:focus-visible, .ui-sec-knop:focus-visible { outline: 2px solid #EB2027; outline-offset: 2px; }

/* ---------------- Meer-menu ---------------- */
.ui-menu { position: relative; display: inline-block; }
.ui-menu[hidden] { display: none; }
.ui-menu-knop { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; }
.ui-menu-knop:hover, .ui-menu-knop[aria-expanded="true"] { border-color: #d4d4da; background: var(--bg); }
.ui-menu-lijst { position: absolute; right: 0; top: calc(100% + 4px); z-index: 70; min-width: 200px; max-width: min(320px, calc(100vw - 32px)); padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.ui-menu-lijst[hidden] { display: none; }
.ui-menu-links .ui-menu-lijst { right: auto; left: 0; }
.ui-menu-boven .ui-menu-lijst { top: auto; bottom: calc(100% + 4px); }
.ui-menu-item { display: block; width: 100%; padding: 9px 12px; border: none; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.ui-menu-item:hover, .ui-menu-actief { background: var(--bg); }
.ui-menu-gevaar { color: #c81e1e; }

/* ---------------- Tabs ---------------- */
/* Onder 760 px een chiprij die horizontaal scrolt en bovenaan blijft plakken, vanaf 760 px een
   verticale lijst van 180 px. */
.ui-zt { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; position: sticky; top: 0; z-index: 5; padding: 8px 0; background: var(--bg); }
.ui-zt::-webkit-scrollbar { display: none; }
.ui-zt-tab { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.ui-zt-tab:hover { border-color: #d4d4da; color: var(--ink); }
.ui-zt-tab.ui-zt-actief { border-color: transparent; background: var(--grad); color: #fff; }
@media (min-width: 760px) {
  .ui-zt { flex-direction: column; gap: 4px; width: 180px; overflow: visible; position: static; padding: 0; background: transparent; }
  .ui-zt-tab { padding: 10px 14px; border: none; border-radius: 10px; background: transparent; text-align: left; white-space: normal; }
  .ui-zt-tab:hover { background: #fff; }
  .ui-zt-tab.ui-zt-actief { background: var(--grad); }
}

/* ---------------- Sectie ---------------- */
.ui-sec { border-top: 1px solid var(--line); }
.ui-sec:first-child { border-top: none; }
.ui-sec-kop { display: flex; align-items: center; gap: 8px; }
.ui-sec-knop { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 12px 0; border: none; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.ui-sec-pijl { display: inline-grid; flex: 0 0 auto; color: var(--muted); transition: transform .15s ease; }
.ui-sec-open > .ui-sec-kop .ui-sec-pijl { transform: rotate(90deg); }
.ui-sec-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-sec-acties { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.ui-sec-body { padding: 0 0 14px; }
.ui-sec-body[hidden] { display: none; }

/* ---------------- Veldcomponenten (ui/velden.js) ----------------
   Verhuisd uit styles.css (kopje "Editor-velden (B1)") toen velden.js naar ui/ ging, zodat het
   dashboard dezelfde componenten kan gebruiken. Klassenamen ongewijzigd. */

/* Eigen veldcomponenten, zie public/ed/velden.js. Zachte stijl van het dashboard: witte vlakken,
   var(--line)-randen, radius 8 tot 10px, var(--grad) enkel voor een actieve staat. */
.ed-f { font: inherit; color: var(--ink); }
.ed-f-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.ed-f-box { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 4px 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.ed-f-box:hover { border-color: #d4d4da; }
.ed-f-box:focus-within { border-color: #EB2027; box-shadow: 0 0 0 3px rgba(235,32,39,.12); }
.ed-f-input { flex: 1; min-width: 0; width: 100%; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; color: var(--ink); padding: 0; font-variant-numeric: tabular-nums; }
.ed-f-suffix { font-size: 12px; color: var(--muted); pointer-events: none; }
.ed-f-steps { display: flex; flex-direction: column; flex: 0 0 auto; }
.ed-f-step { display: grid; place-items: center; width: 22px; height: 15px; padding: 0; border: none; background: transparent; color: var(--muted); border-radius: 5px; cursor: pointer; }
.ed-f-step svg { width: 12px; height: 12px; }
.ed-f-step:hover { background: var(--bg); color: var(--ink); }

.ed-f-switch { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; border: none; background: transparent; font-size: 14px; cursor: pointer; text-align: left; }
.ed-f-switch-spoor { position: relative; flex: 0 0 auto; width: 34px; height: 20px; border-radius: 999px; background: #d9d9de; transition: background .15s ease; }
.ed-f-switch-knop { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s ease; }
.ed-f-switch[aria-checked="true"] .ed-f-switch-spoor { background: var(--grad); }
.ed-f-switch[aria-checked="true"] .ed-f-switch-knop { transform: translateX(14px); }
.ed-f-switch:focus-visible .ed-f-switch-spoor { outline: 2px solid #EB2027; outline-offset: 2px; }

.ed-f-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ed-f-seg-knop { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; height: 30px; padding: 0 10px; border: none; border-radius: 7px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.ed-f-seg-knop:hover { background: var(--bg); color: var(--ink); }
.ed-f-seg-knop[aria-checked="true"] { background: var(--grad); color: #fff; }
.ed-f-seg-verborgen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ed-f-seg-knop:focus-visible, .ed-f-icoon:focus-visible, .ed-f-staal:focus-visible, .ed-f-trigger:focus-visible { outline: 2px solid #EB2027; outline-offset: 1px; }

.ed-f-icoon { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; }
.ed-f-icoon:hover { border-color: #d4d4da; background: var(--bg); }
.ed-f-icoon[aria-pressed="true"] { border-color: transparent; background: var(--grad); color: #fff; }

.ed-f-staal-wrap { position: relative; flex: 0 0 auto; display: inline-block; width: 22px; height: 22px; }
.ed-f-staal { width: 22px; height: 22px; padding: 0; border: 1px solid rgba(0,0,0,.15); border-radius: 6px; cursor: pointer; }
/* De echte kleurkiezer ligt onzichtbaar over de staal, zodat het browservenster daar opent. */
.ed-f-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; }

.ed-f-select { position: relative; }
.ed-f-trigger { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.ed-f-trigger:hover { border-color: #d4d4da; }
.ed-f-trigger[aria-expanded="true"] { border-color: #EB2027; box-shadow: 0 0 0 3px rgba(235,32,39,.12); }
.ed-f-trigger-tekst { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-f-trigger-pijl { flex: 0 0 auto; display: grid; color: var(--muted); }
.ed-f-lijst { position: absolute; left: 0; min-width: 100%; width: max-content; max-width: min(340px, calc(100vw - 32px)); box-sizing: border-box; top: calc(100% + 4px); z-index: 60; max-height: 260px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.ed-f-lijst[hidden] { display: none; }
.ed-f-select-boven .ed-f-lijst { top: auto; bottom: calc(100% + 4px); }
.ed-f-optie { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; font-size: 14px; cursor: pointer; }
.ed-f-optie-tekst { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-f-optie-vink { display: grid; visibility: hidden; color: #EB2027; }
.ed-f-optie[aria-selected="true"] { font-weight: 600; }
.ed-f-optie[aria-selected="true"] .ed-f-optie-vink { visibility: visible; }
.ed-f-optie-actief { background: var(--bg); }
