/* Chat-specific Styles */

/* Clear History Button */
.chat-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
}

.clear-history-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.clear-history-btn:hover {
    background: #ff3742;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.clear-history-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chat-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 100%;
    word-wrap: break-word;
    margin: 0 10px 15px 10px;
}

.message.user {
    background: #25D366;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.bot {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
}

.message.system {
    background: #e3f2fd;
    color: #1976d2;
    text-align: center;
    margin: 0 auto;
    font-style: italic;
}

.chat-input {
    display: flex;
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    position: relative;
}

#messageInput {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

#messageInput:focus {
    border-color: #25D366;
}

.char-counter {
    position: absolute;
    bottom: 5px;
    right: 80px;
    font-size: 11px;
    color: #666;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 10px;
    pointer-events: none;
}

.char-counter.warning {
    color: #ff6b35;
    font-weight: bold;
}

.char-counter.danger {
    color: #ff4757;
    font-weight: bold;
}

#sendButton {
    margin-left: 10px;
    padding: 12px 20px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#sendButton:hover {
    background: #128C7E;
}

#sendButton:disabled {
    background: #ccc;
    cursor: not-allowed;
}