/* Chat UI styles */

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Welcome screen */
.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 12px;
    color: var(--text-tertiary);
}

.chat-welcome-icon {
    font-size: 36px;
    color: var(--trstd-color);
    opacity: 0.4;
}

.chat-welcome-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-welcome-desc {
    font-size: 12px;
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
}

.chat-suggestions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.chat-suggestion {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat-suggestion:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

/* Messages */
.chat-msg {
    display: flex;
    gap: 12px;
    max-width: 600px;
    opacity: 0;
    transform: translateY(4px);
    animation: msgIn 0.3s ease forwards;
}

@keyframes msgIn {
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-msg.agent .chat-msg-avatar {
    background: rgba(6, 182, 212, 0.15);
    color: var(--trstd-color);
}

.chat-msg.user .chat-msg-avatar {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.chat-msg-body {
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}

.chat-msg.user .chat-msg-body {
    background: var(--bg-surface);
}

.chat-msg-body strong { font-weight: 600; }
.chat-msg-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 3px;
}

/* Loading dots */
.chat-loading {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.chat-loading span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
    animation: loadDot 1.2s ease-in-out infinite;
}

.chat-loading span:nth-child(2) { animation-delay: 0.2s; }
.chat-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadDot {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Input bar */
.chat-input-bar {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease;
}

.chat-input:focus {
    border-color: var(--trstd-color);
}

.chat-input::placeholder {
    color: var(--text-tertiary);
}

.chat-send {
    background: var(--trstd-color);
    color: #000;
    border: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.chat-send:hover { opacity: 0.85; }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
