/* ===== TML Destek — sohbet (WhatsApp tarzı, TML renkleriyle) ===== */
.tmld {
  --d-vurgu: #f5b400; --d-lacivert: #14213d; --d-gri: #667781;
  --d-ben: #fdf0c2; --d-karsi: #fff; --d-zemin: #efeae2; --d-mavi: #34b7f1;
  position: relative; display: flex; flex-direction: column;
  max-width: 760px; margin: 0 auto; height: 620px; min-height: 420px;
  border-radius: 20px; overflow: hidden; background: var(--d-zemin);
  box-shadow: 0 10px 30px rgba(20, 33, 61, .12);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #111b21; -webkit-font-smoothing: antialiased; line-height: 1.4;
}
.tmld *, .tmld *::before, .tmld *::after { box-sizing: border-box; }
.tmld [hidden] { display: none !important; }
.tmld button, .tmld textarea, .tmld input, .tmld strong { font-family: inherit !important; }
.tmld svg { display: block; }

/* Üst çubuk */
.tmld-ust { flex-shrink: 0; display: flex; align-items: center; gap: 11px; padding: 11px 14px; color: #fff;
  background: radial-gradient(220px 120px at 90% 0, rgba(245,180,0,.22), transparent 70%), linear-gradient(135deg, #2a2d35, #15171c 70%); }
.tmld-avatar { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--d-vurgu); color: #1a1a1a; font-weight: 800; font-size: 18px; box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.tmld-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tmld-avatar.buyuk { width: 72px; height: 72px; font-size: 30px; }
.tmld-ust-metin { min-width: 0; display: flex; flex-direction: column; }
.tmld-ust-metin strong { font-size: 15.5px; font-weight: 800; line-height: 1.2; }
.tmld-ust-metin small { font-size: 12px; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mesaj alanı */
.tmld-govde { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 4% 14px;
  background-color: var(--d-zemin);
  background-image: radial-gradient(rgba(20,33,61,.045) 1.2px, transparent 1.3px), radial-gradient(rgba(245,180,0,.07) 1.2px, transparent 1.3px);
  background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px; }
.tmld-mesajlar { display: flex; flex-direction: column; gap: 2px; }
.tmld-gun { display: flex; justify-content: center; margin: 10px 0 6px; position: sticky; top: 2px; z-index: 1; }
.tmld-gun span { background: #fff; color: var(--d-gri); font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }

.tmld-satir { display: flex; flex-direction: column; max-width: 82%; }
.tmld-satir.ilk { margin-top: 8px; }
.tmld-satir.ben { align-self: flex-end; align-items: flex-end; }
.tmld-satir.karsi { align-self: flex-start; align-items: flex-start; }
.tmld-balon { position: relative; padding: 6px 9px 7px; border-radius: 10px; font-size: 14.5px; box-shadow: 0 1px .5px rgba(11,20,26,.13); min-width: 80px; }
.tmld-satir.ben .tmld-balon { background: var(--d-ben); }
.tmld-satir.karsi .tmld-balon { background: var(--d-karsi); }
.tmld-satir.ben.ilk .tmld-balon { border-top-right-radius: 0; }
.tmld-satir.karsi.ilk .tmld-balon { border-top-left-radius: 0; }
.tmld-satir.ilk .tmld-balon::before { content: ''; position: absolute; top: 0; width: 10px; height: 13px; }
.tmld-satir.ben.ilk .tmld-balon::before { right: -8px; background: var(--d-ben); clip-path: polygon(0 0, 100% 0, 0 100%); }
.tmld-satir.karsi.ilk .tmld-balon::before { left: -8px; background: var(--d-karsi); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.tmld-metin { white-space: normal; overflow-wrap: anywhere; word-break: break-word; padding-right: 2px; }
.tmld-metin a { color: #027eb5; text-decoration: underline; }
/* Saati son satırın sağına yerleştirmek için görünmez boşluk */
.tmld-metin::after { content: ''; display: inline-block; width: 62px; }
.tmld-satir.karsi .tmld-metin::after { width: 40px; }
.tmld-zaman { position: absolute; right: 8px; bottom: 4px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--d-gri); line-height: 1; white-space: nowrap; }
.tmld-tik { width: 16px; height: 11px; color: #8696a0; }
.tmld-tik.cift { width: 18px; }
.tmld-tik.okundu { color: var(--d-mavi); }
.tmld-tik.bekliyor { width: 13px; height: 13px; }
.tmld-karsilama { background: #fff; }
.tmld-karsilama .tmld-metin::after { display: none; }
.tmld-satir.gonderiliyor .tmld-balon { opacity: .85; }
.tmld-satir.hata .tmld-balon { opacity: .6; }
.tmld-tekrar { margin-top: 4px; border: 0; background: #fee2e2; color: #991b1b; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; cursor: pointer; }

/* Resimli balon */
.tmld-balon.resimli { padding: 3px 3px 6px; }
.tmld-resim { display: block; border-radius: 8px; overflow: hidden; max-width: 260px; background: rgba(0,0,0,.05); }
.tmld-resim img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.tmld-balon.resimli .tmld-metin { padding: 5px 6px 0; }
.tmld-balon.resimli:not(:has(.tmld-metin)) .tmld-zaman { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); bottom: 9px; right: 10px; }
.tmld-balon.resimli:not(:has(.tmld-metin)) .tmld-tik { color: #fff; }
.tmld-balon.resimli:not(:has(.tmld-metin)) .tmld-tik.okundu { color: #9fe3ff; }

/* Fotoğraf önizleme */
.tmld-onizleme { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f7f5f1; border-top: 1px solid rgba(0,0,0,.06); }
.tmld-onizleme img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.tmld-onizleme span { flex: 1; font-size: 13px; font-weight: 600; color: var(--d-gri); }
.tmld-onizleme button { border: 0; background: #e9e5de; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 13px; color: #333; }

/* Yazma çubuğu */
.tmld-alt { flex-shrink: 0; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: #f0f2f5; margin: 0; }
.tmld .tmld-alt textarea { flex: 1; min-width: 0; resize: none; max-height: 140px; margin: 0 !important; border: 0 !important; outline: 0 !important; box-shadow: 0 1px 1px rgba(0,0,0,.06) !important;
  background: #fff !important; color: #111b21 !important; border-radius: 22px !important; padding: 11px 16px !important; font-size: 15px !important; line-height: 1.35 !important; height: 44px; }
.tmld-ek-btn { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #54656f; cursor: pointer; border-radius: 50%; margin: 0; }
.tmld-ek-btn:hover { background: rgba(0,0,0,.05); }
.tmld-ek-btn svg { width: 23px; height: 23px; transform: rotate(-45deg); }
.tmld .tmld-gonder { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50% !important; border: 0 !important; padding: 0 !important; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: var(--d-vurgu) !important; color: #1a1a1a !important; box-shadow: 0 4px 12px -4px rgba(245,180,0,.9); }
.tmld-gonder svg { width: 21px; height: 21px; margin-left: 2px; }

/* Işık kutusu */
.tmld-isik { position: absolute; inset: 0; z-index: 5; background: rgba(10,12,16,.92); display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 14px; }
.tmld-isik img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* Giriş gerekli */
.tmld-giris { height: auto; min-height: 0; padding: 36px 20px; align-items: center; justify-content: center; text-align: center; background: #fff; }
.tmld-giris-ic { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tmld-giris strong { font-size: 18px; font-weight: 800; }
.tmld-giris p { margin: 0; color: var(--d-gri); font-size: 14px; }
.tmld .tmld-btn { margin-top: 8px; display: inline-block; background: var(--d-vurgu); color: #1a1a1a !important; font-weight: 800; padding: 12px 22px; border-radius: 14px; text-decoration: none !important; }

@media (max-width: 600px) {
  .tmld { border-radius: 16px; }
  .tmld-satir { max-width: 86%; }
}
