﻿.chat-shell {
    width: 100%;
    height: 600px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.chat-header__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-header__status {
    font-size: 0.8rem;
}

    .chat-header__status.is-online {
        color: #0f766e;
    }

    .chat-header__status.is-offline {
        color: #b91c1c;
    }

.chat-icon-button,
.chat-action-button {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
}

.chat-action-button--primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.chat-status-bar {
    padding: 0.55rem 1rem;
    background: #eff6ff;
    border-bottom: 1px solid #dbeafe;
    font-size: 0.92rem;
}

.chat-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafc;
}

.chat-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chat-message--user {
    align-self: flex-end;
}

.chat-message--assistant,
.chat-message--system {
    align-self: flex-start;
}

.chat-bubble {
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    line-height: 1.45;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.chat-message--user .chat-bubble {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.chat-message--system .chat-bubble {
    background: #f3f4f6;
}

.chat-bubble.is-streaming {
    opacity: 0.96;
}


.chat-meta {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.chat-streaming-dot {
    margin-left: 0.4rem;
}

.chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.chat-editor {
    flex: 1;
    min-height: 42px;
    max-height: 120px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    font: inherit;
}

.chat-composer__actions {
    display: flex;
    gap: 0.5rem;
}

.chat-toast-host {
    position: absolute;
    right: 1rem;
    bottom: 5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 260px;
    max-width: 420px;
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.chat-toast--error {
    background: #dc2626;
}

.chat-toast--success {
    background: #16a34a;
}

.chat-toast__close {
    margin-left: auto;
    background: transparent;
    color: inherit;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .chat-shell {
        height: 100%;
    }

    .chat-message {
        max-width: 92%;
    }

    .chat-composer {
        flex-direction: column;
        align-items: stretch;
    }

    .chat-composer__actions {
        justify-content: flex-end;
    }
}
