#chat-dock-container {
    position: fixed;
    right: 16px;
    bottom: 0;
    z-index: 1900;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.chat-dock-win {
    width: 300px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    max-height: 380px;
}

.chat-dock-win__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: #1a2332;
    color: #fff;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    user-select: none;
}

.chat-dock-win__title {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-dock-win__typing {
    font-size: 10px;
    font-weight: 400;
    color: #86efac;
}

.chat-dock-win__controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.chat-dock-win__controls button {
    background: transparent; border: none; color: rgba(255,255,255,0.75);
    width: 20px; height: 20px; border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1;
}
.chat-dock-win__controls button:hover { background: rgba(255,255,255,0.15); color: #fff; }

.chat-dock-win__body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-dock-win.is-minimized .chat-dock-win__body { display: none; }
.chat-dock-win.is-minimized { max-height: none; }

.chat-dock-win__messages {
    flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 3px;
    min-height: 160px; max-height: 240px;
}

.chat-dock-msg { max-width: 80%; display: flex; flex-direction: column; margin-bottom: 4px; }
.chat-dock-msg.is-own { align-self: flex-end; align-items: flex-end; }
.chat-dock-msg.is-other { align-self: flex-start; align-items: flex-start; }
.chat-dock-msg__bubble { padding: 6px 10px; border-radius: 10px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.chat-dock-msg.is-own .chat-dock-msg__bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 3px; }
.chat-dock-msg.is-other .chat-dock-msg__bubble { background: #f1f5f9; color: #1e293b; border-bottom-left-radius: 3px; }

.chat-dock-win__footer {
    display: flex; align-items: center; gap: 6px;
    padding: 8px; border-top: 1px solid #e2e8f0;
}
.chat-dock-win__input {
    flex: 1; border: 1px solid #cbd5e1; border-radius: 16px; padding: 6px 12px;
    font-size: 12.5px; outline: none;
}
.chat-dock-win__send {
    background: #2563eb; color: #fff; border: none; border-radius: 50%;
    width: 28px; height: 28px; flex-shrink: 0; cursor: pointer; font-size: 12px;
}
.chat-dock-win__send:hover { background: #1d4ed8; }

.chat-dock-win__open-full {
    display: block; text-align: center; font-size: 10.5px; color: #64748b;
    padding: 4px 8px 6px; text-decoration: none;
}
.chat-dock-win__open-full:hover { color: #2563eb; }

.chat-dock-msg__bubble audio { width: 220px; max-width: 100%; display: block; margin-top: 2px; }
.chat-dock-msg__reactions { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.chat-dock-msg__reaction-pill { font-size: 10px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; padding: 0 5px; }

.chat-dock-win.is-mentioned-flash .chat-dock-win__header { animation: chat-dock-mention-flash 1.4s ease-in-out 2; }
@keyframes chat-dock-mention-flash {
    0%, 100% { background: #1a2332; }
    50% { background: #b45309; }
}

.chat-dock-win.chat-buzz-shake { animation: chat-buzz-shake 0.6s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes chat-buzz-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

@media (max-width: 640px) {
    #chat-dock-container { right: 0; left: 0; align-items: stretch; flex-direction: column-reverse; }
    .chat-dock-win { width: 100%; border-radius: 0; }
}
