/* mobiel.css – telefoon/tablet en toegankelijkheid voor portaal.uwwerkplek.cloud (spoor 27, 30-11-2026).
   Wordt als LAATSTE stylesheet geladen op index.html, video.html, telefoon.html en projecten.html.
   Alleen aanvullingen: geen bestaande regels weghalen. Gecontroleerd op 390×844 en 768×1024. */

/* ===== toegankelijkheid, alle schermen ===== */
/* zichtbare focusrand voor toetsenbordgebruikers waar een eigen stijl ontbreekt */
:where(a, button, input, select, textarea, summary, [tabindex], [contenteditable=true], [role=button]):focus-visible {
  outline: 2px solid #5AD6C1; outline-offset: 2px;
}
.belk:focus-visible, .sw:focus-visible, .pb:focus-visible, .pp:focus-visible, .tile:focus-visible, .qb:focus-visible {
  outline: 2px solid #5AD6C1; outline-offset: 2px;
}
/* contrast ≥ 4,5:1 voor witte tekst op gekleurde vlakken */
.tile .nb { background: #c43a26; }                                   /* was #e2513c (3,8:1) */
.belk { background: #0b7a5d; }                                       /* was #0f8a6a (4,3:1) */
.itabs[style*="0f8a6a"] button[aria-pressed=true] { background: #0b7a5d !important; border-color: #0b7a5d !important; }
.av[style*="0f8a6a"] { background: #0b7a5d !important; }
.grip { color: var(--tx3); }                                         /* sleepgreep (projecten) */
/* lange woorden en links breken af i.p.v. de pagina te verbreden */
.mc-lees .bl, .mc-lees .kopr, .ml .ond, .ml .vw, .wi-md, .wi-op .o { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* ===== tikdoelen ≥ 44 px op aanraakschermen en smalle vensters ===== */
@media (pointer: coarse), (max-width: 760px) {
  .waffle, .top .ibtn, .avatar { width: 44px; height: 44px; }
  .search input { height: 44px; }
  .mc-map button.f { min-height: 40px; }
  .top .search svg { top: 14px; }
  .tabs .wt .cl { width: 36px; min-height: 44px; }
  .pb, .pp, .qb, .itabs button, .mbk .pb, .x { min-height: 44px; }
  .x { min-width: 44px; }
  .itabs button { padding-left: 14px; padding-right: 14px; }
  .inp, .zk input, .mc-lijst .zk input, select, input[type=text], input[type=email], input[type=search], input[type=date], input[type=number] { min-height: 44px; }
  .ml .klap { width: 32px; min-height: 32px; display: inline-grid; place-items: center; }
  .mc-lees .lnk-k { min-height: 44px; padding: 0 4px; }
  .mc-lees .bijl a { min-height: 44px; }
  .sw { width: 52px; height: 30px; }                                  /* schakelaar: groter, met ruimere tikzone */
  .sw { position: relative; } .sw::after { content: ""; position: absolute; inset: -8px; }
  /* opstelvenster (mail) */
  .os-balk { gap: 6px; }
  .os-balk button { min-width: 40px; height: 40px; }
  .os-balk select { height: 40px; }
  .os-kl { gap: 6px; }
  .os-kl button { width: 30px; min-width: 30px; height: 30px; }
  /* projecten */
  .kl { width: 32px; min-height: 32px; }
}

/* ===== mail: mappen op tablet en telefoon als strook boven de lijst ===== */
/* cloud.css verbergt .mc-map onder 1100 px; dan kon je niet van map wisselen en geen nieuwe mail beginnen */
@media (max-width: 1100px) {
  .mc { grid-template-rows: auto minmax(0, 1fr); }
  .mc-map {
    display: flex !important; flex-direction: row; align-items: center; gap: 6px;
    grid-column: 1 / -1; overflow-x: auto; overscroll-behavior-x: contain;
    border-right: 0; border-bottom: 1px solid var(--ln); padding: 8px 10px; scrollbar-width: thin;
  }
  .mc-map .kp { display: none; }
  .mc-map .pp, .mc-map .pp.nm { width: auto; flex: none; margin: 0; padding: 0 14px; height: 40px; white-space: nowrap; border-radius: 999px; font-size: 14px; }
  .mc-map button.f { width: auto; flex: none; white-space: nowrap; border: 1px solid var(--ln); border-radius: 999px; padding: 6px 12px; background: var(--srf); }
  .mc-map button.f[aria-current=true] { border-color: var(--txa); }
  .mc-map button.f span { overflow: visible; }
}
@media (max-width: 760px) {
  .mc { grid-template-rows: auto; }
  .mc.lees .mc-map { display: none !important; }                     /* tijdens het lezen: alle ruimte voor het bericht */
  .mc-lees .mbk { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .mc-lees .mbk .pb { flex: none; }
  .mc-lees .bl { padding: 14px 12px; }
  .mc-lees .gk { padding: 10px; }
  .mc-lees .gi { padding: 4px 10px 12px; }
  .mc-lees .mailframe { min-height: 200px; }
  .ml button { padding: 12px 10px; }
}

/* ===== agenda: dagkoppen leesbaar in de smalle weekweergave ===== */
@media (max-width: 640px) {
  .wk-h { height: 44px; flex-wrap: wrap; align-content: center; padding: 2px; line-height: 1.15; text-align: center; gap: 1px 4px; font-size: 12px; overflow: hidden; }
  .wk-u { margin-top: 44px; }
  .wk-t { margin-left: 0; }
}

/* ===== projecten: werkitemvenster zonder horizontaal scrollen ===== */
@media (max-width: 860px) {
  .wi-g { grid-template-columns: minmax(0, 1fr); }
  .wi-v { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wi-v select, .wi-v input, .wi-t, .wi-g textarea { width: 100%; min-width: 0; box-sizing: border-box; }
  .dlg.wide { max-width: 100%; }
}
@media (max-width: 420px) {
  .wi-v { grid-template-columns: minmax(0, 1fr); }
}

/* ===== videobellen: in gesprek op telefoon (zonder LiveKit niet live te proeven; op code nagekeken) ===== */
.vb-gesprek { height: calc(100dvh - 110px); }                         /* mobiele adresbalk valt niet over de knoppen */
.vb-raster { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
@media (max-width: 640px) {
  .vb-raster { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); grid-auto-rows: minmax(120px, 1fr); overflow-y: auto; }
  .vb-link code { max-width: 100%; }
  .vb-balk button { min-height: 44px; }
}

/* ===== algemeen smal ===== */
@media (max-width: 640px) {
  .search { flex: 0 0 44px; }
  .dlg { padding: 16px 14px; border-radius: 14px; }
  .dim { padding: 8px; }
  .kop h1 { overflow-wrap: anywhere; }
  /* meldingsbalk (thema.css/verbeteringen.js): volle breedte, knoppen onder de tekst */
  .uwp-balk { left: 12px; right: 12px; transform: none; max-width: none; flex-wrap: wrap; }
  .uwp-balk button { min-height: 44px; }
}
