.chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px;
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 16px;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 4px;
}

.message[data-role="user"] {
    background: var(--bg-active);
}

.message[data-role="assistant"] {
    background: var(--bg-panel);
}

.message[data-role="system"] {
    background: var(--bg-hover);
}

.role {
    font-size: 11px;
    font-weight: bold;
    color: var(--accent);
    text-transform: uppercase;
}

.content {
    font-size: 13px;
    color: var(--text);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.loading {
    color: var(--text-muted);
    font-style: italic;
}

.errorMessage {
    background: rgba(244, 67, 54, 0.1);
    border-left: 2px solid var(--error, #f44336);
}

.errorText {
    font-size: 13px;
    color: var(--error, #f44336);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.inputContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.input {
    width: 100%;
    padding: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    outline: none;

    &:focus {
        border-color: var(--accent);
    }

    &::placeholder {
        color: var(--text-muted);
    }
}

.sendButton {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: bold;
    color: var(--bg);
    background: var(--accent);
    border: none;
    border-radius: 4px;
    cursor: pointer;

    &:hover {
        background: var(--accent-alt);
    }
}

.clearButton {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    align-self: center;
    margin-top: 8px;

    &:hover {
        color: var(--text);
        border-color: var(--text-muted);
    }
}
