/* Chat Styles - Archivo separado para evitar conflictos */

/* Chat Toggle Button */
.chat-toggle {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    background: #0F4761 !important;
    color: white !important;
    padding: 15px 20px !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    box-shadow: 0 5px 25px rgba(15, 71, 97, 0.3) !important;
    transition: all 0.3s ease !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: 600 !important;
    border: 3px solid red !important;
    font-size: 16px !important;
}

.chat-toggle:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 30px rgba(15, 71, 97, 0.4) !important;
    background: #467886 !important;
}

.chat-toggle i {
    font-size: 1.2rem !important;
}

.chat-label {
    font-size: 0.9rem !important;
}

/* Chat Modal */
.chat-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 100000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    border: 3px solid blue !important;
}

.chat-modal.active {
    display: flex !important;
}

/* Chat Container */
.chat-container {
    background: white !important;
    border-radius: 20px !important;
    width: 100% !important;
    max-width: 500px !important;
    height: 600px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #0F4761 0%, #467886 100%) !important;
    color: white !important;
    padding: 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.chat-title {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.chat-title i {
    font-size: 1.5rem !important;
}

.chat-title h3 {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.chat-close {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    padding: 5px !important;
    border-radius: 50% !important;
    transition: background 0.3s ease !important;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Chat Messages */
.chat-messages {
    flex: 1 !important;
    padding: 20px !important;
    overflow-y: auto !important;
    background: #f8f9fa !important;
}

.message {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    animation: messageSlide 0.3s ease !important;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #0F4761 !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
}

.message-content {
    flex: 1 !important;
    background: white !important;
    padding: 15px !important;
    border-radius: 15px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.message-content p {
    margin: 0 0 10px 0 !important;
    line-height: 1.5 !important;
}

.message-content ul {
    margin: 10px 0 !important;
    padding-left: 20px !important;
}

.message-content li {
    margin: 5px 0 !important;
}

.bot-message .message-content {
    background: #e3f2fd !important;
    border-left: 4px solid #0F4761 !important;
}

.user-message {
    flex-direction: row-reverse !important;
}

.user-message .message-content {
    background: #0F4761 !important;
    color: white !important;
}

.user-message .message-avatar {
    background: #467886 !important;
}

/* Chat Input */
.chat-input {
    padding: 20px !important;
    background: white !important;
    border-top: 1px solid #e9ecef !important;
}

.input-container {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
}

#chatInput {
    flex: 1 !important;
    padding: 12px 15px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 25px !important;
    font-size: 0.9rem !important;
    outline: none !important;
    transition: border-color 0.3s ease !important;
}

#chatInput:focus {
    border-color: #0F4761 !important;
}

.send-button {
    background: #0F4761 !important;
    color: white !important;
    border: none !important;
    padding: 12px 15px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.send-button:hover {
    background: #467886 !important;
}

.voice-button {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 12px 15px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
}

.voice-button:hover {
    background: #218838 !important;
    transform: scale(1.05) !important;
}

.voice-button.active {
    background: #dc3545 !important;
    animation: voice-pulse 1.5s infinite !important;
}

.voice-button.recording {
    background: #dc3545 !important;
    animation: recording-pulse 1s infinite !important;
}

@keyframes voice-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes recording-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.chat-info {
    text-align: center !important;
    color: #6c757d !important;
    font-size: 0.8rem !important;
}

/* Typing Indicator */
.typing-indicator {
    display: flex !important;
    gap: 5px !important;
    padding: 15px !important;
    background: #e3f2fd !important;
    border-radius: 15px !important;
    margin: 10px 0 !important;
}

.typing-dot {
    width: 8px !important;
    height: 8px !important;
    background: #0F4761 !important;
    border-radius: 50% !important;
    animation: typing 1.4s infinite ease-in-out !important;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s !important; }
.typing-dot:nth-child(2) { animation-delay: -0.16s !important; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chat-container {
        width: 95% !important;
        height: 80vh !important;
        margin: 20px !important;
    }
    
    .chat-toggle {
        bottom: 20px !important;
        right: 20px !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
}
