/* Dropje: koel, waterachtig en rustig. De leiding tussen twee apparaten is het enige opvallende element. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url(/fonts/bricolage.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* semantische tokens, zelfde namen als shadcn */
  --background: #f2f6f7;
  --foreground: #0d1a1f;
  --card: #ffffff;
  --muted: #e6edef;
  --muted-foreground: #577078;
  --border: #d8e2e5;
  --primary: #0e7490;
  --primary-foreground: #ffffff;
  --secondary: #e3eef1;
  --secondary-foreground: #0d1a1f;
  --accent-soft: #d9eff4;
  --ring: #0e7490;
  --destructive: #b42318;

  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* tinten voor de cirkels van andere apparaten */
  --t0-bg: #d9f0ee; --t0-fg: #0b4d48;
  --t1-bg: #e3e7fb; --t1-fg: #2b3a8c;
  --t2-bg: #fbebcd; --t2-fg: #7a4a06;
  --t3-bg: #fbe0e6; --t3-fg: #8a1f3d;
  --t4-bg: #e5f1d1; --t4-fg: #3d5a0e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a1317;
    --foreground: #e5eef1;
    --card: #101b20;
    --muted: #172529;
    --muted-foreground: #8ba2aa;
    --border: #1f3037;
    --primary: #2cc3e0;
    --primary-foreground: #04252d;
    --secondary: #172a30;
    --secondary-foreground: #e5eef1;
    --accent-soft: #0e2c34;
    --ring: #2cc3e0;
    --destructive: #f4877b;

    --t0-bg: #12332f; --t0-fg: #8fe0d6;
    --t1-bg: #1f2547; --t1-fg: #b4bffb;
    --t2-bg: #3a2d12; --t2-fg: #f2cd8a;
    --t3-bg: #3c1a22; --t3-fg: #f5b1c1;
    --t4-bg: #24330f; --t4-fg: #c8e69a;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font: 400 16px/1.5 var(--font);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, p { margin: 0; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------- layout ---------- */
.app {
  max-width: 1040px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 32px) max(32px, env(safe-area-inset-bottom));
}
.top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 21px; font-weight: 750; letter-spacing: -.03em; }
.brand svg { width: 30px; height: 30px; border-radius: 9px; }
/* tik op de druppel: hij veert op, landt platter en stuurt een rimpel uit */
.brand .dropg { transform-box: fill-box; transform-origin: 50% 100%; }
.brand .ripple { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }
.brand svg.splash .dropg { animation: plop .9s ease-in-out; }
.brand svg.splash .ripple { animation: ripple .9s ease-out .35s; }

.grid { display: grid; gap: 16px; margin-top: 12px; align-items: start; }
.main { display: grid; gap: 16px; }
@media (min-width: 880px) {
  .grid { grid-template-columns: 380px minmax(0, 1fr); gap: 20px; margin-top: 20px; }
  .side { position: sticky; top: 20px; }
}
@media (max-width: 879px) {
  body[data-peers="1"] .side { order: 2; } /* verbonden: apparaten bovenaan */
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.muted { color: var(--muted-foreground); }
.me { font-size: 14px; color: var(--muted-foreground); text-align: right; }
.me b { color: var(--foreground); font-weight: 650; }

/* ---------- verbindingsstatus ---------- */
.conn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card);
  font-size: 14px; color: var(--muted-foreground);
}
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-foreground); transition: background-color .25s; }
.conn[data-state="ok"] { color: var(--foreground); }
.conn[data-state="ok"] i { background: var(--primary); }
.conn[data-state="wait"] i { animation: blink 1.2s ease-in-out infinite; }
.conn[data-state="lost"] { color: var(--destructive); }
.conn[data-state="lost"] i { background: var(--destructive); }

/* ---------- gratis of Plus (concept) ---------- */
.top-right { display: flex; align-items: center; gap: 8px; }
.planpill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--foreground);
  font: 600 14px/1 var(--font); white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.planicon { display: grid; place-items: center; color: var(--primary); }
