.chatbot { font-family: "Source Sans 3", sans-serif; }
.chatbot-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: #fff;
    color: #2c3038;
    padding: 8px 14px 8px 8px;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(44, 48, 56, 0.18);
    font-weight: 800;
    cursor: pointer;
}
.chatbot-launcher img,
.chatbot-head img,
.chatbot-bubble img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.chatbot-launcher[hidden],
.chatbot-panel[hidden] {
    display: none !important;
}
.chatbot-panel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 46;
    width: min(380px, calc(100vw - 24px));
    height: min(620px, calc(100vh - 32px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(44, 48, 56, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chatbot-head {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: #7b5cff;
    color: #fff;
}
.chatbot-head strong, .chatbot-head span { display: block; }
.chatbot-head span { font-size: 0.82rem; opacity: 0.9; }
.chatbot-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f4f5f7;
    display: grid;
    gap: 10px;
    align-content: start;
}
.chatbot-bubble { display: flex; gap: 8px; align-items: flex-start; }
.chatbot-bubble.user { justify-content: flex-end; }
.chatbot-bubble p {
    margin: 0;
    white-space: pre-wrap;
    background: #fff;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(44, 48, 56, 0.06);
    max-width: 280px;
}
.chatbot-bubble.user p { background: #7b5cff; color: #fff; }
.chatbot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chatbot-actions a, .chatbot-actions button {
    border: 1px solid #d7dbe3;
    background: #fff;
    color: #2c3038;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
.chatbot-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px; border-top: 1px solid #e5e7eb; }
.chatbot-form input {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
}
.chatbot-form button {
    background: #7b5cff;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer;
}
.chatbot-note { margin: 0; padding: 0 12px 10px; font-size: 0.75rem; color: #6b7280; }
@media (max-width: 900px) {
    .chatbot-launcher {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        right: 12px;
        padding: 6px;
        gap: 0;
    }
    .chatbot-launcher span { display: none; }
    .chatbot-launcher img { width: 48px; height: 48px; }
    .chatbot-panel {
        right: 8px;
        left: 8px;
        width: auto;
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        height: min(68dvh, calc(100dvh - 150px));
        max-height: calc(100dvh - 148px);
        border-radius: 16px;
    }
}
