#chatbot-container {
    position: fixed;
    bottom: 70px;
    right: 25px;
    z-index: 99999999;
    font-family: Arial, sans-serif;
}

/* BOTÓN CERRAR DEFINITIVO */
#chatbot-hide {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #ff3b3b;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    z-index: 100000000;
}

/* BOTÓN FLOTANTE */
#chatbot-button {
    width: 60px;
    height: 60px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

#chatbot-button:hover {
    transform: scale(1.1);
}

#chatbot-button img {
    width: 42px;
    height: 42px;
}

/* PANEL DEL CHAT */
#chatbot-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 420px;
    background: rgba(30, 30, 30, 0.92);
    color: white;
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* HEADER */
.chatbot-header {
    background: #111;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.chatbot-header button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* MENSAJES */
#chatbot-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 14px;
}

.message-user {
    text-align: right;
    margin-bottom: 8px;
}

.message-bot {
    text-align: left;
    margin-bottom: 8px;
}

.message-user span,
.message-bot span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
}

.message-user span {
    background: #007bff;
}

.message-bot span {
    background: #444;
}

/* INPUT */
.chatbot-input {
    display: flex;
    padding: 10px;
    background: #111;
}

.chatbot-input input {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 8px;
    outline: none;
}

.chatbot-input button {
    margin-left: 8px;
    background: #007bff;
    border: none;
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

#chatbot-button {
    position: relative;
}

#chatbot-button::after {
    content: "";
    position: absolute;
    inset: -14px;                 /* MÁS GRANDE */
    border-radius: 50%;
    border: 3px solid rgba(0, 170, 255, 0.9);  /* MÁS OPACO */
    animation: pulseRing 1.8s infinite;
    pointer-events: none;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.85);
        opacity: 1;
    }
    60% {
        transform: scale(1.25);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    margin: 6px 0;
    align-self: flex-start;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #00aaff;
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out;
    opacity: 0.6;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: .15s; }
.typing-indicator span:nth-child(3) { animation-delay: .3s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); opacity: 1; }
}


