.ai-chatbot {
    --ai-chatbot-color: #ff5501;
    position: fixed;
    bottom: 24px;
    z-index: 9999;
    font-family: inherit;
}

.ai-chatbot--bottom_right {
    right: 24px;
}

.ai-chatbot--bottom_left {
    left: 24px;
}

.ai-chatbot__toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: transparent;
    padding: 0;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.ai-chatbot__toggle-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.ai-chatbot__panel {
    position: absolute;
    bottom: 74px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-chatbot__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #999;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}

.ai-chatbot--bottom_right .ai-chatbot__panel {
    right: 0;
}

.ai-chatbot--bottom_left .ai-chatbot__panel {
    left: 0;
}

.ai-chatbot__intro {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    padding-right: 36px;
}

.ai-chatbot__welcome-heading {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px;
}

.ai-chatbot__welcome-tagline {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.ai-chatbot__start {
    align-self: stretch;
    padding: 16px 22px;
    border: none;
    border-radius: 24px;
    background: var(--ai-chatbot-color);
    color: #fff;
    cursor: pointer;
}

.ai-chatbot__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px 14px 16px;
    border-bottom: 1px solid #eee;
}

.ai-chatbot__header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ai-chatbot__header-name {
    font-weight: 600;
    font-size: 18px;
}

.ai-chatbot__header-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #999;
}

.ai-chatbot__header-status-icon {
    width: 10px;
    height: 10px;
    fill: #999;
}

.ai-chatbot__messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--ai-chatbot-color) #f2f2f2;
}

.ai-chatbot__messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chatbot__messages::-webkit-scrollbar-track {
    background: #f2f2f2;
}

.ai-chatbot__messages::-webkit-scrollbar-thumb {
    background-color: var(--ai-chatbot-color);
    border-radius: 3px;
}

.ai-chatbot__message {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-bottom: 12px;
    max-width: 85%;
}

.ai-chatbot__message--assistant {
    margin-right: auto;
}

.ai-chatbot__message--user {
    margin-left: auto;
    flex-direction: row-reverse;
    text-align: right;
}

.ai-chatbot__message-avatar {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    background-size: 75%;
    background-repeat: no-repeat;
    background-position: center;
}

.ai-chatbot__message-body {
    min-width: 0;
}

.ai-chatbot__message-text {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    background: #f2f2f2;
    margin: 0;
    white-space: pre-line;
}

.ai-chatbot__message--user .ai-chatbot__message-text {
    background: var(--ai-chatbot-color);
    color: #fff;
}

.ai-chatbot__typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f2f2f2;
}

.ai-chatbot__typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ai-chatbot-color);
    opacity: .4;
    animation: ai-chatbot-typing 1s infinite ease-in-out;
}

.ai-chatbot__typing span:nth-child(2) {
    animation-delay: .15s;
}

.ai-chatbot__typing span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes ai-chatbot-typing {
    0%, 60%, 100% {
        opacity: .4;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.ai-chatbot__products {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.ai-chatbot__product-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.ai-chatbot__product-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.ai-chatbot__product-name {
    flex: 1;
    font-size: 13px;
}

.ai-chatbot__product-price {
    font-size: 13px;
    font-weight: 600;
}

.ai-chatbot__input-wrapper {
    border-top: 1px solid #eee;
    padding: 10px 14px;
}

.ai-chatbot__input-row {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--ai-chatbot-color);
    border-radius: 24px;
    padding: 4px 4px 4px 14px;
}

.ai-chatbot__input {
    flex: 1;
    border: none !important;
    outline: none;
    box-shadow: none !important;
    background: transparent !important;
    appearance: none;
    padding: 6px 0;
}

.ai-chatbot__send {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ai-chatbot__send-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    flex: 0 0 18px;
}

.ai-chatbot__disclaimer {
    margin: 8px 2px 0;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    font-size: 11px;
    line-height: 1.4;
    color: #d32f2f;
    text-align: left;
}