/* Scoped messenger presentation: existing transport and permissions remain authoritative. */
.over_chat { background: rgba(35,19,31,.34); backdrop-filter: blur(4px); }
.over_chat:not(.active) { visibility: hidden; pointer-events: none; }
.over_chat .chats { --chat-ink:#352331; --chat-muted:#827780; --chat-accent:#c43d75; position:fixed; inset:50% auto auto 50%; transform:translate(-50%,-50%); width:min(1080px,calc(100vw - 64px)); height:min(780px,calc(100dvh - 64px)); display:grid; grid-template-columns:300px minmax(0,1fr); overflow:hidden; border-radius:24px; box-shadow:0 24px 100px #29142133; background:white; color:var(--chat-ink); font:15px/1.5 system-ui,sans-serif; transition:none; }
.chats *, .chats *::before, .chats *::after { box-sizing:border-box; }
.chats button, .chats input, .chats textarea { font-family:inherit; }
.chats button { touch-action:manipulation; }
.chats button:focus-visible, .chats a:focus-visible, .chats input:focus-visible { outline:2px solid var(--chat-accent); outline-offset:3px; }
.chats [hidden] { display:none !important; }
.chats .chat-sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.chats .dialogs { display:flex !important; flex-direction:column; min-width:0; min-height:0; border-right:1px solid #f0e9ed; background:#fffdfe; }
.chats .honeychat { background:white; color:var(--chat-ink); min-height:82px; padding:20px 24px; justify-content:space-between; text-align:left; font-size:24px; flex-shrink:0; }
.chats .close, .chats .back { position:static; width:36px; height:36px; flex:0 0 36px; display:grid; place-items:center; padding:0; color:var(--chat-muted); background:transparent; border:0; border-radius:50%; font-size:27px; cursor:pointer; }
.chats .close:hover, .chats .back:hover { background:#f8edf2; opacity:1; }
.chats .chats-tabs { display:flex; gap:4px; padding:0 16px 12px; margin:0; border:0; background:none; }
.chats .chats-tabs .tab-btn { flex:1; padding:9px 6px; font-size:12px; border:0; border-radius:10px; background:none; color:var(--chat-muted); box-shadow:none; }
.chats .chats-tabs .tab-btn.active { color:var(--chat-accent); background:#faeaf1; }
.chats .chat-search { margin:0 16px 16px; display:block; }
.chats .chat-search input { display:block; width:100%; min-width:0; height:42px; padding:10px 14px; border:1px solid #eee5eb; border-radius:12px; background:#faf7f9; color:var(--chat-ink); font-size:14px; }
.chats .tab-content { overflow-y:auto; min-height:0; padding:0 10px 16px; }
.chats .dialog { margin:0 0 5px; border:0; border-radius:14px; padding:14px 12px; gap:12px; min-height:82px; align-items:center; }
.chats .dialog:hover { border:0; background:#fcf3f7; }
.chats .dialog.selected { background:#faeaf1; }
.chats .dialog.new_message { background:#fff7fa; }
.chats .dialog.selected.new_message { background:#faeaf1; }
.chats .dialog.new_message::after { width:7px; height:7px; top:18px; right:12px; background:var(--chat-accent); }
.chats .dialog .dialog-img { order:-1; width:46px; height:46px; margin:0; position:relative; }
.chats .dialog .dialog-inner { min-width:0; }
.chats .dialog .openChat { padding:0; font-size:14px; font-weight:650; color:var(--chat-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chats .last_message_text { padding:0; margin:5px 0 0; font-size:12px; color:var(--chat-muted); white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.chats .dialog .dialog-online { position:absolute; bottom:-2px; right:-2px; font-size:0; }
.chats .dialog .dialog-online .online { font-size:0; transform:none; }
.chats .dialog .dialog-online .online::before { width:10px; height:10px; border:2px solid white; }
.chats .chat-search-empty, .chats .no_messages { padding:20px; text-align:center; font-size:14px; color:var(--chat-muted); }
.chats .chat-welcome { align-self:center; text-align:center; padding:32px; color:var(--chat-muted); }
.chats .chat-welcome h2 { font:600 22px/1.4 system-ui; color:var(--chat-ink); margin:18px 0 10px; }
.chats .chat-welcome-mark { display:inline-grid; place-items:center; width:80px; height:80px; border-radius:28px; background:#fbeaf2; color:var(--chat-accent); font-size:48px; }
.chats.has-conversation .chat-welcome { display:none; }
.chats #set_chat { height:100%; min-height:0; min-width:0; overflow:hidden; }
.chats #set_chat.active { display:flex; flex-direction:column; }
.chats .conversation-header { min-height:82px; padding:16px 24px; border-bottom:1px solid #f2ebef; gap:12px; position:relative; z-index:2; }
.chats .conversation-header .back { display:none; }
.chats .conversation-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; }
.chats .conversation-person { flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:2px; font-size:16px; font-weight:650; }
.chats .conversation-person a { color:var(--chat-ink); text-decoration:none; max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.chats .conversation-presence, .chats .conversation-topic { font-size:12px; font-weight:400; color:var(--chat-muted); }
.chats .conversation-presence .online { font-size:12px; }
.chats .window .messages { padding:22px 24px; margin:0; gap:12px; height:auto; min-height:0; flex:1; scrollbar-width:thin; scrollbar-color:#e5dbe1 transparent; overscroll-behavior:contain; }
.chats .window .messages::-webkit-scrollbar { width:5px; }
.chats .window .messages::-webkit-scrollbar-thumb { background:#e5dbe1; border-radius:8px; }
.chats .chat-day { align-self:center; padding:4px 12px; margin:4px 0 10px; color:var(--chat-muted); font-size:12px; }
.chats .window .message { width:fit-content; max-width:82%; padding:12px 15px 8px; gap:5px; border:0; border-radius:18px; font-size:15px; line-height:1.5; }
.chats .window .me { background:#fce7f0; color:var(--chat-ink); border-bottom-right-radius:5px; }
.chats .window .not_me { background:#f5f2f4; color:var(--chat-ink); border-bottom-left-radius:5px; }
.chats .window .message .date { color:#91838c; font-size:10px; line-height:1.3; align-self:flex-end; margin:0; }
.chats .window .message.has-attachments { width:360px; padding:6px; }
.chats .has-attachments .message-text { padding:3px 8px 0; }
.chats .has-attachments .date { padding:0 8px 4px; }
.chats .window .message-photos img { height:170px; border-radius:12px; display:block; }
.chats .window .message-photos a:only-child img { height:auto; max-height:290px; object-fit:cover; }
.chats .window .message.has-voice { width:320px; }
.chats .message-voice > span { font-size:12px; color:var(--chat-muted); }
.chats .voice-player { display:flex; align-items:center; gap:10px; padding:6px 0; }
.chats .voice-play { width:40px; height:40px; border-radius:50%; background:var(--chat-accent); color:white; border:0; flex-shrink:0; font-size:15px; cursor:pointer; }
.chats .voice-track { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.chats .voice-track input { width:100%; min-width:0; accent-color:var(--chat-accent); cursor:pointer; }
.chats .voice-clock { font-size:11px; color:var(--chat-muted); font-variant-numeric:tabular-nums; }
.chats .voice-speed { border:0; padding:5px; border-radius:6px; background:transparent; color:var(--chat-muted); font-size:11px; cursor:pointer; }
.chats .window .send_message { position:relative; width:calc(100% - 40px); margin:0 20px 20px; padding:12px; border:1px solid #e9dfe5; border-radius:20px; flex-shrink:0; background:white; box-shadow:0 3px 12px #29142104; }
.chats .window .send_message:focus-within { border-color:#d69bb6; }
.chats .window .send_message textarea { width:100%; margin:0; min-height:42px; max-height:120px; padding:8px; border:0; outline:0; border-radius:0; box-shadow:none; background:transparent; font:16px/1.5 system-ui; color:var(--chat-ink); }
.chats .window .send_message textarea::placeholder { color:#a2949d; }
.chats .window .composer-toolbar { display:flex; flex-wrap:nowrap; gap:8px; align-items:center; }
.chats .window .composer-toolbar button { display:grid; place-items:center; width:40px; height:40px; min-width:40px; min-height:40px; padding:0; border:0; border-radius:50%; background:#f7f3f5; color:var(--chat-ink); cursor:pointer; }
.chats .window .composer-toolbar .attachment-toggle { font-size:28px; font-weight:300; }
.chats .window .composer-toolbar .emoji-toggle { font-size:0; line-height:1; }
.chats .window .composer-toolbar button { position:relative; line-height:1; }
.chats .window .composer-toolbar svg { display:block; margin:auto; flex-shrink:0; }
.chats .window .composer-toolbar .voice-record { margin-left:auto; }
.chats .voice-record svg { width:20px; height:20px; }
.chats .window .composer-toolbar .chat-send { margin:0; font-size:0; background:var(--chat-accent); color:white; box-shadow:none; }
.chats .chat-send::after { content:''; position:absolute; left:50%; top:50%; width:21px; height:21px; background:currentColor; clip-path:polygon(0 0,100% 50%,0 100%,16% 58%,60% 50%,16% 42%); transform:translate(-50%,-50%) rotate(-32deg); }
.chats .window .send_message .composer-status { font-size:12px; color:var(--chat-muted); margin:6px 8px 0; min-height:0; }
.chats .composer-status:empty { display:none; }
.chats .attachment-menu { position:absolute; left:12px; bottom:68px; z-index:5; width:240px; padding:6px; border-radius:14px; background:white; border:1px solid #eee4ea; box-shadow:0 12px 36px #3523311f; }
.chats .attachment-menu button { display:block; width:100%; text-align:left; padding:10px 12px; border:0; background:white; border-radius:9px; color:var(--chat-ink); font-size:14px; cursor:pointer; }
.chats .attachment-menu button:hover { background:#fcf0f5; }
.chats .attachment-menu small { display:block; margin-top:3px; font-size:11px; color:var(--chat-muted); }
.chats .window .emoji-panel { position:absolute; bottom:68px; left:12px; right:12px; z-index:5; max-height:240px; background:white; box-shadow:0 12px 36px #3523311f; border-color:#eee4ea; border-radius:14px; }
.chats .window .emoji-category { font-size:11px; }
.chats .voice-recording { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:13px; }
.chats .voice-timer::before { content:'●'; color:#cf3975; margin-right:7px; }
.chats .window .photo-preview-list { max-height:100px; overflow:auto; }
.chats .window .photo-preview img { width:76px; height:70px; }
.chats .window .photo-preview { flex-basis:76px; }
.chats .photo-upload-progress progress { accent-color:var(--chat-accent); height:6px; }
.chats .window .form_loader { background:#fff8fb; color:var(--chat-accent); }
.chats .window .form_loader svg path { fill:var(--chat-accent); }
.chats .chat-loading-back { display:none; }
@media(max-width:700px) {
 .over_chat .chats { inset:0; transform:none; width:100%; height:var(--chat-mobile-height,100dvh); border-radius:0; grid-template-columns:minmax(0,1fr); }
 .chats .chat-loading-back { display:grid; position:absolute; top:12px; left:12px; z-index:5; }
 .chats.has-conversation .dialogs { display:none !important; }
 .chats .chat-welcome { display:none; }
 .chats .dialogs { border:0; }
 .chats .conversation-header { min-height:72px; padding:12px 14px; }
 .chats .conversation-header .back { display:grid; }
 .chats .window .messages { padding:18px 14px; }
 .chats .window .message { max-width:88%; }
 .chats .window .send_message { width:calc(100% - 20px); margin:0 10px max(10px,env(safe-area-inset-bottom)); padding:8px; border-radius:18px; }
 .chats .window .composer-toolbar button { width:44px; height:44px; }
 .chats .window .emoji-panel { bottom:64px; }
 .chats .conversation-avatar { width:36px; height:36px; }
}
@media(prefers-reduced-motion:reduce) { .chats *, .chats *::before { animation:none !important; transition:none !important; } }
.chat-start-feedback, .ad-detail__contacts > .chat-start-feedback {
    flex-basis: 100%;
    grid-column: 1 / -1;
    margin: 8px 0 0;
    color: #71314c;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
}
.chat-start-feedback:empty { display: none; }
