/* SocialPulsar · Mesajlar ve bildirimler — cam pencere (Lobby penceresiyle aynı dil). */
.msg-window[hidden],.ai-workspace:not([data-view="messages"]) .msg-window{display:none!important}
.msg-window{position:relative;z-index:1;display:grid;grid-template-columns:340px minmax(0,1fr);gap:10px;min-width:0;height:calc(100dvh - 40px);margin:20px 20px 20px 14px;padding:10px;overflow:hidden;
  border-radius:var(--radius-window);background:var(--glass-bg);backdrop-filter:var(--glass-filter);-webkit-backdrop-filter:var(--glass-filter);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);color:#fff;
  font-family:Inter,InterSP,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",sans-serif}
.msg-window svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.msg-window button{font:inherit;color:inherit}

/* rail: messages badge + bell */
.rail-badge,.icon-badge{position:absolute;top:-4px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ff5f6d;color:#fff;font-size:10.5px;font-weight:700;line-height:18px;text-align:center;box-shadow:0 0 0 2px rgba(255,255,255,.75);font-style:normal}
.rail-badge[hidden],.icon-badge[hidden]{display:none}
.ai-rail-item span{position:relative}
.ai-rail-bell{position:relative;display:grid;place-items:center;width:44px;height:44px;margin-bottom:4px;border-radius:50%;border:1px solid rgba(255,255,255,.22);background:var(--glass-chip);color:var(--on-glass-2);cursor:pointer;transition:background .2s,color .2s}
.ai-rail-bell:hover{background:var(--glass-chip-hover);color:#fff}

.home .home-messages .icon-badge{top:-2px;right:-2px}


/* left column */
.msg-side{display:flex;flex-direction:column;min-height:0;padding:10px 6px 6px;border-radius:calc(var(--radius-window) - 12px);background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12)}
.msg-side-head{display:flex;align-items:center;gap:8px;padding:4px 8px 12px}
.msg-side-head h2{flex:1;margin:0;font-size:20px;font-weight:600;letter-spacing:.01em}
.msg-feed{display:none;place-items:center;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.14);cursor:pointer}
.msg-new{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.16);cursor:pointer}
.msg-new:hover{background:rgba(255,255,255,.28)}
.msg-tabs{display:flex;gap:6px;padding:0 6px 10px}
.msg-tabs button{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:34px;border-radius:17px;border:1px solid rgba(255,255,255,.18);background:transparent;color:var(--on-glass-2);font-size:13.5px;cursor:pointer}
.msg-tabs button.active{background:rgba(255,255,255,.92);color:#23242c;font-weight:600;border-color:transparent}
.msg-tabs b{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ff5f6d;color:#fff;font-size:10.5px;line-height:18px}
.msg-tabs b[hidden]{display:none}
.msg-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:4px;padding:0 4px 6px}
.msg-row,.msg-note{display:flex;align-items:center;gap:11px;width:100%;padding:10px;border:0;border-radius:16px;background:none;text-align:left;cursor:pointer;transition:background .15s}
.msg-row:hover,.msg-note:hover{background:rgba(255,255,255,.1)}
.msg-row.active{background:rgba(255,255,255,.18)}
.msg-row-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.msg-row-top{display:flex;align-items:baseline;gap:8px}
.msg-row-top strong{flex:1;min-width:0;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-row time,.msg-note time{font-size:11px;color:var(--on-glass-3)}
.msg-row small{font-size:12.5px;color:var(--on-glass-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-row.unread strong,.msg-row.unread small{color:#fff;font-weight:600}
.msg-count{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#ff5f6d;font-size:11px;line-height:20px;text-align:center}
.msg-note{align-items:flex-start}
.msg-note.unread{background:rgba(255,255,255,.08)}
.msg-note.unread::after{content:"";flex:none;width:8px;height:8px;margin-top:6px;border-radius:50%;background:#ffd28a}
.msg-note-line{font-size:13.5px;line-height:1.4;color:var(--on-glass-2)}
.msg-note-line strong{color:#fff}
.msg-note-task{font-size:12.5px;color:#ffd28a}
.msg-avatar{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,rgba(79,125,255,.55),rgba(224,86,122,.55));border:1px solid rgba(255,255,255,.35);font-size:13px;font-weight:700;letter-spacing:.02em}
.msg-avatar.lg{width:44px;height:44px}
.msg-avatar.bot{background:#fff;color:#e0567a}
.msg-avatar.bot svg{width:20px;height:20px}
.msg-empty{margin:18px 10px;padding:16px;border-radius:16px;border:1px dashed rgba(255,255,255,.3)}
.msg-empty strong{display:block;font-size:14px;margin-bottom:4px}
.msg-empty p{margin:0;font-size:13px;line-height:1.5;color:var(--on-glass-2)}
.msg-muted{margin:14px 10px;font-size:13px;color:var(--on-glass-3)}
.msg-link{align-self:flex-end;margin:0 6px 2px;padding:4px 8px;border:0;border-radius:8px;background:none;font-size:12.5px;color:#ffd28a!important;cursor:pointer}
.msg-push{display:flex;align-items:center;gap:10px;margin:2px 4px 8px;padding:12px;border-radius:16px;border:1px solid rgba(255,255,255,.2);background:linear-gradient(160deg,rgba(255,255,255,.12),rgba(255,255,255,.04))}
.msg-push.on{border-color:rgba(126,226,168,.45)}
.msg-push{flex-wrap:wrap}
.msg-push.denied,.msg-push.unsupported{opacity:.8}
.msg-push-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.14)}
.msg-push-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 150px}
.msg-push-text strong{font-size:13px}
.msg-push-text small{font-size:11.5px;color:var(--on-glass-2);line-height:1.35}
.msg-chip{flex:none;height:30px;padding:0 12px;border-radius:15px;border:0;background:#fff;color:#23242c!important;font-size:12.5px;font-weight:600;cursor:pointer}
.msg-chip.ghost{background:transparent;color:var(--on-glass-2)!important;border:1px solid rgba(255,255,255,.3)}

/* right pane */
.msg-pane{display:flex;flex-direction:column;min-width:0;min-height:0;border-radius:calc(var(--radius-window) - 12px);background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);overflow:hidden}
.msg-placeholder{margin:auto;display:flex;flex-direction:column;align-items:center;gap:8px;max-width:320px;text-align:center;padding:20px}
.msg-placeholder-icon{display:grid;place-items:center;width:64px;height:64px;border-radius:22px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25)}
.msg-placeholder-icon svg{width:26px;height:26px}
.msg-placeholder strong{font-size:16px}
.msg-placeholder p{margin:0;font-size:13.5px;line-height:1.5;color:var(--on-glass-2)}
.msg-head{display:flex;align-items:center;gap:12px;flex:none;padding:14px 18px;border-bottom:1px solid rgba(255,255,255,.12)}
.msg-head>strong{font-size:16px}
.msg-who{display:flex;flex-direction:column;gap:2px;min-width:0}
.msg-who strong{font-size:15.5px}
.msg-who small{font-size:12px;color:var(--on-glass-2)}
.msg-back{display:none;place-items:center;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.14);cursor:pointer}
.msg-picker .msg-back{display:grid}
.msg-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:18px 18px 12px}
.msg-day{align-self:center;margin:8px 0 4px;padding:3px 12px;border-radius:999px;background:rgba(255,255,255,.12);font-size:11.5px;color:var(--on-glass-2)}
.msg-bubble-row{display:flex}
.msg-bubble-row.mine{justify-content:flex-end}
.msg-bubble{max-width:min(620px,78%);padding:10px 14px 6px;border-radius:18px 18px 18px 6px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);font-size:14.5px;line-height:1.55;word-break:break-word}
.msg-bubble-row.mine .msg-bubble{border-radius:18px 18px 6px 18px;background:rgba(255,255,255,.9);color:#1d1e26;border-color:transparent}
.msg-bubble.bot{border-color:rgba(245,197,66,.4);background:linear-gradient(160deg,rgba(255,255,255,.16),rgba(255,255,255,.06))}
.msg-bubble time{display:block;margin-top:4px;text-align:right;font-size:10.5px;opacity:.6}
.msg-text a{color:#ffd28a;text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(255,210,138,.5)}
.msg-bubble-row.mine .msg-text a{color:#3346a8}
.msg-compose{display:flex;align-items:flex-end;gap:10px;flex:none;padding:12px 14px;border-top:1px solid rgba(255,255,255,.12)}
.msg-compose textarea{flex:1;min-height:44px;max-height:160px;padding:11px 16px;border-radius:22px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.1);color:#fff;font:inherit;font-size:14.5px;line-height:1.45;resize:none;outline:none}
.msg-compose textarea::placeholder{color:var(--on-glass-3)}
.msg-compose textarea:focus{border-color:rgba(255,255,255,.55)}
.msg-send{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:50%;background:#fff;color:#23242c!important;cursor:pointer}
.msg-send:disabled{opacity:.5}
.msg-readonly{flex:none;padding:14px 18px;border-top:1px solid rgba(255,255,255,.12);font-size:12.5px;color:var(--on-glass-3);text-align:center}
.msg-picker{display:flex;flex-direction:column;min-height:0;height:100%}
.msg-search{display:flex;align-items:center;gap:8px;margin:12px 16px;padding:0 14px;height:42px;border-radius:21px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08)}
.msg-search input{flex:1;border:0;background:none;color:#fff;font:inherit;font-size:14px;outline:none}
.msg-picker-list{flex:1;min-height:0;overflow-y:auto;padding:0 10px 10px;display:flex;flex-direction:column;gap:2px}
.msg-toast{position:absolute;left:50%;bottom:22px;transform:translate(-50%,20px);padding:10px 16px;border-radius:14px;background:rgba(20,20,28,.85);color:#fff;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:5}
.msg-toast.show{opacity:1;transform:translate(-50%,0)}

@media(max-width:900px){
  .msg-window{display:block;height:100dvh;margin:0;padding:max(6px,env(safe-area-inset-top)) 0 0;border-radius:0;border:0;box-shadow:none}
  .msg-side,.msg-pane{height:100%;border-radius:0;border:0;background:none}
  .msg-pane{display:none}
  .msg-feed{display:grid}
  .msg-window.in-thread .msg-side{display:none}
  .msg-window.in-thread .msg-pane,.msg-window:has(.msg-picker) .msg-pane{display:flex}
  .msg-window:has(.msg-picker) .msg-side{display:none}
  .msg-back{display:grid}
  .msg-bubble{max-width:86%}
}

.msg-new[hidden]{display:none}
.ai-workspace .ai-rail-bell.active{background:rgba(255,255,255,.92);color:#2a2b33;border-color:transparent}
.msg-open-chat{margin-left:auto}
.msg-bubble.special{font-style:italic}
.msg-files{margin-top:4px;font-size:12.5px;opacity:.85}
.msg-link.inline{display:block;align-self:auto;margin:4px 0 0;padding:0;font-size:12px}
.msg-bubble-row.mine .msg-link.inline{color:#3346a8!important}
.home .home-chat{position:relative}
.home .home-chat .icon-badge{top:-2px;right:-2px}
@media(min-width:901px){.home-top .home-messages,.home-top .home-chat{display:none}}
