/* assets/css/chat_ui.css */

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card, #1e1e1e);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Header (Optional) */
.chat-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-title {
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    box-shadow: 0 0 5px #4CAF50;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--bg-dark, #121212);
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Message Bubbles */
.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
}

.message.ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    /* Glass effect */
    color: #eee;
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: var(--primary-orange, #ff6b00);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.2);
}

.message-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 5px;
    text-align: right;
}

/* Input Area */
.chat-input-area {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    font-size: 1rem;
    resize: none;
    /* Textarea auto-resize implemented in JS */
    height: 46px;
    /* Initial height */
    max-height: 120px;
    line-height: 1.4;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-orange);
}

/* Buttons */
.btn-voice,
.btn-send {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.btn-voice {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-voice.listening {
    background: #ff4757;
    animation: pulse 1.5s infinite;
}

.btn-send {
    background: var(--primary-orange);
    color: white;
}

.btn-send:hover,
.btn-voice:hover {
    filter: brightness(1.1);
}

.btn-send:active,
.btn-voice:active {
    transform: scale(0.95);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

/* Scenario Selector (Demo Only) */
.scenario-selector {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scenario-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #aaa;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.scenario-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.scenario-btn.active {
    background: rgba(255, 107, 0, 0.2);
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    font-weight: bold;
}