﻿body {
    padding: 24px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 48px);
    overflow: hidden;
}

header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

    .header-actions a {
        font-size: 13px;
        color: var(--color-accent);
        text-decoration: none;
        font-weight: normal;
    }

        .header-actions a:hover {
            text-decoration: underline;
        }

#new-chat {
    font-size: 13px;
    padding: 5px 12px;
    /* inherits the rest from button {} in shared.css */
}

#log {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.msg {
    margin-bottom: 14px;
    display: flex;
}

    .msg.user {
        justify-content: flex-end;
    }

.bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    white-space: pre-wrap;
    line-height: 1.45;
    font-size: 14px;
}

.msg.user .bubble {
    background: var(--color-accent);
    color: #fff;
}

.msg.assistant .bubble {
    background: #f0f0f0;
    color: var(--color-text);
}

.msg.error .bubble {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error-border);
}

.tools {
    margin: -8px 20px 14px; /* pull up under the bubble, indent like message log */
    font-size: 12px;
    color: var(--color-text-muted);
    max-width: 100%;
}

.tool-call {
    background: #fafafa;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    margin-top: 4px;
    font-family: var(--font-mono);
    word-break: break-word;
}

    .tool-call .name {
        color: var(--color-accent);
        font-weight: 600;
    }

form {
    border-top: 1px solid var(--color-border);
    padding: 12px;
    display: flex;
    gap: 8px;
}

#input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-family: inherit;
    resize: none;
}

#send {
    padding: 0 20px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

    #send:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
