/* Yoyo Sohbet */
.ch { display: flex; height: 100%; min-height: 0; }
.ch-list { width: 340px; flex: none; display: flex; flex-direction: column; border-inline-end: 1px solid var(--line); min-height: 0; }
.ch-lhead { display: flex; align-items: center; gap: 6px; padding: 12px; flex: none; }
.ch-rooms { flex: 1; overflow-y: auto; min-height: 0; padding: 0 6px 8px; }
.ch-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; position: relative; }

/* Yuvarlaklar */
.ch-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 700; overflow: hidden; background: var(--blue); }
.ch-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-av.grp { background: #e2e8f0; color: #475569; }
.ch-av.grp svg { width: 22px; height: 22px; fill: currentColor; }
.ch-av.sm { width: 28px; height: 28px; font-size: 12px; }

/* Sohbet listesi */
.ch-room { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px; border-radius: 10px; text-align: start; min-width: 0; color: var(--ink); }
.ch-room:hover { background: #f1f5f9; }
.ch-room.on { background: var(--blue-l); }
.ch-rmain { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ch-rtop, .ch-rsub { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ch-rtop b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ch-rtop time { font-size: 12px; color: var(--mute); flex: none; }
.ch-muted { display: inline-grid; flex: none; color: #94a3b8; }
.ch-muted svg { width: 15px; height: 15px; fill: currentColor; }
.ch-prev { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--mute); }
.ch-room.unread .ch-prev { color: var(--ink); font-weight: 500; }
.ch-room.unread .ch-rtop time { color: var(--blue-d); font-weight: 600; }
.ch-cnt { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.ch-cnt.off { background: #94a3b8; }
.ch-hh { padding: 14px 10px 6px; }

/* Oda basligi */
.ch-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.ch-back { display: none; }
.ch-title { flex: 1; min-width: 0; display: grid; }
.ch-title b, .ch-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-title b { font-weight: 600; }
.ch-title span { font-size: 13px; color: var(--mute); }
.ch-find { display: flex; align-items: center; gap: 6px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); flex: none; }

/* Akis */
.ch-body { flex: 1; min-height: 0; position: relative; display: flex; }
.ch-scroll { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.ch-msgs { padding: 12px 16px 10px; display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.ch-msgs > .ys-empty { margin: auto 0; }
.ch-hits { position: absolute; inset: 0; background: var(--panel); overflow-y: auto; z-index: 3; }
.ch-hits button { display: grid; gap: 2px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: start; padding: 10px 16px; min-width: 0; }
.ch-hits button:hover { background: #f8fafc; }
.ch-hits button > span:first-child { display: flex; gap: 8px; align-items: baseline; }
.ch-hits b { flex: 1; font-weight: 600; font-size: 14px; }
.ch-hits time { font-size: 12px; color: var(--mute); }
.ch-day { display: flex; justify-content: center; padding: 12px 0 8px; }
.ch-day span { font-size: 12px; font-weight: 600; color: var(--mute); }
.ch-m { margin-top: 2px; border-radius: 10px; }
.ch-m.first { margin-top: 10px; }
.ch-m.flash .ch-b { outline: 2px solid var(--amber); outline-offset: 2px; }
.ch-row { display: flex; align-items: flex-end; gap: 6px; }
.ch-m.mine .ch-row { flex-direction: row-reverse; }
.ch-who { width: 28px; flex: none; display: inline-grid; }
.ch-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(560px, 76%); }
.ch-m.mine .ch-col { align-items: flex-end; }
.ch-name { font-size: 12px; font-weight: 600; color: var(--mute); padding: 0 12px 2px; }
.ch-b { background: #eef2f7; border-radius: 18px; padding: 7px 12px; min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 4px; }
.ch-m.mine .ch-b { background: var(--blue); color: #fff; }
.ch-m.other:not(.first) .ch-b { border-start-start-radius: 6px; }
.ch-m.other:not(.last) .ch-b { border-end-start-radius: 6px; }
.ch-m.mine:not(.first) .ch-b { border-start-end-radius: 6px; }
.ch-m.mine:not(.last) .ch-b { border-end-end-radius: 6px; }
.ch-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-t a { color: var(--blue-d); }
.ch-m.mine .ch-t a { color: #fff; }
.ch-meta { font-size: 11px; color: var(--mute); align-self: flex-end; line-height: 1.2; white-space: nowrap; }
.ch-m.mine .ch-meta { color: #dbeafe; }
.ch-b.gone { background: none; border: 1px solid var(--line); color: var(--mute); }
.ch-m.mine .ch-b.gone { background: none; color: var(--mute); }
.ch-m.mine .ch-b.gone .ch-meta { color: var(--mute); }
.ch-gone { font-style: italic; }
.ch-q { border: 0; border-inline-start: 3px solid #94a3b8; background: rgba(15, 23, 42, .06); border-radius: 8px; padding: 5px 9px; text-align: start; display: grid; min-width: 0; max-width: 100%; font-size: 13px; color: inherit; }
.ch-m.mine .ch-q { background: rgba(255, 255, 255, .18); border-inline-start-color: #dbeafe; }
.ch-q b { font-weight: 600; }
.ch-q span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.ch-img { border: 0; padding: 0; background: #e2e8f0; border-radius: 12px; overflow: hidden; display: block; max-width: 100%; }
.ch-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-b.pic { padding: 4px 4px 6px; }
.ch-b.pic .ch-meta { padding-inline-end: 8px; }
.ch-file { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.ch-file svg { width: 26px; height: 26px; fill: currentColor; flex: none; opacity: .8; }
.ch-file span { display: grid; min-width: 0; }
.ch-file b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-file small { font-size: 12px; opacity: .8; }
.ch-rx { display: flex; gap: 4px; flex-wrap: wrap; margin: -4px 8px 2px; position: relative; }
.ch-rx button { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 1px 7px; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; line-height: 1.5; }
.ch-rx button.on { border-color: var(--blue); background: var(--blue-l); }
.ch-rx small { font-size: 12px; font-weight: 600; color: #334155; }
.ch-seen { font-size: 11px; color: var(--mute); padding: 2px 6px 0; }
.ch-act { visibility: hidden; align-self: center; }
.ch-row:hover .ch-act, .ch-act:focus-visible { visibility: visible; }
.ch-down { position: absolute; inset-inline-end: 16px; bottom: 12px; z-index: 2; height: 36px; min-width: 36px; padding: 0 8px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 600; font-size: 13px; color: #334155; box-shadow: var(--sh); }
.ch-down.txt { padding: 0 14px 0 8px; color: var(--blue-d); }
.ch-down svg { width: 20px; height: 20px; fill: currentColor; }

/* Yazma alani */
.ch-foot { flex: none; padding: 8px 12px 12px; }
.ch-compose { display: flex; align-items: flex-end; gap: 4px; border: 1px solid var(--line); border-radius: 22px; padding: 3px; background: var(--panel); }
.ch-compose:focus-within { border-color: var(--blue); }
.ch-compose textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: none; padding: 8px 4px; line-height: 1.4; max-height: 150px; overflow-y: auto; }
.ch-compose .ys-icon { border-radius: 50%; }
.ch-send { color: var(--blue); }
.ch-ctx { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; margin-bottom: 6px; border-inline-start: 3px solid var(--blue); background: #f1f5f9; border-radius: 8px; }
.ch-ctxt { flex: 1; min-width: 0; display: grid; font-size: 13px; }
.ch-ctxt b { font-weight: 600; }
.ch-ctxt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }
.ch-blocked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px; color: var(--mute); flex-wrap: wrap; }

/* Mesaj menusu */
.ch-react { display: flex; gap: 2px; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ys-menu .ch-react button { padding: 4px; width: 36px; height: 36px; justify-content: center; font-size: 20px; border-radius: 50%; }
.ys-menu .ch-react button.on { background: var(--blue-l); }

/* Kisi secme, uyeler */
.ch-pick, .ch-members { display: grid; gap: 10px; }
.ch-members > .ys-btn { justify-self: start; }
.ch-people { display: grid; max-height: 300px; overflow-y: auto; min-height: 40px; }
.ch-person { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 8px; border-radius: 10px; text-align: start; min-width: 0; width: 100%; }
button.ch-person:hover { background: #f1f5f9; }
.ch-person > span:not(.ch-av) { display: grid; min-width: 0; flex: 1; }
.ch-person b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-person small { font-size: 13px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-person em { font-style: normal; font-size: 13px; color: var(--mute); flex: none; }
.ch-none { margin: 0; padding: 8px; }
.ch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--blue-l); color: var(--blue-d); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 13px; font-weight: 600; }
.ch-chip button { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; color: inherit; }
.ch-chip button:hover { background: rgba(37, 99, 235, .15); }
.ch-chip svg { width: 14px; height: 14px; fill: currentColor; }

/* Buyuk resim */
.ch-light { position: fixed; inset: 0; z-index: 120; background: rgba(15, 23, 42, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 16px 16px; }
.ch-light > img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.ch-lbar { position: absolute; inset: 0 0 auto 0; display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 16px; color: #fff; }
.ch-lbar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ch-lbar .ys-icon { color: #fff; }
.ch-lbar .ys-icon:hover { background: rgba(255, 255, 255, .16); }

@media (hover: none), (pointer: coarse) {
  .ch-act { display: none; }
}
@media (max-width: 760px) {
  .ch-list { width: 100%; border: 0; }
  .ch-pane { display: none; }
  .ch.open .ch-list { display: none; }
  .ch.open .ch-pane { display: flex; }
  .ch-back { display: inline-grid; }
  .ch-head { padding: 8px 6px; gap: 8px; }
  .ch-msgs { padding: 10px 10px 8px; }
  .ch-col { max-width: 84%; }
  .ch-foot { padding: 6px 8px 8px; }
}
