/* chatbot.css - Solo estilos del chatbot (sin afectar body ni layout general) */

/* BOTÓN FLOTANTE DEL CHATBOT */
.chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #12B3E3 0%, #0393D5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        0 8px 25px rgba(18, 179, 227, 0.4),
        0 0 0 0 rgba(18, 179, 227, 0.7);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse 2s infinite;
    border: 3px solid #FFFFFF;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 
        0 12px 35px rgba(18, 179, 227, 0.6),
        0 0 30px rgba(18, 179, 227, 0.4);
}

.chatbot-button i {
    font-size: 28px;
    color: #FFFFFF;
    transition: transform 0.3s ease;
}

.chatbot-button:hover i {
    transform: scale(1.2);
}



/* Animación de pulso */
@keyframes pulse {
    0% {
        box-shadow: 
            0 8px 25px rgba(18, 179, 227, 0.4),
            0 0 0 0 rgba(18, 179, 227, 0.7);
    }
    50% {
        box-shadow: 
            0 8px 25px rgba(18, 179, 227, 0.4),
            0 0 0 15px rgba(18, 179, 227, 0);
    }
    100% {
        box-shadow: 
            0 8px 25px rgba(18, 179, 227, 0.4),
            0 0 0 0 rgba(18, 179, 227, 0);
    }
}

/* Badge de notificación */
.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4757;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #FFFFFF;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* VENTANA DEL CHAT */
.chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 
        0 15px 50px rgba(6, 75, 144, 0.3),
        0 0 0 1px rgba(18, 179, 227, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    animation: slideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del chat */
.chatbot-header {
    background: linear-gradient(135deg, #064B90 0%, #0393D5 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #12B3E3 0%, #67C0F0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.chatbot-avatar i {
    font-size: 22px;
    color: white;
}

.chatbot-header-text h3 {
    font-size: 16px;
    margin-bottom: 3px;
}

.chatbot-header-text p {
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.chatbot-close:hover {
    transform: rotate(90deg);
}

/* Cuerpo del chat */
.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(159, 205, 241, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-body::-webkit-scrollbar-thumb {
    background: #12B3E3;
    border-radius: 3px;
}

/* Mensajes */
.chat-message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #12B3E3 0%, #67C0F0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar i {
    font-size: 16px;
    color: white;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.bot .message-content {
    background: #F0F8FF;
    color: #070E3C;
    border-bottom-left-radius: 5px;
    border: 1px solid #9FCDF1;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #0393D5 0%, #12B3E3 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

/* Opciones rápidas */
.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-option {
    padding: 8px 15px;
    background: white;
    border: 2px solid #12B3E3;
    color: #064B90;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.quick-option:hover {
    background: linear-gradient(135deg, #12B3E3 0%, #67C0F0 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 179, 227, 0.3);
}

/* Footer del chat */
.chatbot-footer {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #E0E0E0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #9FCDF1;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.chatbot-input:focus {
    border-color: #12B3E3;
    box-shadow: 0 0 0 3px rgba(18, 179, 227, 0.1);
}

.chatbot-send {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #12B3E3 0%, #0393D5 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(18, 179, 227, 0.4);
}

/* Indicador de escritura */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #F0F8FF;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    width: fit-content;
    border: 1px solid #9FCDF1;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #12B3E3;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.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);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 150px);
        right: 10px;
        bottom: 100px;
    }

    .chatbot-button {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }

    .chatbot-button i {
        font-size: 24px;
    }
}


