.ttg-sales-assistant {
    position: fixed;
    right: clamp(14px, 2.5vw, 30px);
    bottom: clamp(14px, 2.5vw, 28px);
    z-index: 2147482000;
    color: #0b3151;
    font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ttg-sales-assistant *,
.ttg-sales-assistant *::before,
.ttg-sales-assistant *::after {
    box-sizing: border-box;
}

.ttg-sales-assistant__launcher {
    position: relative;
    display: grid;
    width: 66px;
    height: 66px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 23px;
    background: linear-gradient(145deg, #fff 5%, #fff0f8 100%);
    box-shadow: 0 15px 38px rgba(8, 49, 81, .25), 0 0 0 3px rgba(237, 40, 145, .16);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ttg-sales-assistant__launcher::after {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: max-content;
    max-width: 190px;
    padding: 8px 11px;
    border-radius: 9px;
    background: #07395e;
    color: #fff;
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease;
}

.ttg-sales-assistant__launcher:hover,
.ttg-sales-assistant__launcher:focus-visible {
    outline: none;
    box-shadow: 0 18px 44px rgba(8, 49, 81, .32), 0 0 0 4px rgba(255, 205, 0, .32);
    transform: translateY(-2px);
}

.ttg-sales-assistant__launcher:hover::after,
.ttg-sales-assistant__launcher:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.ttg-sales-assistant.is-open .ttg-sales-assistant__launcher {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(.88);
}

.ttg-sales-assistant__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    display: grid;
    width: min(410px, calc(100vw - 28px));
    height: min(650px, calc(100vh - 42px));
    grid-template-rows: auto 1fr auto auto;
    overflow: hidden;
    border: 1px solid #efd3e2;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 85px rgba(8, 49, 81, .28);
    transform-origin: right bottom;
    animation: ttg-assistant-open .24s cubic-bezier(.2, .8, .25, 1);
}

.ttg-sales-assistant__panel[hidden] {
    display: none;
}

.ttg-sales-assistant__header {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 76px;
    padding: 13px 15px;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(125deg, #072f51, #9f185e 65%, #ed2891);
    color: #fff;
}

.ttg-sales-assistant__identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.ttg-sales-assistant__identity strong,
.ttg-sales-assistant__identity span {
    display: block;
}

.ttg-sales-assistant__identity strong {
    font-size: 16px;
    line-height: 1.2;
}

.ttg-sales-assistant__identity span {
    margin-top: 3px;
    font-size: 11px;
    opacity: .78;
}

.ttg-sales-assistant__mascot-dock {
    display: grid !important;
    width: 0;
    height: 48px;
    margin: 0;
    place-items: center;
    opacity: 0 !important;
    overflow: visible;
    transition: width .26s ease, opacity .2s ease, margin .26s ease;
}

.ttg-sales-assistant.has-conversation .ttg-sales-assistant__mascot-dock {
    width: 50px;
    margin-right: 1px;
    opacity: 1 !important;
}

.ttg-sales-assistant__header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
}

.ttg-sales-assistant__header-actions button {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ttg-sales-assistant__header-actions button:hover,
.ttg-sales-assistant__header-actions button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .13);
}

.ttg-sales-assistant__header-actions button:first-child {
    font-size: 21px;
}

.ttg-sales-assistant__messages {
    padding: 18px;
    overflow: auto;
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 205, 0, .13), transparent 30%),
        linear-gradient(#fff8fc, #fff);
    scrollbar-color: #d7a8c1 transparent;
    scrollbar-width: thin;
}

