/* Feedbackstudio — bouwt voort op de variabelen en knoppen van style.css (licht en donker thema). */

body.studio { overflow-y: auto; height: auto; min-height: 100%; padding-bottom: calc(24px + var(--safe-b)); }
.studio .hidden { display: none !important; }
/* 16px in invoervelden: bij kleinere letters zoomt een iPhone ongevraagd in */
.studio input[type="text"], .studio textarea { font-size: 16px; }

.st-top {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  max-width: 980px; margin: 0 auto; padding: 14px 16px 4px;
}
.st-top h1 { margin: 0; font-size: clamp(20px, 4vw, 30px); text-align: center; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-backlink { justify-self: start; min-height: 44px; }
.st-backlink::before { content: "‹"; font-size: 26px; line-height: 1; margin-right: 2px; }
select.st-lang { justify-self: end; width: auto; min-width: 0; min-height: 44px; padding: 5px 30px 5px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-ic { display: inline-flex; width: 22px; height: 22px; flex: none; }
.st-ic svg { width: 100%; height: 100%; }

.st-privacy {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 auto 12px;
  padding: 0 16px; max-width: 980px; color: var(--muted); font-size: 13px; text-align: center;
}
.st-privacy .st-ic { width: 16px; height: 16px; color: var(--speak); }

.st-main { max-width: 980px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.st-main > section:not(.hidden) { animation: st-in .2s var(--ease); }
@keyframes st-in { from { opacity: 0; } }
.st-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; box-shadow: var(--shadow-sm);
}

/* start */
.st-start { padding: 0; overflow: hidden; }
.st-dropzone { padding: 40px 20px; text-align: center; border: 1.5px dashed var(--line); border-radius: 14px; margin: 10px; }
.st-dropzone h2 { margin: 0 0 8px; font-size: clamp(24px, 4.5vw, 34px); }
.st-dropzone p { margin: 0 auto; max-width: 34em; }
.st-bigrow { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 26px 0 14px; }
.st-pick { margin: 0; font-size: 16px; font-weight: 600; color: inherit; cursor: pointer; }
.st-pick.primary { color: var(--on-accent); }
.st-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.st-pick:focus-within, .st-file:focus-visible + .st-pick { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-touchrow { display: none; }
.st-rowlabel { margin: 18px 0 -10px !important; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.st-make .st-bigrow { margin-bottom: 0; }
@media (pointer: coarse) {
  .st-touchrow { display: block; }
  .st-dropnote { display: none; }
  .st-choose .btn.primary { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: none; }
  .st-bigrow .st-pick { flex: 1 1 0; min-width: 0; padding-left: 12px; padding-right: 12px; }
}
.st-dropnote { margin-top: 4px !important; }
.st-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger-text); font-size: 14px; }
.st-dropzone .st-error { margin-top: 12px; }
.st-ok { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-size: 14px; }
.st-warn { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--ochre); color: var(--text); font-size: 14px; }

.st-dropveil {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: var(--accent-soft); border: 4px dashed var(--accent);
}

/* editor: alle blokken met dezelfde rustige tussenruimte */
#stEditor { display: grid; gap: 14px; }
.st-side { display: grid; gap: 14px; align-content: start; min-width: 0; }

/* uitleg in drie stappen */
.st-steps { display: flex; align-items: center; gap: 8px; padding: 2px 0 0 4px; color: var(--muted); font-size: 14px; }
.st-steps ol { flex: 1; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; counter-reset: st-step; }
.st-steps li { display: flex; align-items: center; gap: 8px; counter-increment: st-step; }
.st-steps li::before {
  content: counter(st-step); display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700;
}
.st-steps .icon-btn { width: 40px; height: 40px; padding: 10px; }
.st-steps .icon-btn .st-ic { width: 100%; height: 100%; }

/* beeld */
.st-stagewrap { display: grid; gap: 8px; }
.st-stage { position: relative; display: flex; justify-content: center; background: var(--video-bg); border-radius: 16px; padding: 0; overflow: hidden; }
#stCanvas { display: block; touch-action: none; cursor: crosshair; max-width: 100%; }
.st-count {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: rgba(20, 24, 22, .4); color: #fff; font: 500 clamp(72px, 18vw, 140px)/1 var(--serif);
}
.st-textrow { display: flex; gap: 8px; align-items: center; margin: 0; }
.st-textrow input { flex: 1; min-width: 0; }
.st-textrow .btn { min-height: 44px; flex: none; }
.st-media { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

/* opnemen */
.st-recbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); z-index: 20;
  width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap;
  justify-content: center; padding: 10px 14px; border-radius: 18px; box-shadow: var(--shadow-lg);
  background: var(--raised); border: 1.5px solid var(--danger); color: var(--danger-text); font-weight: 600;
}
.st-recbar .btn { min-height: 46px; padding-left: 22px; padding-right: 22px; }
.st-rechint { flex-basis: 100%; text-align: center; font-size: 13px; font-weight: 500; color: var(--muted); }
body.is-recording { padding-bottom: calc(150px + var(--safe-b)); }
.st-recbar b { font: 700 20px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text); }
.st-recdot { width: 14px; height: 14px; border-radius: 50%; background: var(--danger); animation: st-pulse 1.6s ease-in-out infinite; }
@keyframes st-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .st-recdot, .st-main > section:not(.hidden) { animation: none; }
}

