/* Laboratuvar işleri (lb-; gorunum/laboratuvar.js, gorunum/laboratuvar-kart.js; moduller/laboratuvar).
   Yalnız Gündüz belirteçleri; sabit renk yok. 375 px'te yatay taşma yok: uzun metin sarar, düğme grupları sarılır, tablo bileşeni dar kapta
   kart listesine döner (bilesen.css). */

/* araç çubuğu ve liste */
.lb-arac .lb-secim { flex: 0 1 220px; min-width: 0; width: auto; }
.lb-arac[hidden], .lb-ozet[hidden] { display: none; }
.lb-ozet { margin: 0 0 10px; font-size: var(--fs-13); overflow-wrap: anywhere; }
.lb-ozet:empty { display: none; }
.lb-liste-kap { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.lb-liste-kap[data-yukleniyor] { opacity: .55; transition: opacity var(--t-orta); }

/* tablo hücreleri */
.lb-hucre { display: inline-flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.lb-is { font-weight: 600; color: var(--metin); }
.lb-dis { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-12); }
.lb-not { font-size: var(--fs-12); white-space: pre-wrap; }
.lb-rozetler { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
/* dar kart hücresinde rozet kesilmesin, sarsın */
.lb-rozetler .rozet { height: auto; min-height: 22px; padding-block: 3px; line-height: 1.25; white-space: normal; }
.lb-rozetler .rozet > span:last-child { overflow: visible; }
.lb-eylem { justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.lb-liste-kap tr[data-geciken] > td:first-child, .lb-dosya tr[data-geciken] > td:first-child { box-shadow: inset 3px 0 0 var(--uyari); }
@container (max-width: 640px) {
  .lb-liste-kap tr[data-geciken] > td:first-child, .lb-dosya tr[data-geciken] > td:first-child { box-shadow: none; }
  .lb-liste-kap tr[data-geciken], .lb-dosya tr[data-geciken] { box-shadow: inset 3px 0 0 var(--uyari); }
  /* kart görünümünde işlem hücresi yarım sütunda kalıyordu: "Laboratuvara gönder" / "Hastaya takıldı" / "Yeniden gönder" düğmeleri kesiliyordu.
     Hücre tüm satırı kaplar, kapsayıcı tam genişliğe uzar, düğmeler sarılır ve satırı paylaşır. */
  .lb-liste-kap td:has(> .lb-eylem), .lb-dosya td:has(> .lb-eylem) { grid-column: 1 / -1; align-items: stretch; }
  .lb-eylem { align-self: stretch; justify-content: flex-start; gap: 6px 8px; }
  .lb-eylem > .dugme:not(.ikon-dugme) { flex: 1 1 140px; justify-content: center; min-height: 40px; height: auto; }
  .lb-eylem > .ikon-dugme { min-width: 40px; min-height: 40px; }
}
tr[data-durum="iptal"] .lb-is, tr[data-durum="yeniden_yapim"] .lb-is { color: var(--metin3); }

/* hasta seçici (iş kipi) */
.lb-hasta { min-width: 0; }
.lb-sonuc { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lb-sonuc:empty { display: none; }
.lb-sonuc-oge { width: 100%; text-align: left; padding: 8px 10px; min-height: 44px; border: 1px solid var(--cizgi); border-radius: var(--r-k); background: var(--yuzey);
  color: var(--metin); font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.lb-sonuc-oge:hover, .lb-sonuc-oge:focus-visible { border-color: var(--vurgu); }
.lb-sonuc-oge:focus-visible { outline: 2px solid var(--vurgu); outline-offset: 2px; }
.lb-secili { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; background: var(--vurgu-zemin); border-radius: var(--r-k); min-width: 0;
  overflow-wrap: anywhere; }
.lb-bolumlu { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lb-randevu { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: end; }

/* ayrıntı çekmecesi */
.lb-tel { white-space: nowrap; }
.uyari-kutu .lb-tel { display: inline-block; margin-top: 4px; }
.lb-adimlar { max-width: 100%; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
.lb-metin { margin: 0; padding: 8px 10px; border-radius: var(--r-k); background: var(--yuzey2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lb-gecmis { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-13); }
.lb-gecmis > li { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border-left: 3px solid var(--cizgi2); background: var(--yuzey2); border-radius: var(--r-k);
  overflow-wrap: anywhere; }
.lb-gecmis > li[data-olay="asama"] { border-left-color: var(--vurgu); }
.lb-gecmis-not { white-space: pre-wrap; color: var(--metin2); }
.lb-gecmis-kim { font-size: var(--fs-12); }

/* hasta kartı bölümü */
.lb-dosya { min-width: 0; }

/* Bugün kartı */
.lb-bugun-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lb-bugun-liste > li { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 3px solid var(--cizgi); min-width: 0; overflow-wrap: anywhere; }
.lb-bugun-liste > li[data-ton="uyari"] { border-left-color: var(--uyari); }
.lb-bugun-liste > li[data-ton="bilgi"] { border-left-color: var(--vurgu); }
.lb-bugun-oge { display: block; max-width: 100%; padding: 2px 0; min-height: 24px; border: 0; background: none; color: var(--metin); font: inherit; text-align: left;
  cursor: pointer; overflow-wrap: anywhere; }
.lb-bugun-oge:hover strong { color: var(--vurgu); }
.lb-bugun-oge:focus-visible { outline: 2px solid var(--vurgu); outline-offset: 2px; border-radius: 4px; }
.lb-bugun-alt { font-size: var(--fs-12); }
.lb-bugun-ek { gap: 6px 14px; font-size: var(--fs-13); }

@media (max-width: 559px) {
  .lb-arac .lb-secim { flex: 1 1 160px; }
  .lb-randevu { grid-template-columns: 1fr; }
  .lb-eylem { justify-content: flex-start; }
}
