/* ── Chatbot widget: "Want to know more about me?" ── */

#chatbot-toggle {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.3rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#chatbot-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45); }
#chatbot-toggle i { font-size: 1rem; }

#chatbot-panel {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 1001;
    width: 360px;
    max-width: calc(100vw - 2rem);
    height: 520px;
    max-height: calc(100vh - 3.5rem);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}
#chatbot-panel.open { display: flex; }

#chatbot-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #2563eb 100%);
    color: #fff;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
#chatbot-header i { font-size: 1.1rem; }
#chatbot-header .title { flex: 1; font-size: 0.95rem; font-weight: 600; }
#chatbot-header button {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
}
#chatbot-header button:hover { color: #fff; }

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.chatbot-msg { font-size: 0.88rem; line-height: 1.55; max-width: 88%; padding: 0.6rem 0.85rem; border-radius: 0.7rem; }
.chatbot-msg p { margin: 0 0 0.5rem; }
.chatbot-msg p:last-child { margin-bottom: 0; }
.chatbot-msg ul { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.chatbot-msg ul:last-child { margin-bottom: 0; }
.chatbot-msg li { margin-bottom: 0.25rem; }
.chatbot-msg.user { align-self: flex-end; background: #2563eb; color: #fff; border-bottom-right-radius: 0.2rem; }
.chatbot-msg.bot { align-self: flex-start; background: var(--background-light, #f1f5f9); color: var(--text-primary); border-bottom-left-radius: 0.2rem; }
.chatbot-msg.bot.typing { color: var(--text-secondary); font-style: italic; }
.chatbot-msg.error { align-self: flex-start; background: #fef2f2; color: #b91c1c; }

#chatbot-input-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}
#chatbot-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-family: inherit;
    font-size: 0.88rem;
    background: var(--background-color);
    color: var(--text-primary);
    outline: none;
}
#chatbot-input:focus { border-color: #2563eb; }
#chatbot-send {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 999px;
    width: 2.4rem;
    height: 2.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#chatbot-send:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 480px) {
    #chatbot-panel { width: calc(100vw - 1.5rem); right: 0.75rem; }
    #chatbot-toggle span { display: none; }
}
