/* tickets-module v1.0.0 */
/* Variabelen met terugval: een app overschrijft ze op :root of op een omhullend element. */
.tim-knophouder, .tim-stippen, .tim-balk, .tim-rand, .tim-achter, .tim-venster, .tim-lijst {
  --tm-accent: var(--p, #4A4A50);
  --tm-tekst: var(--tx, #292A2A);
  --tm-tekst2: var(--tx2, #5F6068);
  --tm-rand: var(--bd, #E0DFE6);
  --tm-vlak: #FFFFFF;
  --tm-vlak2: var(--s1, #F5F5F7);
  --tm-rood: #B42318;
  --tm-rood-bg: #FDECEA;
  --tm-groen: #2F6B14;
  --tm-groen-bg: #E3F4D8;
  --tm-amber: #8A5A10;
  --tm-amber-bg: #FBF1E2;
  --tm-hoek: 8px;
  --tm-letter: 13px;
  --tm-font: inherit;
  font-family: var(--tm-font);
  font-size: var(--tm-letter);
  color: var(--tm-tekst);
  box-sizing: border-box;
}
.tim-knophouder *, .tim-venster *, .tim-lijst *, .tim-balk *, .tim-stippen * { box-sizing: border-box; }
.tim-knophouder[hidden], .tim-rand[hidden], .tim-shotlink[hidden] { display: none; }

/* zwevende knop, balk, stippen */
.tim-knophouder { position: fixed; right: 16px; bottom: 16px; z-index: 9000; display: flex; gap: 8px; }
.tim-balk { position: fixed; top: 0; left: 0; right: 0; z-index: 9001; display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px; font-size: 12px; background: var(--tm-tekst); color: var(--tm-vlak); }
.tim-rand { position: fixed; z-index: 9000; outline: 2px solid var(--tm-accent); border-radius: 6px; pointer-events: none; }
.tim-stip { position: fixed; z-index: 9000; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px; background: var(--tm-accent); color: var(--tm-vlak); font: inherit; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; }
.tim-oplicht { outline: 3px solid var(--tm-accent); outline-offset: 2px; transition: outline-color .4s; }

/* knoppen */
.tim-knop { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 14px; border: 1px solid var(--tm-rand); border-radius: var(--tm-hoek); background: var(--tm-vlak2); color: var(--tm-tekst); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.tim-knop:hover { border-color: var(--tm-tekst2); }
.tim-knop-p { background: var(--tm-accent); border-color: var(--tm-accent); color: #fff; font-weight: 500; }
.tim-knop-p:hover { border-color: var(--tm-accent); filter: brightness(1.08); }
.tim-venster .tim-knop, .tim-knop-zwevend { height: 36px; border-radius: 9px; padding: 0 14px; }
.tim-knop-zwevend { box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.tim-knop:focus-visible, .tim-chip:focus-visible, .tim-stip:focus-visible, .tim-sluit:focus-visible, .tim-schrij:focus-visible, .tim-rij:focus-visible { outline: 2px solid var(--tm-accent); outline-offset: 2px; }

/* pillen: 18 hoog, hoek 6, letter 11 */
.tim-pil { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 400; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; border: .5px solid color-mix(in srgb, currentColor 12%, transparent); flex: 0 1 auto; }
.tim-pil-feit { background: var(--tm-vlak); color: var(--tm-tekst); }
.tim-pil-merk { background: color-mix(in srgb, var(--tm-accent) 12%, #fff); color: var(--tm-accent); }
.tim-pil-band { background: color-mix(in srgb, var(--tm-accent) 20%, #fff); color: var(--tm-accent); }
.tim-pil-g { background: var(--tm-groen-bg); color: var(--tm-groen); }
.tim-pil-a { background: var(--tm-amber-bg); color: var(--tm-amber); }
.tim-pil-r { background: var(--tm-rood-bg); color: var(--tm-rood); }
.tim-pil-vaag { background: var(--tm-vlak); color: var(--tm-tekst2); border-color: var(--tm-rand); }

/* venster */
.tim-achter { position: fixed; inset: 0; z-index: 9099; background: rgba(41, 42, 42, .32); }
.tim-venster { position: fixed; z-index: 9100; top: 40px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 80px); display: flex; flex-direction: column; background: var(--tm-vlak); border: 1px solid var(--tm-rand); border-top: 3px solid var(--tm-accent); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(41, 42, 42, .25); }
.tim-venster.tim-breed { width: min(620px, calc(100vw - 32px)); }
.tim-venster.tim-lijstvenster { width: min(1240px, calc(100vw - 32px)); }
.tim-vkop { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 0 16px 0 24px; background: var(--tm-accent); color: #fff; }
.tim-vtitels { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 0; }
.tim-vtitel { font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tim-vsub { position: relative; padding-left: 14px; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tim-vsub::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 14px; background: rgba(255, 255, 255, .4); }
.tim-sluit { flex: none; width: 30px; height: 30px; padding: 0; border: 1px solid rgba(255, 255, 255, .45); border-radius: 8px; background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.tim-lijf { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 24px 20px; }
.tim-voet { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--tm-rand); background: var(--tm-vlak2); }
.tim-voet:empty { display: none; }
.tim-rechts { margin-left: auto; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* formulier */
.tim-draad { display: grid; gap: 12px; align-content: start; min-width: 0; }
.tim-veld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tim-lab { font-size: 12px; font-weight: 600; color: var(--tm-tekst2); }
.tim-onder { min-height: 16px; font-size: 11px; color: var(--tm-tekst2); }
.tim-in { width: 100%; padding: 8px 12px; border: 1px solid var(--tm-rand); border-radius: 9px; background: var(--tm-vlak); color: var(--tm-tekst); font: inherit; font-size: 13px; resize: vertical; }
input.tim-in { height: 36px; padding-top: 0; padding-bottom: 0; }
.tim-in:focus { outline: none; border-color: var(--tm-accent); }
.tim-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tim-chip { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--tm-rand); border-radius: 9px; background: var(--tm-vlak); color: var(--tm-tekst); font: inherit; font-size: 12px; cursor: pointer; }
.tim-chip.tim-aan { background: var(--tm-accent); border-color: var(--tm-accent); color: #fff; font-weight: 500; }
.tim-schrij { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; cursor: pointer; }
.tim-sch { display: inline-flex; align-items: center; flex: none; width: 34px; height: 20px; padding: 0 2px; border-radius: 10px; background: var(--tm-rand); }
.tim-sch.tim-aan { background: var(--tm-accent); justify-content: flex-end; }
.tim-bol { width: 16px; height: 16px; border-radius: 8px; background: #fff; }
.tim-foutregel:empty { display: none; }

/* draadje */
.tim-regel { display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; font-size: 12px; }
.tim-blok { display: grid; gap: 6px; padding: 12px 14px; border-radius: 6px; background: var(--tm-vlak2); }
.tim-blok.tim-claude { background: color-mix(in srgb, var(--tm-accent) 10%, #fff); }
.tim-blok.tim-vraag { background: color-mix(in srgb, var(--tm-accent) 10%, #fff); border-left: 3px solid var(--tm-accent); padding-left: 11px; }
.tim-zin { font-size: 13px; white-space: pre-wrap; min-width: 0; overflow-wrap: anywhere; }
.tim-kop { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tim-meta { font-size: 12px; color: var(--tm-tekst2); min-width: 0; overflow-wrap: anywhere; }
.tim-nr { font-size: 12px; font-weight: 600; color: var(--tm-tekst2); }
.tim-keuzes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tim-keuze { display: grid; gap: 6px; padding: 10px 12px; border-radius: 4px; background: var(--tm-vlak); border: 1px solid var(--tm-rand); align-content: start; }
.tim-keuze.tim-gekozen { border-color: var(--tm-accent); box-shadow: 0 0 0 1px var(--tm-accent); }
.tim-keuzebeeld { display: block; width: 100%; height: 120px; object-fit: contain; background: var(--tm-vlak2); border-radius: 4px; border: 1px solid var(--tm-rand); }
.tim-kort { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tim-ctl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.tim-shot { display: block; max-width: 100%; max-height: 240px; object-fit: contain; border-radius: 4px; border: 1px solid var(--tm-rand); }
.tim-shotmini { height: 56px; max-width: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--tm-rand); }
.tim-tekst { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* lijst */
.tim-lijst { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tim-pkop { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 24px; border-radius: 12px; background: var(--tm-accent); color: #fff; }
.tim-pkopl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tim-pkopt { font-size: 18px; font-weight: 600; line-height: 1.2; }
.tim-pkopo { font-size: 12px; opacity: .92; }
.tim-pkop .tim-knop { margin-left: auto; height: 36px; }
.tim-fbalk { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tim-fbalk .tim-zoek { width: 280px; max-width: 100%; height: 30px; border-radius: var(--tm-hoek); font-size: 12px; }
.tim-fbr { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.tim-tel { font-size: 12px; color: var(--tm-tekst2); white-space: nowrap; }
.tim-lijstvenster .tim-lijf { padding: 16px 24px 20px; }
.tim-lijstvenster .tim-fbalk .tim-knop, .tim-lijst .tim-fbalk .tim-knop { height: 30px; border-radius: var(--tm-hoek); }
.tim-kaart { background: var(--tm-vlak); border: 1px solid var(--tm-rand); border-top: 3px solid var(--tm-accent); border-radius: 10px; overflow: hidden; }
.tim-band { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 24px; background: color-mix(in srgb, var(--tm-accent) 10%, #fff); border-bottom: 1px solid var(--tm-rand); }
.tim-bandnaam { font-size: 15px; font-weight: 600; white-space: nowrap; }
.tim-bandfeit { position: relative; padding-left: 14px; font-size: 12px; white-space: nowrap; }
.tim-bandfeit::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 14px; background: var(--tm-rand); }
.tim-leegrij { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 24px; }
.tim-leg { font-size: 12px; margin-right: 6px; }
.tim-kolkop, .tim-rij { display: grid; align-items: center; gap: 12px; padding: 0 24px; font-size: 12px; }
.tim-r { grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) 120px 92px 100px 88px 130px 20px; }
.tim-kolkop { min-height: 40px; background: var(--tm-vlak2); border-bottom: 1px solid var(--tm-rand); font-weight: 500; }
.tim-rij { min-height: 56px; cursor: pointer; }
.tim-rij.tim-zebra { background: color-mix(in srgb, var(--tm-vlak2) 55%, #fff); }
.tim-rij:hover { background: color-mix(in srgb, var(--tm-accent) 8%, #fff); }
.tim-rij.tim-urg { border-left: 3px solid var(--tm-rood); padding-left: 21px; }
.tim-rij > span, .tim-kolkop > span { min-width: 0; }
.tim-naam { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tim-chev { justify-self: end; color: var(--tm-tekst2); font-size: 16px; }

/* smal: venster vult de breedte, de lijst wordt een kaartenlijst van een kolom */
@media (max-width: 720px) {
  .tim-venster, .tim-venster.tim-breed, .tim-venster.tim-lijstvenster { top: 16px; width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
  .tim-lijf { padding: 16px; }
  .tim-keuzes { grid-template-columns: minmax(0, 1fr); }
  .tim-pkop { padding: 14px 16px; }
  .tim-band, .tim-leegrij { padding-left: 16px; padding-right: 16px; }
  .tim-fbalk .tim-zoek { width: 100%; }
  .tim-kolkop { display: none; }
  .tim-rij { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "naam stand" "tekst tekst" "wie datum" "soort ctl"; row-gap: 6px; padding: 12px 16px; }
  .tim-rij.tim-urg { padding-left: 13px; }
  .tim-rij > :nth-child(1) { grid-area: naam; }
  .tim-rij > :nth-child(2) { grid-area: tekst; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tim-rij > :nth-child(3) { grid-area: wie; }
  .tim-rij > :nth-child(4) { grid-area: datum; justify-self: end; }
  .tim-rij > :nth-child(5) { grid-area: soort; justify-self: start; }
  .tim-rij > :nth-child(6) { grid-area: ctl; justify-self: end; }
  .tim-rij > :nth-child(7) { grid-area: stand; justify-self: end; }
  .tim-rij > :nth-child(8) { display: none; }
}
@media (max-width: 1100px) and (min-width: 721px) {
  .tim-r { grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) 100px 84px 90px 80px 120px 20px; gap: 8px; padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tim-knophouder *, .tim-venster, .tim-oplicht, .tim-sch, .tim-chip, .tim-knop { transition: none !important; animation: none !important; }
}
