#aibi-adoption-chatbot-root {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
}

.aibi-chatbot-fab {
    border: 0;
    border-radius: 999px;
    background: #1c82df;
    color: #fff;
    font-weight: 700;
    padding: 12px 16px;
    box-shadow: 0 12px 24px rgba(30, 71, 135, 0.25);
    cursor: pointer;
}

.aibi-chatbot-fab.is-hidden {
    display: none;
}

.aibi-chatbot-panel {
    width: min(360px, calc(100vw - 30px));
    height: min(640px, calc(100vh - 40px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 42px rgba(16, 38, 68, 0.3);
    overflow: hidden;
    border: 1px solid #c9d3e2;
    display: none;
}

.aibi-chatbot-panel.is-open {
    display: flex;
    flex-direction: column;
}

.aibi-chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 14px;
    color: #fff;
    background: linear-gradient(90deg, #2190ea 0%, #3f4c7f 100%);
    position: relative;
}

.aibi-chatbot-header::after {
    content: "";
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #22c752;
}

.aibi-chatbot-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.aibi-chatbot-avatar-wrap {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    overflow: hidden;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.aibi-chatbot-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 20%;
    transform: scale(1.45);
    transform-origin: center center;
}

.aibi-chatbot-brand-text {
    min-width: 0;
}

.aibi-chatbot-brand-text strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aibi-chatbot-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aibi-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.aibi-chatbot-messages {
    padding: 14px;
    overflow-y: auto;
    background: #f2f3f5;
    flex: 1;
}

.aibi-chatbot-day {
    text-align: center;
    font-size: 13px;
    color: #6e7a88;
    margin: 8px 0 14px;
}

.aibi-chatbot-message {
    margin: 0 0 10px;
    border-radius: 14px;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.45;
}

.aibi-chatbot-sender {
    font-size: 12px;
    color: #6c7783;
    margin: 0 0 6px;
}

.aibi-chatbot-message p {
    margin: 0;
}

.aibi-chatbot-message p + p {
    margin-top: 8px;
}

.aibi-chatbot-message.bot {
    background: transparent;
    border: 0;
    margin-right: 32px;
    padding: 0;
}

.aibi-chatbot-message.bot > p:not(.aibi-chatbot-sender),
.aibi-chatbot-message.bot > div {
    background: #e4e5e8;
    border-radius: 14px;
    padding: 10px 12px;
    color: #263442;
}

.aibi-chatbot-message.user {
    background: #dcebff;
    border: 1px solid #b8d3ff;
    margin-left: 32px;
    color: #17375b;
}

.aibi-chatbot-source a {
    color: #1f6fcf;
    text-decoration: underline;
}

.aibi-chatbot-suggestions-wrap {
    margin-top: 0;
}

.aibi-chatbot-suggestions-title {
    font-size: 12px;
    color: #5a6775;
    margin-bottom: 8px;
    font-weight: 600;
}

.aibi-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aibi-chatbot-suggestion {
    border: 1px solid #2f83d9;
    background: #f7fbff;
    color: #1f6fcf;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    text-align: left;
}

.aibi-chatbot-suggestion:hover,
.aibi-chatbot-suggestion:focus {
    background: #e9f4ff;
    border-color: #1e75cf;
}

.aibi-chatbot-form {
    display: flex;
    gap: 8px;
    border-top: 1px solid #d9e1ec;
    padding: 10px 12px;
    background: #fff;
}

.aibi-chatbot-input {
    flex: 1;
    border: 1px solid #c7d2e2;
    border-radius: 18px;
    padding: 8px 12px;
    font-size: 14px;
}

.aibi-chatbot-send {
    border: 0;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    background: #1c82df;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    line-height: 1;
}

@media (max-width: 768px) {
    #aibi-adoption-chatbot-root {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }

    .aibi-chatbot-panel {
        width: 100%;
        height: min(640px, calc(100vh - 20px));
    }

    .aibi-chatbot-suggestion {
        font-size: 12px;
        padding: 7px 12px;
    }
}