.planicon svg { width: 16px; height: 16px; }
.planpill[data-left="0"] .planicon { color: var(--destructive); }
.planpill[data-plus="true"] { background: var(--primary); border-color: transparent; color: var(--primary-foreground); }
.planpill[data-plus="true"] .planicon { color: inherit; }
@media (hover: hover) { .planpill:hover { background: var(--muted); } .planpill[data-plus="true"]:hover { background: var(--primary); filter: brightness(1.08); } }
/* smal scherm met de teller erbij: van de verbinding alleen het bolletje (de tekst blijft er voor schermlezers) */
@media (max-width: 400px) {
  .top-right:has(.planpill:not([hidden])) .conn { padding: 0 11px; }
  .top-right:has(.planpill:not([hidden])) .conn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.badge.plus { background: var(--accent-soft); color: var(--primary); }

dialog.plan .plan-body { display: grid; gap: 16px; }
.plan-why { padding: 10px 12px; border-radius: var(--radius); background: var(--t2-bg); color: var(--t2-fg); font-size: 14px; }
/* hoeveel keer gratis versturen er deze maand nog over is (--left: 0 tot 1) */
.plan-meter { height: 8px; margin-bottom: 10px; border-radius: 99px; background: var(--muted); overflow: hidden; }
.plan-meter::before { content: ""; display: block; height: 100%; background: var(--primary); transform: scaleX(var(--left, 1)); transform-origin: left; transition: transform .3s var(--ease); }
.plan-free p, #planHave { font-size: 15px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 15px; }
.plan-list svg { width: 18px; height: 18px; margin-top: 2px; color: var(--primary); }
.plan-note { font-size: 14px; margin-top: -6px; }
.plan-price { font-size: 15px; }
.plan-price b { font-size: 28px; font-weight: 750; letter-spacing: -.02em; margin-right: 4px; }
.plan-price .muted { font-size: 13px; }
.plan-proef { padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); }
dialog.plan[data-plus="true"] :is(#planFree, #planList, .plan-note, #planPrice) { display: none; }

/* ---------- knoppen en velden ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--primary); color: var(--primary-foreground);
  font: 600 15px/1 var(--font);
  cursor: pointer;
  transition: transform .12s var(--ease), background-color .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn.outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.btn.ghost { background: transparent; color: var(--foreground); padding: 0 12px; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
@media (hover: hover) {
  .btn:hover:not(:disabled) { filter: brightness(1.08); }
  .btn.secondary:hover:not(:disabled), .btn.ghost:hover:not(:disabled), .btn.outline:hover:not(:disabled) { background: var(--muted); filter: none; }
}

input[type="text"] {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--background); color: var(--foreground);
  font: 650 18px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; text-align: center;
}
input[type="text"]::placeholder { color: var(--muted-foreground); opacity: .7; font-weight: 500; }
label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted-foreground); }

/* ---------- lobby ---------- */
.lobby { container-type: inline-size; }
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.lobby-head .btn { margin-right: -12px; }

.code {
  display: flex; gap: .1em;
  width: 100%; margin: 0; padding: 0; border: 0; background: none;
  font: 800 min(3.2rem, 15cqw)/1 var(--font);
  color: var(--foreground);
  cursor: pointer;
  border-radius: var(--radius);
}
.code .ch {
  display: grid; place-items: center;
  flex: 0 0 .86em; height: 1.25em;
  background: var(--secondary);
  border-radius: .22em;
  animation: rise .6s var(--ease) both;
  animation-delay: calc(var(--i) * 50ms + 80ms);
}
.code .ch:nth-child(3) { margin-right: .2em; }
.lobby.compact .code { font-size: min(1.9rem, 9cqw); }
.code.idle .ch { color: var(--muted-foreground); animation: none; }

/* afteller tot de volgende code */
.codetime { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted-foreground); }
.codebar { flex: 1; height: 4px; border-radius: 99px; background: var(--muted); overflow: hidden; }
.codebar i { display: block; height: 100%; background: var(--primary); transform-origin: left; }
.codebar i.run { animation: drain var(--dur, 30000ms) linear var(--delay, 0ms) forwards; }
.codetime .left { min-width: 12ch; text-align: right; font-variant-numeric: tabular-nums; }

.lockline {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: start;
  margin-top: 14px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px;
}
.lockline p { color: var(--muted-foreground); }
.lockline .btn { grid-column: 2; justify-self: start; margin-top: 6px; }
.lockicon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted-foreground); }
.lockicon svg { width: 18px; height: 18px; }
.lockline[data-locked="true"] .lockicon { color: var(--primary); }
.lifeline { margin-top: 10px; } /* hoe lang de lobby nog blijft; bewaard: groen-blauw klokje */
.lifeline[data-keep="true"] .lockicon { color: var(--primary); }

