/* ==================== ESTILOS DEL CHATBOT ILLA EDUCA ==================== */

.chatbot-fixed-container {
    position: fixed;
    bottom: 90px; /* Ajustado para estar encima del WhatsApp */
    right: 24px;
    z-index: 9998; /* Un nivel menos que WhatsApp para no taparlo */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.chatbot-float-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-image: url(../img/icons/Mindymini.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
    transition: all 0.3s ease;
    padding: 0;
}

/* Efecto al pasar el mouse */
.chatbot-float-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(147, 51, 234, 0.4);
}

/* Oculta cualquier texto o icono interno */
.chatbot-float-button svg,
.chatbot-float-button span {
    display: none;
}


.chatbot-window-container {
    position: fixed;
    bottom: 90px; /* Mismo ajuste para la ventana del chat */
    right: 24px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header-section {
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chatbot-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.chatbot-avatar-circle svg {
    width: 24px;
    height: 24px;
}

.chatbot-title-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.chatbot-title-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-close-btn svg {
    width: 20px;
    height: 20px;
}

.chatbot-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

.chatbot-message-item {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.chatbot-message-item.user {
    flex-direction: row-reverse;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.chatbot-msg-avatar.bot {
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
}

.chatbot-msg-avatar.user {
    background: #9333ea;
}

.chatbot-msg-avatar svg {
    width: 18px;
    height: 18px;
}

.chatbot-msg-content {
    max-width: 70%;
}

.chatbot-msg-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
}

.chatbot-msg-bubble.bot {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #1f2937;
}

.chatbot-msg-bubble.user {
    background: #9333ea;
    color: white;
}

.chatbot-msg-time {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    padding: 0 8px;
}

.chatbot-typing-indicator {
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: fit-content;
    display: flex;
    gap: 4px;
}

.chatbot-typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.chatbot-quick-replies {
    padding: 12px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chatbot-quick-reply-btn {
    background: #f3e8ff;
    color: #9333ea;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.chatbot-quick-reply-btn:hover {
    background: #e9d5ff;
    transform: translateY(-2px);
}

.chatbot-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.chatbot-text-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-text-input:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.chatbot-send-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(147, 51, 234, 0.4);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-send-btn svg {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .chatbot-window-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px); /* Ajustado para no tapar el WhatsApp */
        bottom: 90px;
        right: 10px;
    }
    
    .chatbot-fixed-container {
        bottom: 90px; /* Mantener encima del WhatsApp en móvil */
        right: 15px;
    }
    
    .chatbot-float-button span {
        display: none;
    }
    
    .chatbot-float-button {
        padding: 16px;
        border-radius: 50%;
    }
}