/**
 * Chat Styles - Material Design
 * Chat messages, input, and thinking indicator
 */

.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--md-surface-1);
}

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

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

.message {
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message.user {
    background: var(--md-primary);
    color: #000000;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    font-weight: 400;
    /* Material Design elevation dp1 */
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2),
                0px 1px 1px 0px rgba(0,0,0,0.14),
                0px 1px 3px 0px rgba(0,0,0,0.12);
}

.message.assistant {
    background: var(--md-surface-3);
    border: 1px solid var(--md-divider);
    color: var(--md-text-high);
    margin-right: auto;
    border-bottom-left-radius: 4px;
    /* Material Design elevation dp1 */
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2),
                0px 1px 1px 0px rgba(0,0,0,0.14),
                0px 1px 3px 0px rgba(0,0,0,0.12);
}

.message.status {
    background: transparent;
    color: var(--md-text-medium);
    font-size: 12px;
    text-align: center;
    margin: 8px auto;
    padding: 6px 12px;
    max-width: 100%;
    box-shadow: none;
}

.message.error {
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: var(--md-error);
    margin: 0 auto;
    /* Material Design elevation dp1 */
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2),
                0px 1px 1px 0px rgba(0,0,0,0.14),
                0px 1px 3px 0px rgba(0,0,0,0.12);
}

/* Thinking Indicator */
.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    margin: 8px auto;
    max-width: 150px;
    animation: fadeIn 0.3s ease;
}

.thinking-indicator.hidden {
    display: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: rgba(255,255,255,0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.thinking-text {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    animation: blink 1.5s ease-in-out infinite;
}

/* Chat Input */
.chat-input-container {
    padding: 16px 20px 20px 20px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    font-size: 15px;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    color: #ffffff;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.chat-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.chat-input::placeholder {
    color: rgba(255,255,255,0.4);
}
