/* ═══════════════════════════════════════════
   CHATBOT.CSS — Asistente virtual (preguntas frecuentes)
   ═══════════════════════════════════════════ */
.chatbot-toggle {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(15,41,66,0.45);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
}
.chatbot-toggle:hover { transform: scale(1.08); }
.chatbot-toggle .bi-x-lg { display: none; }
.chatbot-toggle.open .bi-chat-dots-fill { display: none; }
.chatbot-toggle.open .bi-x-lg { display: inline-block; }

.chatbot-panel {
    position: fixed;
    bottom: 98px;
    left: 28px;
    width: 340px;
    max-width: calc(100vw - 40px);
    height: 480px;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(15,41,66,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.chatbot-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chatbot-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.chatbot-header-info { display: flex; align-items: center; gap: 10px; }
.chatbot-avatar {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.chatbot-title { font-weight: 700; font-size: 0.9rem; }
.chatbot-status { font-size: 0.72rem; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 5px; }
.chatbot-status .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}
.chatbot-close {
    background: none; border: none; color: #fff;
    font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: 0.85;
}
.chatbot-close:hover { opacity: 1; }

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-light);
}
.chatbot-msg {
    max-width: 85%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
}
.chatbot-msg.bot {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chatbot-msg.user {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chatbot-msg.bot strong { color: var(--primary); }

.chatbot-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: #fff;
    max-height: 190px;
    overflow-y: auto;
    flex-shrink: 0;
}
.chatbot-reply-btn {
    background: #fff;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chatbot-reply-btn i { font-size: 0.95rem; flex-shrink: 0; }
.chatbot-reply-btn:hover { background: var(--primary); color: #fff; }

@media (max-width: 480px) {
    .chatbot-panel { left: 12px; right: 12px; width: auto; bottom: 92px; }
    .chatbot-toggle { left: 20px; }
}