/* speler */
.st-player { display: grid; gap: 12px; }
.st-transport { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.st-tb, .st-tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 60px; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--raised); color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.15;
  text-align: center; transition: background-color .15s, border-color .15s, color .15s;
}
.st-tb:active, .st-tool:active { transform: translateY(1px); }
.st-tb.st-main-btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* gekozen = volle kleur, zodat er nooit twijfel is welke knop aan staat */
.st-tool.on, .st-chip.on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
/* zweefkleur alleen met een muis: op een aanraakscherm blijft die anders 'hangen' en lijkt een knop gekozen */
@media (hover: hover) {
  .st-tb:hover, .st-tool:hover, .st-chip:hover, .st-width:hover { background: var(--surface-2); }
  .st-tb.st-main-btn:hover, .st-tool.on:hover, .st-chip.on:hover { background: var(--accent-hover); }
  .st-recbtn:hover { background: var(--danger-soft); }
}
.st-scrubrow { display: flex; align-items: center; gap: 12px; }
.st-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; min-width: 88px; }
#stScrub, #stOrigVol { flex: 1; min-height: 32px; padding: 0; border: 0; background: transparent; box-shadow: none; accent-color: var(--accent); }
.st-optrow { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.st-lbl { font-size: 13px; font-weight: 600; color: var(--muted); min-width: 68px; }
.st-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.st-chip {
  min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--raised); color: var(--text); font-weight: 600; font-size: 14px;
  transition: background-color .15s, border-color .15s, color .15s;
}

/* tekenen */
.st-draw { display: grid; gap: 14px; }
.st-toolrow { display: flex; gap: 12px; align-items: stretch; }
.st-tools { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
/* 'Stap terug' en 'Alles wissen' staan apart: het zijn geen tekengereedschappen */
.st-edits { display: grid; grid-template-columns: repeat(2, minmax(86px, 1fr)); gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.st-edit { color: var(--muted); }
.st-style { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: center; }
.st-colors, .st-widths { display: flex; gap: 8px; align-items: center; }
.st-color {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); padding: 0;
  box-shadow: inset 0 0 0 3px var(--surface); transition: border-color .15s, box-shadow .15s;
}
.st-color.on { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface), 0 0 0 3px var(--accent-ring); }
.st-width {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised);
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.st-width.on { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.st-dot { display: block; border-radius: 50%; background: var(--text); }
.st-dot-1 { width: 6px; height: 6px; }
.st-dot-2 { width: 12px; height: 12px; }
.st-dot-3 { width: 20px; height: 20px; }
.st-hint { margin: 0; color: var(--muted); font-size: 14px; text-align: center; min-height: 21px; }

/* meer opties */
.st-more { padding: 0; }
.st-more summary { padding: 14px 16px; min-height: 48px; cursor: pointer; font-weight: 600; color: var(--muted); border-radius: 18px; }
.st-more[open] summary { color: var(--text); }
.st-opts { display: grid; gap: 10px; padding: 0 16px 16px; }
.st-opts label.check { margin: 0; min-height: 44px; align-items: center; }
.st-opts label.check input { width: 22px; height: 22px; }
.st-opts .st-lbl { min-width: 0; }
.st-vol { display: flex; align-items: center; gap: 12px; padding-left: 32px; }
.st-other { justify-self: center; gap: 8px; min-height: 44px; }

/* acties: blijven onderaan in beeld, zodat 'Opnemen' nooit onder de vouw verdwijnt */
.st-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.st-actions .btn.big { min-height: 56px; font-size: 17px; }
.st-actions .btn .st-ic { width: 24px; height: 24px; }
.st-bar {
  position: sticky; bottom: 0; z-index: 8; display: flex; margin: 0 -4px;
  padding: 18px 4px calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 72%, transparent);
}
.st-bar .btn { flex: 1 1 0; }
.st-bar .st-recbtn { flex-grow: 1.5; }
.st-bar .btn.quiet { background: var(--raised); }
.st-recbtn { background: var(--raised); border: 1.5px solid var(--danger); color: var(--danger-text); box-shadow: var(--shadow); }
.st-recbtn .st-ic { color: var(--danger); }
.st-recbtn:disabled { opacity: .6; cursor: default; }

