/* Estilos del chatbot Blaniza */
.chat-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Scrollbar personalizado */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mensajes */
.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: fadeInUp 0.3s ease-out;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bot-message {
    align-self: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    color: white;
}

/* Avatar del bot con colores Blaniza (azul/violeta) */
.bot-message .message-avatar {
    background: linear-gradient(135deg, #6f42c1, #495057);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-text {
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    font-size: 14px;
}

.bot-message .message-text {
    background: #f8f9fa;
    color: #333;
    border-bottom-left-radius: 6px;
    border: 1px solid #e9ecef;
}

.user-message .message-text {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
    border-bottom-right-radius: 6px;
}

.message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    padding: 0 4px;
}

.user-message .message-time {
    text-align: right;
}

/* Área de entrada */
.chat-input-container {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: white;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: end;
}

.chat-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    min-height: 44px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: #6f42c1;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

.send-button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.send-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.input-hint {
    font-size: 11px;
    color: #6c757d;
    margin-top: 8px;
    text-align: center;
}

/* Indicador de escritura */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    align-items: center;
    border: 1px solid #e9ecef;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6f42c1;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Estados especiales */
.message-text ul {
    margin: 8px 0;
    padding-left: 20px;
}

.message-text ul li {
    margin: 4px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-container {
        height: 60vh;
        border-radius: 10px;
    }
    
    .message {
        max-width: 95%;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .chat-input-container {
        padding: 15px;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .message-text {
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        height: 55vh;
    }
    
    .message {
        max-width: 98%;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Estilos para el modal */
.modal-content {
    background-color: #fff;
    color: #333;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    color: #333;
    font-weight: 600;
}

.modal-body {
    color: #333;
}

.modal-body h6 {
    color: #495057;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.modal-body h6:first-child {
    margin-top: 0;
}

.modal-body p {
    color: #6c757d;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.modal-body ul {
    color: #6c757d;
    margin-bottom: 1rem;
}

.modal-body ul li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.modal-body strong {
    color: #495057;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Iconos en el modal */
.modal-body i.bi {
    margin-right: 0.5rem;
}

.text-primary {
    color: #6f42c1 !important;
}

.text-success {
    color: #28a745 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-warning {
    color: #ffc107 !important;
}