/* Chat page specific styles */

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    max-height: calc(100vh - 280px);
    min-height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.message {
    padding: 1rem;
    border-radius: 8px;
    max-width: 80%;
    line-height: 1.6;
    word-wrap: break-word;
}

.user-message {
    background: rgba(0, 102, 255, 0.15);
    border: 1px solid rgba(0, 102, 255, 0.3);
    margin-left: auto;
    align-self: flex-end;
}

.assistant-message {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    align-self: flex-start;
}

.typing-indicator {
    display: none;
    padding: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'AT Name Mono', monospace;
    font-size: 0.875rem;
}

.typing-indicator.visible {
    display: block;
}

.message-input {
    display: flex;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    gap: 1rem;
}

#user-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--white);
    font-family: 'AT Name Sans', sans-serif;
    font-size: 1rem;
    resize: none;
    min-height: 44px;
    max-height: 200px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#user-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

#user-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#send-button {
    padding: 0.75rem 2rem;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'AT Name Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

#send-button:hover:not(:disabled) {
    background: var(--accent-hover);
}

#send-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .chat-container {
        max-height: calc(100vh - 250px);
        min-height: 400px;
    }

    .message {
        max-width: 90%;
        padding: 0.75rem;
    }

    .message-input {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    #send-button {
        width: 100%;
        padding: 0.875rem;
    }
}

.assistant-message .message-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assistant-message .message-loader canvas {
    width: 40px !important;
    height: 40px !important;
}