.notice {
  display: grid; gap: 12px; margin-top: 12px; padding: 16px 18px;
  border: 1px solid var(--destructive); border-radius: var(--radius-lg);
  background: var(--card);
  font-size: 15px;
}
.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* bestanden uit het deelmenu die klaarstaan */
.sharebar {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 12px 12px 14px;
  border: 1px solid var(--primary); border-radius: var(--radius-lg);
  background: var(--accent-soft); font-size: 15px;
}
.sharebar p { flex: 1; min-width: 0; }
.shareicon {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px;
  border-radius: 10px; background: var(--primary); color: var(--primary-foreground);
}
.shareicon svg { width: 18px; height: 18px; }
.weak { margin-bottom: 14px; padding: 10px 12px; border-radius: var(--radius); background: var(--t2-bg); color: var(--t2-fg); font-size: 13px; }

.more {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows .35s var(--ease), visibility 0s;
}
.more-inner { overflow: hidden; min-height: 0; margin: 0 -6px; padding: 0 6px; } /* ruimte voor de focusrand, anders knipt overflow hem links af */
.lobby.compact:not(.open) .more { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .35s var(--ease), visibility 0s .35s; }
.more-body { padding-top: 20px; display: grid; gap: 16px; }
.qr { justify-self: start; padding: 10px; background: #fff; border-radius: 18px; border: 1px solid var(--border); line-height: 0; }
.qr img { width: 168px; height: 168px; image-rendering: pixelated; transition: opacity .2s; }
.qr img.idle { opacity: .12; }

/* DNS-controle */
.dns {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted-foreground);
}
.dnsicon { display: grid; place-items: center; flex: none; width: 18px; height: 18px; }
.dnsicon svg { width: 16px; height: 16px; }
.dns[data-state="ok"] .dnsicon { color: var(--primary); }
.dns[data-state="bad"] {
  padding: 12px 14px; border: 1px solid var(--destructive); border-radius: var(--radius);
  color: var(--foreground); font-size: 14px;
}
.dns[data-state="bad"] .dnsicon { color: var(--destructive); }
.hint { font-size: 14px; color: var(--muted-foreground); max-width: 34ch; }
.join { display: flex; gap: 8px; }
.join .btn { flex: none; }
.fresh { display: grid; gap: 8px; justify-items: start; padding-top: 16px; border-top: 1px solid var(--border); }
.toggle { margin: 14px 0 0 -12px; }
.lobby:not(.compact) .toggle { display: none; }

/* ---------- apparaten ---------- */
.peers { display: grid; gap: 12px; }
/* snelknop "Stuur naar <pc>" boven de apparaten (alleen als er een Dropje Desktop is) */
.btn.quick { display: flex; width: 100%; margin-bottom: 12px; }

.empty { display: grid; justify-items: center; gap: 6px; padding: 12px 0 8px; text-align: center; }
.empty .pipe { width: min(100%, 280px); margin-bottom: 14px; }
.empty-title { font-weight: 650; }
.empty .muted { font-size: 14px; max-width: 34ch; }

