/* =====================================================
   chat.css - Üstten açılan mesaj balonu + sohbet penceresi
   Tüm CSS dosyalarından SONRA yüklenir. Sade, turuncuyla uyumlu, açık/koyu tema.
   ===================================================== */

/* ---------- Üstten açılan mesaj balonu ---------- */
#liveNotificationToast.msg-toast {
    position: fixed; z-index: 99999; left: 50%; top: calc(-140px - var(--sat, 0px));
    transform: translateX(-50%); width: min(420px, calc(100% - 24px)); box-sizing: border-box;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
    padding: 12px 12px 14px 14px; border-radius: 20px; cursor: pointer; overflow: hidden;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid #FF7A1A;
    box-shadow: 0 10px 30px rgba(28, 34, 48, 0.14);
    transition: top .35s cubic-bezier(.2, .9, .3, 1.2);
}
#liveNotificationToast.msg-toast.show { top: calc(12px + var(--sat, 0px)); }
.msg-toast-avatar {
    width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #FFEADB; color: #E05A00; font-size: 18px; font-weight: 800;
}
.msg-toast-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-toast-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.msg-toast-name { font-size: 14px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-toast-time { font-size: 11px; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.msg-toast-listing {
    font-size: 11.5px; font-weight: 700; color: #E05A00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-toast-listing::before { content: '\f02b'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-right: 5px; font-size: 10px; }
.msg-toast-text {
    font-size: 13px; line-height: 1.4; color: var(--ink-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.msg-toast-close {
    width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--fill); color: var(--muted);
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; align-self: start;
}
.msg-toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.msg-toast-bar i { display: block; height: 100%; background: #FFB27A; transform-origin: left center; }
body.dark-mode #liveNotificationToast.msg-toast { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
body.dark-mode .msg-toast-avatar { background: rgba(255, 122, 26, 0.16); color: #FFB27A !important; }
body.dark-mode .msg-toast-name { color: var(--ink) !important; }
body.dark-mode .msg-toast-listing { color: #FFB27A !important; }
body.dark-mode .msg-toast-time { color: var(--muted) !important; }

/* ---------- Ad soyad sorma penceresi (names.js) ---------- */
#askNameModal { z-index: 100003 !important; align-items: center; justify-content: center; padding: 16px; }
.ask-name-box {
    width: 100%; max-width: 380px; background: var(--surface); border-radius: 22px; padding: 22px 18px;
    display: flex; flex-direction: column; gap: 12px; text-align: center;
}
.ask-name-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 18px; background: #FFEADB; color: #E05A00; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ask-name-box h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ink); }
.ask-name-box p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------- Güvenlik: sohbet menüsü, profil şikayet/engelle (safety.js) ---------- */
.chat-more-btn {
    width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; margin-left: auto; margin-right: 8px;
    background: var(--fill); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.safety-sheet { align-items: flex-end !important; padding: 0 !important; z-index: 100002 !important; }
.safety-sheet-box {
    width: 100%; max-width: 480px; margin: 0 auto; background: var(--surface); border-radius: 22px 22px 0 0;
    padding: 10px 12px calc(14px + var(--sab, 0px)); display: flex; flex-direction: column; gap: 6px;
}
.safety-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; border: none; border-radius: 14px;
    background: var(--fill); color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-align: left;
}
.safety-item i { width: 20px; text-align: center; color: var(--muted); }
.safety-item.is-danger, .safety-item.is-danger i { color: #E0414E; }
.safety-item.is-cancel { justify-content: center; background: transparent; color: var(--muted); }
.up-safety { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.up-safety button {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-family: inherit; font-size: 12.5px; font-weight: 700;
}
.up-safety button.is-danger { color: #E0414E; }
.app-version-line { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 18px; }

/* Hesabım > en alt: sosyal medya hesaplarımız */
.social-links { margin-top: 18px; text-align: center; }
.social-links-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.social-links-row { display: flex; justify-content: center; gap: 10px; }
.social-link { flex: 1 1 0; max-width: 118px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.social-link:active { transform: scale(.97); }
.social-link-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 22px; margin-bottom: 2px; }
.social-link-icon.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-link-icon.fb { background: #1877F2; }
.social-link-icon.wa { background: #25D366; }
.social-link-name { font-size: 12.5px; font-weight: 800; }
.social-link-user { font-size: 10.5px; line-height: 1.25; color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }

/* ---------- Hesap ve Gizlilik (account.js) ---------- */
.account-privacy { display: flex; flex-direction: column; gap: 12px; }
.ap-title { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); }
.ap-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px; }
.ap-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 13px; }
.ap-row + .ap-row { border-top: 1px solid var(--line); }
.ap-row span { color: var(--muted); font-weight: 600; }
.ap-row strong { color: var(--ink); font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.ap-info { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.ap-info i { color: #12A866; margin-top: 3px; }
/* Hesap silme: sayfanın en altında, göze batmayan küçük bağlantı */
.ap-danger-zone { margin-top: 40px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: center; }
.ap-delete-link {
    background: none; border: none; padding: 6px 10px; cursor: pointer; font-family: inherit;
    font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: underline;
}

/* ---------- Sohbet penceresi ---------- */
.chat-room-pane.active { gap: 0; }

/* Konuşulan ilan kartı */
.chat-listing-card {
    border: 1px solid var(--line) !important; box-shadow: none !important; border-radius: 18px !important;
    padding: 10px 12px !important; margin-bottom: 10px !important; background: var(--surface) !important;
}
.chat-listing-card img { border-radius: 12px !important; }
.chat-listing-price { color: #E05A00 !important; }

/* Mesaj alanı: hafif sıcak zemin */
.chat-messages-box {
    background: #FFF8F2 !important; border-radius: 20px !important; border: 1px solid #FFEADB !important;
    padding: 10px 10px 12px !important; gap: 6px !important; margin-bottom: 8px !important;
}
body.dark-mode .chat-messages-box { background: var(--canvas) !important; border-color: var(--line) !important; }
.chat-day-sep span { background: var(--surface) !important; border: 1px solid var(--line); color: var(--muted) !important; }

/* Baloncuklar */
.chat-bubble-modern { box-shadow: none !important; font-size: 14.5px !important; padding: 9px 12px 6px !important; }
.chat-bubble-modern.incoming {
    background: var(--surface) !important; color: var(--ink) !important; border: 1px solid #F1E4D8 !important;
}
.chat-bubble-modern.outgoing { background: #FF7A1A !important; color: #fff !important; }
body.dark-mode .chat-bubble-modern.incoming { border-color: var(--line) !important; }
body.dark-mode .chat-bubble-modern.outgoing, body.dark-mode .chat-bubble-modern.outgoing * { color: #fff !important; }
.chat-bubble-modern.outgoing .chat-bubble-footer { color: rgba(255, 255, 255, 0.9) !important; }
.chat-bubble-img { border-radius: 14px !important; }
.chat-seen.is-read { color: #E05A00 !important; }
.chat-empty-hint i { background: #FFEADB !important; color: #FF7A1A !important; border-radius: 18px !important; }

/* Yazıyor göstergesi */
.typing-dots { box-shadow: none !important; border: 1px solid #F1E4D8; }
.typing-dots i { background: #FFB27A !important; }

/* Hazır mesaj çipleri */
.chat-quick-chip { background: #FFF1E6 !important; border: 1px solid #FFD9BD !important; color: #E05A00 !important; font-weight: 700 !important; }
body.dark-mode .chat-quick-chip { background: rgba(255, 122, 26, 0.12) !important; border-color: rgba(255, 154, 77, 0.3) !important; color: #FFB27A !important; }

/* Yazma alanı */
.chat-input-footer {
    display: flex !important; align-items: center !important; gap: 6px !important;
    background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: none !important;
    border-radius: 24px !important; padding: 7px !important;
}
.btn-chat-attach, .btn-chat-location {
    width: 38px; height: 38px; border-radius: 50% !important; flex-shrink: 0; padding: 0 !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    background: var(--fill) !important; color: var(--ink-2) !important; font-size: 16px !important; cursor: pointer;
}
.btn-chat-attach { color: #E05A00 !important; background: #FFF1E6 !important; }
.btn-chat-location { color: #12A866 !important; background: #DDF5E8 !important; }
body.dark-mode .btn-chat-attach { background: rgba(255, 122, 26, 0.14) !important; color: #FFB27A !important; }
body.dark-mode .btn-chat-location { background: rgba(18, 168, 102, 0.16) !important; color: #4ADE9C !important; }
/* "Mesajınızı yazın" alanı: yumuşak dolgu, yuvarlak, odaklanınca turuncu çerçeve */
.chat-input-footer input[type="text"], #chatReplyInput {
    flex: 1; min-width: 0; height: 42px; box-sizing: border-box;
    font-family: inherit; font-size: 15px !important; font-weight: 500;
    padding: 0 16px !important; border-radius: 999px !important;
    background: #FFF6EF !important; border: 1.5px solid #FFE3CC !important; outline: none;
    color: var(--ink) !important; transition: border-color .15s, background .15s;
}
#chatReplyInput::placeholder { color: #C9946B; font-weight: 500; opacity: 1; }
#chatReplyInput:focus { border-color: #FF9A4D !important; background: var(--surface) !important; }
body.dark-mode .chat-input-footer input[type="text"], body.dark-mode #chatReplyInput {
    background: rgba(255, 122, 26, 0.08) !important; border-color: rgba(255, 154, 77, 0.25) !important; color: var(--ink) !important;
}
body.dark-mode #chatReplyInput::placeholder { color: #B98A66; }
body.dark-mode #chatReplyInput:focus { border-color: #FF9A4D !important; background: var(--surface) !important; }
.btn-chat-send {
    width: 42px !important; height: 42px !important; flex-shrink: 0; border-radius: 50% !important;
    background: #FF7A1A !important; color: #fff !important; font-size: 15px !important; box-shadow: none !important;
}
.btn-chat-send:active { transform: scale(0.94); }

/* ---------- Mesajlar: sohbet seçenekleri (⋯), şikayet bayrağı, güvenlik menüsü v2 ---------- */
.chat-thread-card .chat-actions-right { top: auto !important; bottom: 8px !important; right: 8px !important; opacity: 1 !important; }
.chat-thread-card .chat-thread-bottom { padding-right: 34px; }
.btn-thread-more {
    width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    background: var(--fill); color: var(--ink-2); font-size: 14px; -webkit-tap-highlight-color: transparent;
}
.btn-thread-more:active { transform: scale(.92); background: var(--line); }
.chat-report-btn {
    margin-left: auto; width: auto !important; min-width: 0 !important; height: 34px !important; padding: 0 12px !important; border-radius: 999px !important; border: 1px solid #FBD5D8; cursor: pointer; flex-shrink: 0;
    background: #FFF4F5; color: #E0414E; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 800;
}
.chat-report-btn i { font-size: 13px; }
.chat-report-btn + .chat-more-btn { margin-left: 6px; }
@media (max-width: 360px) { .chat-report-btn span { display: none; } .chat-report-btn { width: 34px !important; padding: 0 !important; justify-content: center; } }

.safety-sheet-box { gap: 6px; padding-top: 6px; }
.si-head, .bl-head { display: flex; align-items: center; gap: 12px; padding: 2px 6px 10px; }
.si-av, .bl-av {
    width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 15px; object-fit: cover;
}
.si-head-txt, .bl-head-txt, .si-txt, .bl-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.si-head-txt b, .bl-head-txt b { font-size: 16px; font-weight: 800; color: var(--ink); }
.si-head-txt small, .bl-head-txt small { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.safety-item { padding: 12px 14px; min-height: 52px; }
.safety-item i { width: 34px; height: 34px; border-radius: 11px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.si-txt b { font-size: 14.5px; font-weight: 700; }
.si-txt small { font-size: 12px; font-weight: 600; color: var(--muted); }
.safety-item.is-warn i { color: #D97706; background: #FFF7E6; }
.safety-item.is-danger i { color: #E0414E; background: #FFF0F1; }
.safety-item.is-danger .si-txt b { color: #E0414E; }
.si-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.safety-item.is-cancel { min-height: 48px; }

/* Engellenen kullanıcılar */
.bl-head-ic { width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: #FFF0F1; color: #E0414E; font-size: 17px; flex-shrink: 0; }
.bl-list { display: flex; flex-direction: column; gap: 8px; max-height: 58vh; overflow-y: auto; padding: 2px; }
.bl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--fill); }
.bl-txt b { font-size: 14.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-txt small { font-size: 12px; font-weight: 600; color: #E0414E; }
.bl-unblock {
    flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.bl-unblock:active { transform: scale(.95); }
.bl-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 16px; }
.bl-empty-ic { width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; background: #E7F8EF; color: #0F9F5B; font-size: 24px; margin-bottom: 4px; }
.bl-empty b { font-size: 15px; font-weight: 800; color: var(--ink); }
.bl-empty small { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.45; max-width: 290px; }
.acc-tone-block i.left-icon { background: #FFF0F1; color: #E0414E !important; }
.bl-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #FFF0F1; color: #E0414E; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; }

/* Hesabım: "Bizi takip et" sosyal medya kartı */
.soc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 4px 14px rgba(28, 34, 48, .04); margin-top: 4px; }
.soc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.soc-head-ic { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand-600); font-size: 16px; flex-shrink: 0; }
.soc-head-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.soc-head-txt b { font-size: 15px; font-weight: 800; color: var(--ink); }
.soc-head-txt small { font-size: 12px; font-weight: 600; color: var(--muted); }
.soc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.soc-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 4px 10px; border-radius: 16px; text-decoration: none;
    background: var(--fill); color: var(--ink); -webkit-tap-highlight-color: transparent; transition: transform .12s ease; min-width: 0;
}
.soc-item:active { transform: scale(.95); }
.soc-ic { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 21px; margin-bottom: 4px; box-shadow: 0 6px 14px rgba(28, 34, 48, .12); }
.soc-item.is-ig .soc-ic { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.soc-item.is-tt .soc-ic { background: #111; box-shadow: -2px -2px 0 rgba(37, 244, 238, .55) inset, 2px 2px 0 rgba(254, 44, 85, .55) inset, 0 6px 14px rgba(28, 34, 48, .12); }
.soc-item.is-fb .soc-ic { background: #1877F2; }
.soc-item.is-wa .soc-ic { background: #25D366; }
.soc-name { font-size: 12px; font-weight: 800; }
.soc-user { font-size: 10px; font-weight: 600; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.social-link-icon.tt { background: #111; }
body.dark-mode .soc-card, body.dark-mode .bl-unblock { background: #1E2430 !important; border-color: #2C3443 !important; }
body.dark-mode .soc-item, body.dark-mode .bl-row { background: #262D3A !important; }
body.dark-mode .soc-name, body.dark-mode .soc-head-txt b, body.dark-mode .si-head-txt b, body.dark-mode .bl-head-txt b, body.dark-mode .bl-txt b, body.dark-mode .bl-empty b, body.dark-mode .bl-unblock { color: #fff !important; }
body.dark-mode .soc-ic, body.dark-mode .soc-ic i { color: #fff !important; }
body.dark-mode .chat-report-btn { background: rgba(224, 65, 78, .14) !important; border-color: rgba(224, 65, 78, .35) !important; color: #FF8A94 !important; }
body.dark-mode .safety-item i { background: #262D3A !important; }
