/* Chat UI */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-header-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

.message-user {
    align-self: flex-end;
}

.message-ai {
    align-self: flex-start;
}

.message-bubble {
    padding: 0.875rem 1.25rem;
    border-radius: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.message-user .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-ai .message-bubble {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: var(--glass-border);
    border-bottom-left-radius: 0.25rem;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    align-self: flex-end;
}

.message-user .message-time {
    align-self: flex-start;
}

.chat-input-container {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: var(--glass-border);
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 0.25rem 0.25rem 0.25rem 1.25rem;
    transition: var(--transition);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: var(--font-family);
    font-size: 0.95rem;
    padding: 0.5rem 0;
    outline: none;
}

.chat-submitBtn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.chat-submitBtn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.chat-submitBtn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.image-preview {
    max-width: 200px;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
    border: var(--glass-border);
}