.peer {
  position: relative;
  display: grid; gap: 16px;
  padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card);
  transition: border-color .2s, background-color .2s;
  animation: pop .4s var(--ease) both;
}
.peer.dragover { border-color: var(--primary); background: var(--accent-soft); }
.peer.dragover > :not(.drophint) { opacity: .25; }
.peer .drophint {
  position: absolute; inset: 0; display: none; place-items: center;
  font-weight: 650; color: var(--primary); pointer-events: none;
}
.peer.dragover .drophint { display: grid; opacity: 1; }
.peer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.peer-row > div { min-width: 0; }
.peer-row .btn { white-space: nowrap; }
.who { display: grid; gap: 2px; justify-items: start; }
.name { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.name .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.did {
  flex: none;
  padding: 1px 7px; border-radius: 6px;
  background: var(--muted); color: var(--muted-foreground);
  font: 600 12px/1.5 var(--font); letter-spacing: .06em; font-variant-numeric: tabular-nums;
}
.me .did { vertical-align: 1px; }
.badge { flex: none; padding: 1px 8px; border-radius: 999px; font: 600 12px/1.5 var(--font); }
.badge.new { background: var(--t2-bg); color: var(--t2-fg); }
.linkbtn {
  margin: 4px 0 -4px; padding: 6px 0; border: 0; background: none;
  font: 500 13px/1 var(--font); color: var(--muted-foreground);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
@media (hover: hover) { .linkbtn:hover { color: var(--destructive); } }
.linkbtn[data-confirm] { color: var(--destructive); }
.peer-actions { display: flex; gap: 8px; flex: none; }
/* is er naast de naam te weinig ruimte voor beide knoppen, dan gaan de knoppen eronder (rechts) */
@media (min-width: 481px) {
  .peer-row { flex-wrap: wrap; }
  .peer-row > .who { flex: 1 1 240px; }
  .peer-actions { margin-left: auto; }
}
@media (max-width: 480px) {
  .peer-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .peer-actions .btn { flex: 1; }
}
.name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { font-size: 14px; color: var(--muted-foreground); }

/* de leiding */
.pipe { display: flex; align-items: center; }
.node {
  position: relative; z-index: 1; flex: none;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  font-weight: 700; font-size: 17px;
}
.node.me { background: var(--primary); color: var(--primary-foreground); }
.node.them { background: var(--t0-bg); color: var(--t0-fg); }
.node.t1 { background: var(--t1-bg); color: var(--t1-fg); }
.node.t2 { background: var(--t2-bg); color: var(--t2-fg); }
.node.t3 { background: var(--t3-bg); color: var(--t3-fg); }
.node.t4 { background: var(--t4-bg); color: var(--t4-fg); }
.node.ghost { background: transparent; color: var(--muted-foreground); border: 1.5px dashed var(--muted-foreground); animation: ring 2.4s ease-out infinite; }

.line { position: relative; flex: 1; height: 2px; margin: 0 -2px; background: var(--primary); border-radius: 2px; transition: height .2s; }
.peer[data-mode="connecting"] .line,
.empty .line {
  background: repeating-linear-gradient(90deg, var(--muted-foreground) 0 6px, transparent 6px 12px);
  opacity: .6;
  animation: dash 1s linear infinite;
}
.peer[data-mode="relay"] .line {
  background: repeating-linear-gradient(90deg, var(--primary) 0 9px, transparent 9px 15px);
}
.srv {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  display: none; place-items: center;
  width: 30px; height: 30px; transform: translate(-50%, -50%);
  border: 1.5px solid var(--primary); border-radius: 9px;
  background: var(--card); color: var(--primary);
}
.srv svg { width: 16px; height: 16px; }
.peer[data-mode="relay"] .srv { display: grid; }
/* niet verbonden, maar je kunt iets klaarzetten: stille stippellijn en een grijs bolletje */
.peer[data-mode="asleep"] .line {
  background: repeating-linear-gradient(90deg, var(--muted-foreground) 0 3px, transparent 3px 9px);
  opacity: .5;
}
.peer[data-mode="asleep"] .node.them { background: var(--muted); color: var(--muted-foreground); }
.tr-box { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
/* oude versie of mislukte beveiligingscontrole: geen leiding */
.peer[data-mode="old"] .line, .peer[data-mode="bad"] .line { background: var(--border); }
.peer[data-mode="old"] .sub, .peer[data-mode="bad"] .sub { color: var(--destructive); }

.drop {
  position: absolute; top: 50%; left: 0; display: none;
  width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent);
}
.peer[data-active] .line { height: 3px; }
.peer[data-active] .drop { display: block; animation: flow 1.3s var(--ease) infinite; }
.peer[data-active] .drop:nth-of-type(2) { animation-delay: .43s; }
.peer[data-active] .drop:nth-of-type(3) { animation-delay: .86s; }
.peer[data-active="receive"] .drop { animation-direction: reverse; }

/* ---------- overdrachten ---------- */
.tlist { list-style: none; margin: 0; padding: 0; display: grid; }
.tr {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--border);
  animation: pop .3s var(--ease) both;
}
.tr:first-child { border-top: 0; padding-top: 0; }
.tr:last-child { padding-bottom: 0; }
.tr-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--secondary); color: var(--primary); }
.tr-icon svg { width: 18px; height: 18px; }
.tr-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-sub { font-size: 14px; color: var(--muted-foreground); }
.tr-warn { margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--destructive); } /* bijvoorbeeld: dit heb je al ontvangen */
.bar { height: 5px; margin-top: 8px; border-radius: 99px; background: var(--muted); overflow: hidden; }
.bar i { display: block; width: 100%; height: 100%; background: var(--primary); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .15s linear; }
.tr[data-state="done"] .bar, .tr[data-state="failed"] .bar, .tr[data-state="waiting"] .bar, .tr[data-state="offer"] .bar { display: none; }
.tr[data-state="waiting"] .tr-end { animation: blink 1.6s ease-in-out infinite; }
.tr[data-state="offer"] .tr-icon { background: var(--primary); color: var(--primary-foreground); }
.tr[data-state="offer"] .tr-end { gap: 8px; flex-wrap: wrap; }
.tr-end { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted-foreground); }
a.btn { text-decoration: none; }
@media (max-width: 480px) {
  /* status en knop onder de bestandsnaam, zodat de naam leesbaar blijft */
  .tr { grid-template-columns: 36px minmax(0, 1fr); row-gap: 10px; }
  .tr-end { grid-column: 2; justify-self: start; }
  .tr-end:empty { display: none; }
}
.tr-end svg { width: 16px; height: 16px; color: var(--primary); }
.tr[data-state="failed"] .tr-end { color: var(--destructive); }
.empty-note { font-size: 14px; color: var(--muted-foreground); max-width: 40ch; }
/* automatisch accepteren en alles opslaan */
.autoline { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; font-size: 14px; color: var(--muted-foreground); cursor: pointer; }
.autoline input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
#saveAll { margin: -10px -14px -10px 0; }
/* tekst of link bij Overdrachten: de inhoud zelf, lange teksten scrollen binnen het vak */
.tr-text { margin-top: 6px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.6em; overflow: auto; }
.tr.textmsg { align-items: start; }
.textmsg .tr-end { gap: 8px; flex-wrap: wrap; }
.textmsg .tr-end .btn svg { color: inherit; }

