/* Contenido de ejemplo para la página */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Widget del chatbot */
.chatbot-widget {
    position: fixed;
    bottom: 81px;
    right: 32px;
    z-index: 1000;
    font-size: 14px;
}

/* Botón flotante */
.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    animation: none;
}

.chatbot-button i {
    font-size: 24px;
}

/* Contenedor del chat (ventana flotante) */
.chatbot-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-container.open {
    display: flex;
}

/* Header del chat */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header p {
    margin: 5px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.close-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.close-button:hover {
    opacity: 1;
}

/* Área de mensajes */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f5f5f5;
}

.message {
    margin-bottom: 12px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message.bot .message-content a {
    color: #667eea;
    text-decoration: underline;
    word-break: break-all;
}

/* Preguntas sugeridas */
.suggested-questions {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.suggested-questions h6 {
    color: #666;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggested-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.suggested-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 5px 10px;
    font-size: 11px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.suggested-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Input area */
.chat-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
}

.input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 25px;
    overflow: hidden;
}

.btn-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-send:hover {
    opacity: 0.9;
}

/* Indicador de typing */
.typing-indicator {
    display: flex;
    padding: 10px 15px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: fit-content;
}

.typing-indicator span {
    height: 6px;
    width: 6px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Footer */
.footer-note {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 11px;
    color: #666;
}

.footer-note a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* Modal más pequeño */
.modal-sm-custom {
    max-width: 350px;
}

.modal-content {
    border-radius: 15px;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .close {
    color: white;
}

/* Notificación de mensaje no leído */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

/* Scroll personalizado */
.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 5px;
}

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


/* Estilos específicos para el modal de contacto */
#contactModal .modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#contactModal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#contactModal .modal-header .close:hover {
    opacity: 1;
    color: white;
}

#contactModal .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

#contactModal .btn-secondary:hover {
    background: #5a6268;
    opacity: 0.9;
}

/* Animación suave para el modal */
.modal.fade .modal-dialog {
    transform: scale(0.9);
    transition: transform 0.2s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Responsive para móviles */
@media (max-width: 576px) {
    #contactModal .modal-dialog {
        max-width: 90% !important;
        margin: 20px auto;
    }
}