/* Trap-decor visualizer — Stairz huisstijl (Montserrat, caramel #CD7F3B, pill-knoppen). */
:root {
  --bg: #ffffff;
  --bg-soft: #faf8f6;
  --card: #ffffff;
  --ink: #262625;          /* koppen / sterk */
  --text: #404040;         /* body */
  --muted: #8a807a;
  --line: #e5e1e0;         /* Stairz licht warmgrijs */
  --accent: #cd7f3b;       /* Stairz caramel/oker */
  --accent-dk: #b96f2f;
  --accent-ink: #ffffff;
  --taupe: #ac9a8e;        /* Stairz secundair */
  --radius: 18px;
  --pill: 999px;
  --shadow: 0 10px 34px rgba(64,48,32,.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.tv { max-width: 600px; margin: 0 auto; padding: 16px 18px calc(44px + env(safe-area-inset-bottom)); }

/* Header + voortgang */
.tv-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 20px; }
.tv-brand { font-weight: 600; font-size: 1.2rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink); }
.tv-logo { height: 24px; width: auto; display: block; }
.tv-progress { display: flex; gap: 6px; }
.tv-progress i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s; }
.tv-progress i.on { background: var(--accent); }

/* Typografie — Stairz koppen zijn licht (300) */
.tv-h1 { font-weight: 300; font-size: 2.1rem; line-height: 1.12; margin: 8px 0 12px; color: var(--ink); letter-spacing: -.5px; }
.tv-h1 em { font-style: normal; font-weight: 500; color: var(--accent); }
.tv-intro { color: var(--muted); font-size: 1rem; line-height: 1.55; margin: 0 0 24px; }
.tv-q { font-weight: 300; font-size: 1.5rem; margin: 0 0 16px; color: var(--ink); letter-spacing: -.3px; }
.tv-sub { font-size: .95rem; font-weight: 600; margin: 20px 0 9px; color: var(--ink); }

