.ah-chatbot {
    position: fixed;
    left: 24px;
    bottom: 22px;
    z-index: 9999;
    font-family: "Open Sans", Arial, sans-serif;
}

.ah-chatbot *,
.ah-chatbot *::before,
.ah-chatbot *::after {
    box-sizing: border-box;
}

.ah-chatbot__launcher {
    position: relative;
    width: 66px;
    height: 66px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: linear-gradient(145deg, #ec2a8c 0%, #d21889 55%, #aa176e 100%);
    color: #ffffff;
    box-shadow: 0 16px 38px rgba(24, 18, 42, 0.28);
    font-size: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ah-chatbot__badge {
    position: absolute;
    top: -7px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ff4c6a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 22px;
}

.ah-chatbot__panel {
    position: absolute;
    left: 0;
    bottom: 78px;
    width: min(430px, calc(100vw - 28px));
    height: min(610px, calc(100vh - 112px));
    min-height: 460px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(24, 18, 42, 0.28);
    overflow: hidden;
    transform: translateY(12px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.ah-chatbot.is-open .ah-chatbot__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.ah-chatbot__header {
    height: 72px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f03388 0%, #cf176f 70%, #b20f67 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ah-chatbot__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ah-chatbot__brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.ah-chatbot__brand small {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 11px;
}

.ah-chatbot__brand small i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #26de81;
}

.ah-chatbot__avatar,
.ah-chatbot__mini-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    overflow: hidden;
}

.ah-chatbot__avatar {
    width: 44px;
    height: 44px;
}

.ah-chatbot__mini-avatar {
    width: 30px;
    height: 30px;
    border: 1px solid #f0e7ee;
}

.ah-chatbot__avatar img,
.ah-chatbot__mini-avatar img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.ah-chatbot__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ah-chatbot__actions button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ah-chatbot__messages {
    height: calc(100% - 177px);
    padding: 18px 16px 8px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: linear-gradient(180deg, #faf7fb 0%, #ffffff 72%);
}

.ah-chatbot__messages::-webkit-scrollbar,
.ah-chatbot__suggestions::-webkit-scrollbar {
    display: none;
}

.ah-chatbot__row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.ah-chatbot__row.is-user {
    justify-content: flex-end;
}

.ah-chatbot__row > div {
    min-width: 0;
    max-width: 82%;
}

.ah-chatbot__row.is-bot > div {
    max-width: calc(100% - 38px);
}

.ah-chatbot__bubble {
    max-width: 100%;
    padding: 11px 13px;
    border-radius: 12px;
    background: #ffffff;
    color: #2d2832;
    box-shadow: 0 6px 18px rgba(33, 21, 38, 0.1);
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: none;
}

.ah-chatbot__row.is-user .ah-chatbot__bubble {
    background: #ffe0ee;
    color: #302631;
    box-shadow: none;
}

.ah-chatbot__row time {
    display: block;
    margin-top: 5px;
    color: #8d8290;
    font-size: 10px;
}

.ah-chatbot__row.is-user time {
    text-align: right;
}

.ah-chatbot__row.is-loading .ah-chatbot__bubble {
    display: flex;
    gap: 5px;
    align-items: center;
    min-width: 54px;
    min-height: 36px;
}

.ah-chatbot__row.is-loading span span {
    display: block;
}

.ah-chatbot__row.is-loading .ah-chatbot__bubble span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d21889;
    opacity: 0.35;
    animation: ahChatbotTyping 950ms infinite ease-in-out;
}

.ah-chatbot__row.is-loading .ah-chatbot__bubble span:nth-child(2) {
    animation-delay: 120ms;
}

.ah-chatbot__row.is-loading .ah-chatbot__bubble span:nth-child(3) {
    animation-delay: 240ms;
}

.ah-chatbot__spots {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.ah-chatbot__spot {
    min-width: 0;
    min-height: 68px;
    padding: 7px;
    border: 1px solid #f0dce7;
    border-radius: 10px;
    background: #ffffff;
    color: #2d2832;
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 9px;
    text-decoration: none;
}

.ah-chatbot__spot span {
    min-width: 0;
}

.ah-chatbot__spot:hover {
    border-color: #ec2a8c;
    color: #2d2832;
}

.ah-chatbot__spot img {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    background: #f4edf2;
}

.ah-chatbot__spot strong,
.ah-chatbot__spot small,
.ah-chatbot__spot em {
    display: block;
}

.ah-chatbot__spot strong {
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ah-chatbot__spot small {
    margin-top: 3px;
    color: #817684;
    font-size: 11px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ah-chatbot__spot em {
    margin-top: 4px;
    color: #d21889;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.ah-chatbot__more {
    width: 100%;
    min-height: 36px;
    margin-top: 9px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #e32283;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(227, 34, 131, 0.2);
}

.ah-chatbot__more:hover,
.ah-chatbot__more:focus {
    background: #c91572;
    color: #ffffff;
    text-decoration: none;
}

.ah-chatbot__suggestions {
    min-height: 52px;
    padding: 7px 13px;
    background: #ffffff;
    border-top: 1px solid #f1e7ee;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ah-chatbot__suggestions button {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 13px;
    border: 1px solid #e8dbe3;
    border-radius: 999px;
    background: #ffffff;
    color: #4e4350;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ah-chatbot__suggestions button:hover {
    border-color: #ec2a8c;
    color: #d21889;
}

.ah-chatbot__form {
    height: 53px;
    padding: 8px 10px;
    border-top: 1px solid #f1e7ee;
    display: grid;
    grid-template-columns: 1fr 38px;
    align-items: center;
    gap: 7px;
    background: #ffffff;
}

.ah-chatbot__form input {
    width: 100%;
    height: 36px;
    border: 0;
    outline: none;
    color: #2d2832;
    font-size: 13px;
}

.ah-chatbot__form input::placeholder {
    color: #aaa0ad;
}

.ah-chatbot__send {
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ah-chatbot__send {
    width: 37px;
    height: 37px;
    background: #e32283;
    color: #ffffff;
    font-size: 14px;
}

@keyframes ahChatbotTyping {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@media (max-width: 560px) {
    .ah-chatbot {
        left: 14px;
        bottom: 14px;
    }

    .ah-chatbot__panel {
        left: -2px;
        bottom: 76px;
        width: calc(100vw - 24px);
        height: min(610px, calc(100vh - 100px));
    }

    .ah-chatbot__launcher {
        width: 60px;
        height: 60px;
    }
}