/* ---------- tekst of link sturen ---------- */
dialog.textbox {
  width: min(460px, calc(100vw - 32px)); padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--card); color: var(--foreground);
}
dialog.textbox::backdrop { background: rgb(4 20 26 / .45); }
@media (prefers-color-scheme: dark) { dialog.textbox::backdrop { background: rgb(0 0 0 / .62); } } /* anders valt het venster in het donker weg tegen de pagina */
dialog.textbox form { display: grid; gap: 14px; }
dialog.textbox h2 { font-size: 20px; }
textarea {
  width: 100%; min-height: 120px; padding: 12px 14px; resize: vertical;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--background); color: var(--foreground);
  font: 400 16px/1.45 var(--font); /* 16px: anders zoomt de iPhone in bij het typen */
}
.dlg-actions { display: flex; gap: 8px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 10; padding: 12px 18px;
  border-radius: 999px; background: var(--foreground); color: var(--background);
  font-size: 14px; font-weight: 600;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .2s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- beweging ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes flow {
  0% { left: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: calc(100% - 9px); opacity: 0; }
}
@keyframes dash { to { background-position: 12px 0; } }
@keyframes plop {
  0% { transform: none; }
  22% { transform: translateY(-16%) scale(.9, 1.14); }
  46% { transform: translateY(0) scale(1.2, .78); }
  66% { transform: scale(.95, 1.08); }
  84% { transform: scale(1.03, .98); }
  100% { transform: none; }
}
@keyframes ripple {
  0% { opacity: .85; transform: scale(.35); }
  100% { opacity: 0; transform: scale(2.6); }
}
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--muted-foreground) 35%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .codebar i.run { animation-duration: var(--dur, 30000ms) !important; } /* de afteller is informatie, geen versiering */
  .peer[data-active] .drop { display: none; }
  .peer[data-active] .line { height: 4px; }
}

/* ---------- voet: link naar Dropje voor Windows (niet in de desktop-app, zie desktop/renderer/desktop.css) ---------- */
.foot { margin-top: 28px; text-align: center; font-size: 14px; }
.foot a { color: var(--muted-foreground); text-underline-offset: 3px; }
@media (hover: hover) { .foot a:hover { color: var(--primary); } }
