/* Kleuren: avondblauw met één lamplicht-geel voor de spraakknop */
:root {
  --achtergrond: #1F2140;
  --vlak: #2B2E55;
  --tekst: #EEEAF7;
  --zacht: #9C99BD;
  --lamp: #F2C14E;
  --lamp-tekst: #2A1F00;
  --rand: #3A3D68;
  --opname: #FF8A7A;
  --letter: "Atkinson Hyperlegible", system-ui, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --achtergrond: #F2F0FA;
    --vlak: #E4E1F3;
    --tekst: #1E2036;
    --zacht: #5F5C80;
    --lamp: #E8AE24;
    --lamp-tekst: #2A1F00;
    --rand: #CFCBE6;
    --opname: #C2412F;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--achtergrond);
  color: var(--tekst);
  font-family: var(--letter);
  font-size: 18px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; }
.verborgen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.scherm {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  max-width: 640px;
  margin: 0 auto;
}
.scherm[hidden] { display: none; }

.balk { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 48px; }
.balk h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; }
.balk .tekstknop { margin-left: -10px; }

.puntjes, .tekstknop {
  background: none; border: 0; padding: 10px; border-radius: 12px; color: var(--zacht);
}
.puntjes svg { width: 26px; height: 26px; fill: currentColor; display: block; }

/* Het invoerveld is het scherm zelf */
textarea {
  flex: 1;
  width: 100%;
  background: none;
  border: 0;
  resize: none;
  color: var(--tekst);
  font: inherit;
  font-size: 26px;
  line-height: 1.35;
  padding: 16px 0;
}
textarea::placeholder { color: var(--zacht); opacity: .7; }
textarea:focus { outline: none; }

.melding { min-height: 1.5em; margin: 0 0 8px; color: var(--zacht); font-size: 16px; }

.bediening { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.bewaar {
  background: var(--vlak);
  border: 1px solid var(--rand);
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 700;
}
.bewaar:disabled { opacity: .35; cursor: default; }

/* De lamp: grote ronde spraakknop onder je duim */
.spraak {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 0;
  background: var(--lamp);
  color: var(--lamp-tekst);
  display: grid; place-items: center;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow .25s ease, background .2s ease;
}
.spraak svg { width: 34px; height: 34px; fill: currentColor; stroke: currentColor; }
.spraak[aria-pressed="true"] {
  background: var(--opname);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--opname) 25%, transparent);
}

/* Eerdere invoer */
.leeg { color: var(--zacht); }
.lijst { list-style: none; margin: 8px 0 0; padding: 0; overflow-y: auto; flex: 1; }
.lijst li + li { border-top: 1px solid var(--rand); }
.lijst li { display: flex; align-items: flex-start; gap: 4px; }
.lijst .item {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 14px 4px;
  display: grid; gap: 4px;
}
/* Afvinken: rondje links, vinkje als het af is */
.vink {
  flex: none; width: 48px; height: 48px; margin-top: 4px;
  display: grid; place-items: center; background: none; border: 0; padding: 0;
}
.vink svg {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--zacht); stroke: transparent;
}
.vink[aria-pressed="true"] svg { background: var(--zacht); border-color: var(--zacht); stroke: var(--achtergrond); }
.lijst li.af .inhoud { color: var(--zacht); text-decoration: line-through; }
.lijst li.af .label, .lijst li.af .wanneer { opacity: .6; }
.lijst .wanneer { color: var(--zacht); font-size: 15px; }
.lijst .inhoud { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#wijzig textarea { font-size: 22px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.lijst .label { color: var(--lamp); font-size: 15px; }
@media (prefers-color-scheme: light) { .lijst .label { color: #7A5200; } }

/* ---------- Marktsentiment onderaan het invoerscherm ---------- */
:root {
  --s1: #E5533F; --s2: #F2994A; --s3: #A9A6C6; --s4: #8CCB5E; --s5: #2FA866;
  --gezicht-lijn: #1F2140;
}
.sentiment {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--rand);
  display: grid; gap: 8px;
}
.markt { display: grid; grid-template-columns: 64px repeat(5, 1fr); align-items: center; gap: 6px; }
.marktnaam { font-size: 15px; font-weight: 700; color: var(--zacht); }
.gezicht {
  background: none; border: 0; padding: 4px 0; border-radius: 50%;
  display: grid; place-items: center; min-height: 52px;
}
.gezicht svg { width: 44px; height: 44px; }
.gezicht .oog { fill: var(--gezicht-lijn); }
.gezicht .mond { fill: none; stroke: var(--gezicht-lijn); stroke-width: 1.8; stroke-linecap: round; }
.s1 circle:first-child { fill: var(--s1); }
.s2 circle:first-child { fill: var(--s2); }
.s3 circle:first-child { fill: var(--s3); }
.s4 circle:first-child { fill: var(--s4); }
.s5 circle:first-child { fill: var(--s5); }
/* Bevestiging van een tik: het gezicht veert even op */
.gezicht.getikt svg { animation: veer .35s ease-out; }
@keyframes veer { 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.sentiment-melding {
  margin: 0; min-height: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 15px; color: var(--zacht);
}
.sentiment-melding .tekstknop { color: var(--lamp); font-weight: 700; white-space: nowrap; }
@media (prefers-color-scheme: light) { .sentiment-melding .tekstknop { color: #7A5200; } }
@media (prefers-reduced-motion: reduce) { .gezicht.getikt svg { animation: none; } }
