/* Chatbot de Innuvo - Estilos */

/* Botón flotante del chatbot */
.innuvo-chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #033d40 0%, #0277bd 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(3, 61, 64, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
    z-index: 9998;
    animation: pulse 2s infinite;
}

.innuvo-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(3, 61, 64, 0.6);
}

.innuvo-chatbot-button.active {
    background: linear-gradient(135deg, #0277bd 0%, #033d40 100%);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(3, 61, 64, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(2, 119, 189, 0.6);
    }
}

/* Contenedor del chatbot */
.innuvo-chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

.innuvo-chatbot-container.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del chatbot */
.innuvo-chatbot-header {
    background: linear-gradient(135deg, #033d40 0%, #0277bd 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.innuvo-chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.innuvo-chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.innuvo-chatbot-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.innuvo-chatbot-title p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.innuvo-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.innuvo-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Área de mensajes */
.innuvo-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.innuvo-chatbot-messages::-webkit-scrollbar-thumb {
    background: #0277bd;
    border-radius: 3px;
}

/* Mensaje individual */
.innuvo-chat-message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.innuvo-chat-message.user {
    flex-direction: row-reverse;
}

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

.innuvo-message-avatar.bot {
    background: linear-gradient(135deg, #033d40 0%, #0277bd 100%);
    color: white;
}

.innuvo-message-avatar.user {
    background: #e3f2fd;
    color: #0277bd;
}

.innuvo-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

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

.innuvo-chat-message.user .innuvo-message-content {
    background: linear-gradient(135deg, #0277bd 0%, #033d40 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Indicador de escritura */
.innuvo-typing-indicator {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.innuvo-typing-indicator.active {
    display: flex;
}

.innuvo-typing-dots {
    display: flex;
    gap: 4px;
}

.innuvo-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0277bd;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Área de input */
.innuvo-chatbot-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.innuvo-chatbot-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.innuvo-chatbot-input:focus {
    border-color: #0277bd;
}

.innuvo-chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #033d40 0%, #0277bd 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.innuvo-chatbot-send:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(3, 61, 64, 0.3);
}

.innuvo-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mensaje de bienvenida */
.innuvo-welcome-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

.innuvo-welcome-message h4 {
    color: #033d40;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.innuvo-welcome-message p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 480px) {
    .innuvo-chatbot-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        right: 10px;
        bottom: 90px;
    }

    .innuvo-chatbot-button {
        bottom: 20px;
        right: 20px;
    }
}

/* Tipografía moderna para todo el chatbot */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Roboto:wght@300;400;500;700&display=swap');

.innuvo-chatbot-container,
.innuvo-chatbot-messages,
.innuvo-chat-message,
.innuvo-chatbot-input,
.innuvo-welcome-message,
.innuvo-chatbot-title h3,
.innuvo-chatbot-title p {
    font-family: 'Inter', 'Roboto', sans-serif !important;
    letter-spacing: 0.2px;
}

/* Mejor nitidez */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ajuste leve a la burbuja del usuario (más moderna) */
.innuvo-chat-message.user .innuvo-message-content {
    border-radius: 14px 14px 4px 14px;
}

/* Ajuste leve a la burbuja del bot (más “blanca”, más Apple-like) */
.innuvo-chat-message.bot .innuvo-message-content {
    background: #ffffff;
    border-radius: 14px 14px 14px 4px;
    border: 1px solid #eef1f4;
}

/* Ajuste visual del input */
.innuvo-chatbot-input {
    border-radius: 20px;
    border: 1px solid #d6d6d6;
    background: #fafafa;
}

/* Botón de envío más suave */
.innuvo-chatbot-send {
    background: linear-gradient(135deg, #0277bd 0%, #03546a 100%);
}

/* Header más profesional */
.innuvo-chatbot-header {
    background: linear-gradient(135deg, #02454a 0%, #0277bd 100%);
}

/* Mini transición al hacer hover en los botones */
.innuvo-chatbot-send,
.innuvo-chatbot-button {
    transition: 0.25s ease;
}