.ttg-sales-assistant__welcome {
    display: flex;
    min-height: 100%;
    padding: 8px 2px 22px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.ttg-sales-assistant.has-conversation .ttg-sales-assistant__welcome {
    display: none;
}

.ttg-sales-assistant__mascot-home {
    display: grid;
    min-height: 110px;
    place-items: center;
}

.ttg-sales-assistant__welcome h2 {
    max-width: 320px;
    margin: 12px auto 0;
    color: #082f50;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.ttg-sales-assistant__welcome > p {
    max-width: 315px;
    margin: 10px auto 19px;
    color: #5f7280;
    font-size: 13px;
    line-height: 1.55;
}

.ttg-sales-assistant__quick {
    display: flex;
    max-width: 340px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ttg-sales-assistant__quick button {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #e6bfd4;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #a51664;
    font: 700 12px/1.2 inherit;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.ttg-sales-assistant__quick button:hover,
.ttg-sales-assistant__quick button:focus-visible {
    outline: none;
    border-color: #ed2891;
    background: #fff0f8;
    transform: translateY(-1px);
}

.ttg-sales-assistant__message {
    max-width: 88%;
    margin: 0 0 12px;
    padding: 11px 13px;
    overflow-wrap: anywhere;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.55;
    animation: ttg-message-in .2s ease both;
}

.ttg-sales-assistant__message.is-assistant {
    margin-right: auto;
    border: 1px solid #ead9e2;
    background: #fff;
}

.ttg-sales-assistant__message.is-user {
    margin-left: auto;
    background: #ed2891;
    color: #fff;
}

.ttg-sales-assistant__message.is-pending {
    color: #64748b;
}

.ttg-sales-assistant__tour {
    margin: 10px 0;
    padding: 13px;
    border: 1px solid #ead4df;
    border-radius: 14px;
    background: #fff6fb;
}

.ttg-sales-assistant__tour strong,
.ttg-sales-assistant__tour span {
    display: block;
}

.ttg-sales-assistant__tour strong {
    font-size: 14px;
    line-height: 1.35;
}

.ttg-sales-assistant__tour span {
    margin-top: 5px;
    color: #557083;
    font-size: 12px;
}

.ttg-sales-assistant__tour a,
.ttg-sales-assistant__contact {
    display: inline-flex;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #06375e;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.ttg-sales-assistant__handoff {
    margin: 10px 0 14px;
    padding: 13px;
    border: 1px solid rgba(237, 40, 145, .25);
    border-radius: 14px;
    background: #fff7fb;
}

.ttg-sales-assistant__handoff p {
    margin: 0 0 10px;
    color: #425d70;
    font-size: 13px;
    line-height: 1.5;
}

.ttg-sales-assistant__handoff button {
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    background: #ed2891;
    color: #fff;
    font: 800 12px/1.2 inherit;
    cursor: pointer;
}

.ttg-sales-assistant__handoff button:hover,
.ttg-sales-assistant__handoff button:focus-visible {
    outline: 3px solid rgba(237, 40, 145, .18);
    background: #c91f79;
}

.ttg-sales-assistant__handoff button:disabled {
    cursor: wait;
    opacity: .62;
}

.ttg-sales-assistant__message a {
    color: #c71975;
    font-weight: 800;
    overflow-wrap: anywhere;
    text-decoration: underline;
}

.ttg-sales-assistant__price-note {
    display: block;
    margin: 7px 1px 14px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.4;
}

.ttg-sales-assistant__form {
    display: grid;
    padding: 10px 12px;
    grid-template-columns: 1fr auto;
    gap: 8px;
    border-top: 1px solid #e5eef2;
    background: #fff;
}

.ttg-sales-assistant__trap {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.ttg-sales-assistant__form textarea {
    width: 100%;
    min-height: 48px;
    max-height: 110px;
    padding: 11px;
    resize: none;
    border: 1px solid #dcb8cb;
    border-radius: 12px;
    color: #0b3151;
    font: 400 14px/1.4 inherit;
}

.ttg-sales-assistant__form textarea:focus {
    outline: 3px solid rgba(237, 40, 145, .16);
    border-color: #ed2891;
}

.ttg-sales-assistant__form button {
    min-width: 66px;
    border: 0;
    border-radius: 12px;
    background: #ed2891;
    color: #fff;
    font: 800 13px/1 inherit;
    cursor: pointer;
}

.ttg-sales-assistant__form button:disabled {
    opacity: .55;
    cursor: wait;
}

.ttg-sales-assistant__form button:not(:disabled):hover,
.ttg-sales-assistant__form button:not(:disabled):focus-visible {
    outline: 3px solid rgba(237, 40, 145, .18);
    background: #c91f79;
}

.ttg-sales-assistant__privacy {
    margin: 0;
    padding: 0 14px 12px;
    background: #fff;
    color: #718391;
    font-size: 9px;
    line-height: 1.35;
}

.ttg-thai-mascot {
    --eye-x: 0px;
    --eye-y: 0px;
    position: relative;
    display: inline-grid;
    width: 58px;
    height: 58px;
    place-items: center;
    filter: drop-shadow(0 7px 8px rgba(4, 47, 79, .20));
}

.ttg-thai-mascot.is-welcome {
    width: 106px;
    height: 106px;
    filter: drop-shadow(0 12px 13px rgba(4, 47, 79, .22));
}

.ttg-thai-mascot__face {
    fill: #07395e;
    stroke: #ed2891;
    stroke-width: 3;
}

.ttg-thai-mascot__ear {
    fill: #ed2891;
}

.ttg-thai-mascot__hat-top {
    fill: #ffd43b;
    stroke: #e6a900;
    stroke-width: 2;
}

.ttg-thai-mascot__hat-band {
    fill: #ed2891;
}

.ttg-thai-mascot__hat-brim {
    fill: #ffe98b;
    stroke: #e6a900;
    stroke-width: 2;
}

.ttg-thai-mascot__eye ellipse {
    fill: #fffdf6;
    transform-box: fill-box;
    transform-origin: center;
    transition: transform .09s ease;
}

.ttg-thai-mascot__pupil,
.ttg-thai-mascot__spark {
    transform: translate(var(--eye-x), var(--eye-y));
    transition: transform .08s linear;
}

.ttg-thai-mascot__pupil {
    fill: #101d2c;
}

.ttg-thai-mascot__spark {
    fill: #fff;
}

.ttg-thai-mascot__smile {
    fill: none;
    stroke: #ff87c6;
    stroke-width: 2.5;
    stroke-linecap: round;
}

.ttg-thai-mascot.is-blinking .ttg-thai-mascot__eye ellipse {
    transform: scaleY(.08);
}

.ttg-sales-assistant__mascot-dock .ttg-thai-mascot {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 4px 5px rgba(2, 31, 53, .28));
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes ttg-assistant-open {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ttg-message-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
    .ttg-sales-assistant {
        right: 12px;
        bottom: 12px;
    }

    .ttg-sales-assistant__launcher {
        width: 62px;
        height: 62px;
        border-radius: 21px;
    }

    .ttg-sales-assistant__panel {
        position: fixed;
        inset: 8px;
        width: auto;
        height: auto;
        max-height: none;
        border-radius: 20px;
    }

    .ttg-sales-assistant.is-keyboard-open .ttg-sales-assistant__panel {
        inset: 8px 8px auto;
        height: calc(var(--ttg-visible-height, 100dvh) - 16px);
    }

    .ttg-sales-assistant__welcome h2 {
        font-size: 22px;
    }

    .ttg-sales-assistant__privacy {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ttg-sales-assistant *,
    .ttg-sales-assistant *::before,
    .ttg-sales-assistant *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition-duration: .01ms !important;
    }

    .ttg-thai-mascot__pupil,
    .ttg-thai-mascot__spark {
        transform: none !important;
    }
}
