.xcom-tieu-boi-launcher {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    cursor: pointer;
    overflow: visible;
    appearance: none;
    -webkit-appearance: none;
    isolation: isolate;
}

.xcom-tieu-boi-launcher--fallback {
    position: fixed;
    right: 20px;
    bottom: 166px;
    z-index: 9999;
    width: 58px;
    height: 58px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #0b7a3e;
    box-shadow: 0 5px 15px rgba(11, 122, 62, .38);
}

.xcom-tieu-boi-launcher__photo,
.xcom-tieu-boi-panel__avatar {
    display: block;
    overflow: hidden;
    border-radius: 50%;
    background: #fffaf0;
}

.xcom-tieu-boi-launcher__photo {
    width: calc(100% - 5px);
    height: calc(100% - 5px);
}

.xcom-tieu-boi-launcher__photo img,
.xcom-tieu-boi-panel__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(2.15) translate(-10%, 5%);
    transform-origin: center;
}

.xcom-tieu-boi-launcher__status {
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #24a148;
    box-shadow: 0 0 0 1px #0b7a3e;
    z-index: 2;
}

.xcom-tieu-boi-panel,
.xcom-tieu-boi-panel * {
    box-sizing: border-box;
}

.xcom-tieu-boi-panel {
    position: fixed;
    right: 94px;
    bottom: 24px;
    z-index: 100001;
    display: flex;
    width: min(430px, calc(100vw - 126px));
    height: min(760px, calc(100dvh - 48px));
    min-height: 520px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(18, 58, 42, .18);
    border-radius: 22px;
    background: #fffdf8;
    box-shadow: 0 24px 70px rgba(18, 58, 42, .28), 0 4px 18px rgba(18, 58, 42, .12);
    opacity: 0;
    transform: translateY(18px) scale(.97);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .2s ease;
}

.xcom-tieu-boi-panel[hidden],
.xcom-tieu-boi-backdrop[hidden] {
    display: none !important;
}

.xcom-tieu-boi-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.xcom-tieu-boi-panel__header {
    display: flex;
    min-height: 68px;
    align-items: center;
    gap: 11px;
    padding: 10px 12px 10px 14px;
    border-bottom: 1px solid #d9ded8;
    background: #fffdf8;
}

.xcom-tieu-boi-panel__avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 2px solid #e2b44d;
}

.xcom-tieu-boi-panel__avatar i {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border: 2px solid #fffdf8;
    border-radius: 50%;
    background: #24a148;
}

.xcom-tieu-boi-panel__identity {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    line-height: 1.2;
}

.xcom-tieu-boi-panel__identity strong {
    color: #123a2a !important;
    font-size: 16px;
    font-weight: 850 !important;
}

.xcom-tieu-boi-panel__identity small {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    color: #66726b;
    font-size: 11px;
    font-weight: 650;
}

.xcom-tieu-boi-panel__identity small i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #24a148;
}

.xcom-tieu-boi-panel__close {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef2ed;
    color: #123a2a;
    cursor: pointer;
}

.xcom-tieu-boi-panel__close:hover,
.xcom-tieu-boi-panel__close:focus-visible {
    background: #e0eadf;
    outline: 2px solid #e2b44d;
    outline-offset: 2px;
}

.xcom-tieu-boi-panel__close svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.xcom-tieu-boi-panel__body {
    position: relative;
    min-height: 0;
    flex: 1;
    background: #fffdf8;
}

.xcom-tieu-boi-panel__body iframe {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fffdf8;
    opacity: 0;
    transition: opacity .18s ease;
}

.xcom-tieu-boi-panel__body.is-loaded iframe { opacity: 1; }
.xcom-tieu-boi-panel__body.is-loaded .xcom-tieu-boi-panel__loading { display: none; }

.xcom-tieu-boi-panel__loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    color: #5d6a62;
    text-align: center;
}

.xcom-tieu-boi-panel__loading span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    background: #123a2a;
    color: #f2bd36;
    font-weight: 900;
}

.xcom-tieu-boi-panel__loading p { margin: 12px 0 0; font-size: 13px; }

.xcom-tieu-boi-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(8, 25, 18, .28);
    opacity: 0;
    transition: opacity .2s ease;
}

.xcom-tieu-boi-backdrop.is-open { opacity: 1; }

@media (min-width: 768px) {
    .xcom-tieu-boi-backdrop { display: none !important; }
}

@media (max-width: 767px) {
    .xcom-tieu-boi-launcher--fallback {
        right: 15px;
        bottom: 148px;
        width: 52px;
        height: 52px;
    }

    .xcom-tieu-boi-panel {
        top: calc(var(--xcom-chat-viewport-top, 0px) + max(8px, env(safe-area-inset-top)));
        right: 8px;
        bottom: auto;
        left: 8px;
        width: auto;
        height: calc(var(--xcom-chat-viewport-height, 100dvh) - 16px - env(safe-area-inset-bottom, 0px));
        min-height: 0;
        border-radius: 18px;
    }

    body.xcom-tieu-boi-is-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .xcom-tieu-boi-panel,
    .xcom-tieu-boi-backdrop,
    .xcom-tieu-boi-panel__body iframe { transition: none; }
}