/* resultaat */
.st-result h2 { margin: 0 0 4px; font-size: 28px; }
.st-reslead { margin: 0 0 14px; }
.st-preview { display: flex; justify-content: center; background: var(--video-bg); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.st-preview video, .st-preview img { display: block; max-width: 100%; max-height: 52vh; }
.st-result .st-warn { margin-bottom: 4px; }
.st-result textarea { resize: vertical; }
.st-noteonphoto { margin-top: 10px; }
.st-resactions { margin-top: 18px; margin-bottom: 10px; }
.st-result #stShareHint { margin: 0; }
.st-resnav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; margin: 14px -10px 0; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.st-resnav .btn { gap: 8px; min-height: 44px; }

/* Smalle kolom: op een telefoon, en op een breed scherm waar de knoppen naast het beeld staan */
@media (max-width: 560px), (min-width: 900px) {
  .st-transport { gap: 5px; }
  .st-tb, .st-tool { min-height: 56px; font-size: 11px; padding: 6px 2px; }
  .st-time { min-width: 76px; font-size: 13px; }
  .st-card { padding: 12px; }
  .st-more { padding: 0; }
  .st-draw { gap: 12px; }
  .st-toolrow { flex-direction: column; gap: 10px; }
  .st-tools { gap: 5px; }
  .st-edits { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line-soft); grid-template-columns: 1fr 1fr; }
  .st-edit { flex-direction: row; gap: 8px; min-height: 44px; font-size: 13px; }
  .st-colors { gap: 6px; }
}
@media (max-width: 560px) {
  .st-top { padding: 10px 12px 2px; gap: 6px; }
  .st-backlink { padding-left: 6px; padding-right: 8px; }
  .st-privacy { font-size: 12.5px; }
  .st-main { padding: 0 12px; }
  .st-dropzone { padding: 28px 14px; }
  .st-steps { font-size: 13px; }
  .st-steps ol { gap: 4px 14px; }
  .st-bar { gap: 8px; }
  .st-bar .btn.big { padding-left: 12px; padding-right: 12px; font-size: 16px; white-space: nowrap; }
  .st-bar .st-recbtn { flex-grow: 1.2; }
  .st-resactions { grid-template-columns: 1fr; }
  .st-resnav { flex-direction: column; align-items: flex-start; }
}
/* telefoon rechtop: het beeld blijft bovenaan staan terwijl je naar het gereedschap schuift */
@media (max-width: 560px) and (min-height: 600px) {
  .st-stagewrap { position: sticky; top: 0; z-index: 6; margin: 0 -12px; padding: 6px 12px; background: var(--bg); }
}
/* breed scherm: beeld links (blijft staan), speler en gereedschap rechts ernaast: niets hoeft uit beeld */
@media (min-width: 900px) {
  .st-top, .st-privacy, .st-main { max-width: 1240px; }
  #stEditor { grid-template-columns: minmax(0, 1fr) 356px; column-gap: 18px; }
  .st-steps, .st-bar { grid-column: 1 / -1; }
  .st-stagewrap { position: sticky; top: 12px; align-self: start; }
  .st-bar { justify-content: center; }
  .st-bar .btn { flex: 0 1 260px; }
  .st-bar .st-recbtn { flex: 0 1 340px; }
  .st-recbar { left: calc(50% - 187px); } /* midden onder het beeld, niet over de knoppen rechts */
  #stStart, #stResult { width: 100%; max-width: 980px; justify-self: center; }
}
.st-advieslink { text-align: center; margin: 0 0 10px; }
