.bt-chatbot {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
}

.bt-chatbot__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.bt-chatbot__header-copy {
    min-width: 0;
}

.bt-chatbot__eyebrow {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(15, 76, 129, 0.1);
    color: #0F4C81;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.bt-chatbot__window {
    border: 1px solid rgba(15, 76, 129, 0.14);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 76, 129, 0.08);
    overflow: hidden;
}

.bt-chatbot__messages {
    max-height: 420px;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    background:
        radial-gradient(circle at top right, rgba(15, 76, 129, 0.07), transparent 34%),
        linear-gradient(180deg, rgba(15, 76, 129, 0.04) 0%, rgba(15, 76, 129, 0.01) 100%);
}

.bt-chatbot__message {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 88%;
}

.bt-chatbot__message--user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.bt-chatbot__avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0F4C81;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 12px 24px rgba(15, 76, 129, 0.14);
}

.bt-chatbot__message--user .bt-chatbot__avatar {
    background: rgba(15, 76, 129, 0.12);
    color: #0F4C81;
    box-shadow: none;
}

.bt-chatbot__bubble {
    min-width: 0;
    border-radius: 20px 20px 20px 8px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.12);
    color: #0F4C81;
    box-shadow: 0 14px 28px rgba(15, 76, 129, 0.07);
}

.bt-chatbot__message--user .bt-chatbot__bubble {
    background: #0F4C81;
    border-color: #0F4C81;
    color: #ffffff;
    border-radius: 20px 20px 8px 20px;
}

.bt-chatbot__meta {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(15, 76, 129, 0.62);
}

.bt-chatbot__message--user .bt-chatbot__meta {
    color: rgba(255, 255, 255, 0.78);
}

.bt-chatbot__text {
    color: inherit;
    font-size: 15px;
    line-height: 1.75;
    word-break: break-word;
}

.bt-chatbot__text p {
    margin-bottom: 8px;
}

.bt-chatbot__text p:last-child {
    margin-bottom: 0;
}

.bt-chatbot__text a {
    color: inherit !important;
    font-weight: 600;
    text-decoration: underline;
}

.bt-chatbot__composer {
    gap: 12px;
}

.bt-chatbot__composer-head,
.bt-chatbot__composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.bt-chatbot__hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6f8398;
    text-align: right;
}

.bt-chatbot__input {
    min-height: 118px;
    max-height: 220px;
}

.bt-chatbot__status {
    min-height: 20px;
    color: #6f8398;
    font-size: 13px;
    line-height: 1.5;
}

.bt-chatbot__status.is-error {
    color: #a0442d;
}

.bt-chatbot__typing {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.bt-chatbot__typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bt-chatbot__typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.28;
    animation: btChatbotTyping 1.1s infinite ease-in-out;
}

.bt-chatbot__typing-dot:nth-child(2) {
    animation-delay: 0.14s;
}

.bt-chatbot__typing-dot:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes btChatbotTyping {
    0%,
    80%,
    100% {
        opacity: 0.28;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@media (max-width: 991.98px) {
    .bt-chatbot__header {
        flex-direction: column;
        align-items: stretch;
    }

    .bt-chatbot__eyebrow {
        align-self: flex-start;
    }
}

@media (max-width: 767.98px) {
    .bt-chatbot__messages {
        max-height: 360px;
        padding: 16px;
    }

    .bt-chatbot__message {
        max-width: 100%;
        gap: 10px;
    }

    .bt-chatbot__avatar {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        font-size: 11px;
    }

    .bt-chatbot__bubble {
        padding: 12px 14px;
    }

    .bt-chatbot__composer-head,
    .bt-chatbot__composer-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .bt-chatbot__hint {
        text-align: left;
    }
}