/* Stappen */
.tv-step { animation: tv-in .35s ease both; }
.tv-step[hidden] { display: none; }
@keyframes tv-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Knoppen — pill, Stairz-stijl */
.tv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 24px; font: inherit; font-weight: 600; font-size: 1rem;
  border: 1.5px solid var(--ink); border-radius: var(--pill); background: var(--ink); color: #fff; cursor: pointer;
  text-decoration: none; transition: transform .08s, background .2s, opacity .2s; -webkit-tap-highlight-color: transparent;
}
.tv-btn:active { transform: scale(.98); }
.tv-btn:disabled { opacity: .35; cursor: not-allowed; }
.tv-btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.tv-btn-block { width: 100%; margin-top: 24px; }
.tv-btn-cta { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.tv-btn-cta:active { background: var(--accent-dk); }
.tv-link { display: inline-block; margin-top: 20px; background: none; border: none; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; padding: 6px 0; }

/* Trap-type kaarten */
.tv-types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tv-type {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 24px 14px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--card); cursor: pointer; text-align: center; transition: border-color .15s, transform .08s, box-shadow .15s;
}
.tv-type:active { transform: scale(.98); }
.tv-type.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(205,127,59,.14); }
.tv-type-ico { font-size: 1.8rem; line-height: 1; letter-spacing: -3px; color: var(--accent); }
.tv-type-naam { font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.tv-type-uitleg { font-size: .8rem; color: var(--muted); line-height: 1.4; }

/* Upload / camera */
.tv-up-choices { display: flex; flex-direction: column; gap: 10px; }
.tv-preview { border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.tv-preview[hidden] { display: none; }
.tv-preview img { width: 100%; display: block; }
.tv-hint { margin-top: 12px; font-size: .92rem; min-height: 1.2em; }
.tv-hint.err { color: var(--accent-dk); }
.tv-hint.ok { color: #2f7d4f; }

.tv-cam[hidden] { display: none; }
.tv-cam-stage { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.tv-cam-stage video { width: 100%; display: block; }
.tv-frame { position: absolute; inset: 8% 6%; border: 2px solid rgba(255,255,255,.9); border-radius: 10px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.22); pointer-events: none; }
.tv-level { position: absolute; left: 50%; bottom: 14px; width: 130px; height: 4px; margin-left: -65px; background: rgba(255,255,255,.4); border-radius: 2px; pointer-events: none; }
.tv-level i { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #f1c40f; transition: transform .08s linear; }
.tv-level.ok i { background: #2ecc71; }
.tv-cam-hint { font-size: .85rem; color: var(--muted); margin: 12px 0; text-align: center; }
.tv-cam-row { display: flex; gap: 10px; }
.tv-cam-row .tv-btn { flex: 1; }

/* Decors */
.tv-decors { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
.tv-decor { border: 2px solid transparent; border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--card); box-shadow: 0 2px 8px rgba(64,48,32,.06); transition: transform .08s; }
.tv-decor:active { transform: scale(.97); }
.tv-decor.sel { border-color: var(--accent); }
.tv-decor img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.tv-decor span { display: block; font-size: .76rem; padding: 6px 6px; text-align: center; color: var(--muted); }

/* Chips — pill */
.tv-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tv-chip { padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--card); cursor: pointer; font: inherit; font-size: .9rem; color: var(--text); transition: all .12s; -webkit-tap-highlight-color: transparent; }
.tv-chip:active { transform: scale(.96); }
.tv-chip.sel { border-color: var(--accent); background: var(--accent); color: #fff; }
#tv-stootbord-blok[hidden] { display: none; }

/* Formulier */
.tv-form { display: flex; flex-direction: column; gap: 12px; }
.tv-form input { padding: 14px 16px; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.tv-form input::placeholder { color: #b3aaa3; }
.tv-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(205,127,59,.14); }
.tv-row { display: flex; gap: 12px; }
.tv-row > * { flex: 1; min-width: 0; }
.tv-field { display: flex; flex-direction: column; gap: 6px; }
.tv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tv-form-note { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.tv-extra { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.tv-extra-kop { font-weight: 600; font-size: .95rem; margin: 0; color: var(--ink); }
.tv-extra-kop span { color: var(--muted); font-weight: 400; }
.tv-lbl { font-size: .85rem; color: var(--muted); }

/* Resultaat — voor/na slider */
.tv-ba { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); user-select: none; touch-action: pan-y; background: #000; }
.tv-ba-img { display: block; width: 100%; }
.tv-ba-after { position: relative; z-index: 1; }
.tv-ba-before { position: absolute; inset: 0; z-index: 2; width: 55%; overflow: hidden; }
.tv-ba-before img { width: 100vw; max-width: 600px; height: 100%; object-fit: cover; }
.tv-ba-tag { position: absolute; top: 10px; z-index: 3; font-size: .72rem; font-weight: 600; padding: 4px 11px; border-radius: var(--pill); background: rgba(38,38,37,.6); color: #fff; }
.tv-ba-tag-voor { left: 10px; }
.tv-ba-tag-na { right: 10px; }
.tv-ba-handle { position: absolute; top: 50%; left: 55%; z-index: 4; transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1rem; box-shadow: 0 2px 12px rgba(0,0,0,.35); pointer-events: none; }
.tv-ba-hint { text-align: center; font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.tv-done { text-align: center; margin-top: 22px; animation: tv-in .35s ease both; }
.tv-done[hidden] { display: none; }
.tv-done-kop { font-size: 1.2rem; font-weight: 600; color: #2f7d4f; margin: 0 0 4px; }
.tv-done-sub { color: var(--muted); margin: 0 0 10px; }

/* Afsluit-acties (staaltjes + delen + win) */
.tv-next { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.tv-next .tv-btn-block { margin-top: 0; }
.tv-share-menu { margin-top: 14px; animation: tv-in .25s ease both; }
.tv-share-menu[hidden] { display: none; }
.tv-share-menu-kop { font-size: .85rem; color: var(--muted); margin: 0 0 8px; }
.tv-share-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tv-share-opt { padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--card); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .08s; }
.tv-share-opt:active { transform: scale(.97); }
.tv-fineprint { margin: 16px 0 0; }
.tv-link-inline { display: inline-block; background: none; border: none; color: var(--muted); font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer; padding: 0; }

/* Deel-popup */
.tv-pop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(38,38,37,.55); animation: tv-in .2s ease both; }
.tv-pop[hidden] { display: none; }
.tv-pop-card { background: #fff; border-radius: 20px; padding: 26px 22px 18px; max-width: 360px; width: 100%; text-align: center; box-shadow: 0 24px 64px rgba(0,0,0,.32); position: relative; animation: tv-pop-in .3s cubic-bezier(.2,.9,.3,1.25) both; }
@keyframes tv-pop-in { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tv-pop-x { position: absolute; top: 8px; right: 12px; background: none; border: none; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.tv-pop-emoji { font-size: 2.4rem; margin: 0 0 4px; }
.tv-pop-kop { font-size: 1.45rem; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.tv-pop-txt { color: var(--text); margin: 0 0 18px; line-height: 1.45; }
.tv-pop-card .tv-btn-block { margin-top: 0; }
.tv-pop-card .tv-link { display: block; margin-top: 10px; }
.tv-pop-card .tv-link-inline { margin-top: 6px; }
.tv-ba-handle::before, .tv-ba-handle::after { content: ''; position: absolute; left: 50%; margin-left: -1px; width: 2px; height: 100vmax; background: #fff; }
.tv-ba-handle::before { bottom: 40px; }
.tv-ba-handle::after { top: 40px; }

/* Overlay */
.tv-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.95); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; z-index: 50; padding: 24px; text-align: center; }
.tv-overlay[hidden] { display: none; }
.tv-overlay p { color: var(--muted); margin: 0; }
.tv-spinner { width: 44px; height: 44px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: tv-spin 1s linear infinite; }
@keyframes tv-spin { to { transform: rotate(360deg); } }

/* Adviseur-modus (?adviseur=1): klant-koppel UI + marketing-copy verbergen */
html.tv-adviseur [data-step="type"] .tv-intro { display: none; }
.tv-koppel-zoek { margin-top: 12px; }
.tv-koppel-zoek input { width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; box-sizing: border-box; }
.tv-koppel-res { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.tv-koppel-res small { color: var(--muted); }
.tv-koppel-item { text-align: left; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font: inherit; cursor: pointer; }
.tv-koppel-item:hover { border-color: var(--accent); }
.tv-koppel-item small { color: var(--muted); display: block; }

@media (min-width: 480px) {
  .tv-h1 { font-size: 2.5rem; }
}
