.ttt-tgs-root,
.ttt-tgs-root * { box-sizing: border-box; }

.ttt-tgs-root {
    --ttt-color: #2947b9;
    position: fixed;
    z-index: 2147483000;
    right: 16px;
    bottom: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.ttt-tgs-launcher {
    position: relative;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ttt-color);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .28);
    transition: transform .2s ease, box-shadow .2s ease;
    padding: 0;
    isolation: isolate;
}

.ttt-tgs-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15, 23, 42, .34); }
.ttt-tgs-launcher:focus-visible,
.ttt-tgs-close:focus-visible,
.ttt-tgs-chip:focus-visible,
.ttt-tgs-primary:focus-visible,
.ttt-tgs-contact-picker:focus-visible,
.ttt-tgs-composer button:focus-visible,
.ttt-tgs-composer textarea:focus-visible,
.ttt-tgs-customer-form input:focus-visible,
.ttt-tgs-teaser-card:focus-visible,
.ttt-tgs-teaser-dismiss:focus-visible { outline: 3px solid color-mix(in srgb, var(--ttt-color) 35%, white); outline-offset: 2px; }
.ttt-tgs-launcher svg { position: relative; z-index: 2; width: 30px; height: 30px; fill: currentColor; }
.ttt-tgs-launcher-ring { position: absolute; inset: 0; border: 2px solid color-mix(in srgb, var(--ttt-color) 55%, white); border-radius: inherit; z-index: 1; pointer-events: none; }

.ttt-tgs-root.has-attention .ttt-tgs-launcher-ring { animation: ttt-tgs-pulse 2.2s ease-out infinite; }
.ttt-tgs-root.has-attention .ttt-tgs-launcher:not(.is-open) { animation: ttt-tgs-wiggle 7s ease-in-out infinite; }

.ttt-tgs-teaser {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: min(320px, calc(100vw - 24px));
    max-height: min(430px, calc(100dvh - 90px));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    overflow-y: auto;
    overflow-x: visible;
    padding: 2px 2px 3px 4px;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    scrollbar-width: thin;
}

.ttt-tgs-teaser.is-panel-open,
.ttt-tgs-teaser.is-dismissed { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px) scale(.98); }
.ttt-tgs-teaser.has-session .ttt-tgs-teaser-quick { display: flex; }
.ttt-tgs-teaser.has-session .ttt-tgs-teaser-greeting::after { content: "\A Chạm để tiếp tục trò chuyện."; white-space: pre; font-size: 13px; color: #64748b; }

.ttt-tgs-teaser-card {
    position: relative;
    width: 100%;
    padding: 14px 16px 15px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
    cursor: pointer;
    color: #2c374a;
    backdrop-filter: blur(10px);
}

.ttt-tgs-root.has-attention .ttt-tgs-teaser-card { animation: ttt-tgs-float 4.8s ease-in-out infinite; }
.ttt-tgs-teaser-dismiss { position: absolute; top: 6px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: #94a3b8; font-size: 21px; line-height: 1; cursor: pointer; }
.ttt-tgs-teaser-dismiss:hover { background: #f1f5f9; color: #475569; }
.ttt-tgs-teaser-identity { display: flex; align-items: center; gap: 10px; padding-right: 16px; }
.ttt-tgs-teaser-identity strong { color: var(--ttt-color); font-size: 18px; line-height: 1.2; font-weight: 650; }
.ttt-tgs-teaser-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fffde0; color: var(--ttt-color); display: grid; place-items: center; font-size: 20px; font-weight: 800; overflow: hidden; flex: 0 0 auto; border: 1px solid rgba(15,23,42,.06); }
.ttt-tgs-teaser-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ttt-tgs-teaser-greeting { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: #344054; }
.ttt-tgs-teaser-quick { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: 100%; }
.ttt-tgs-teaser-chip { width: auto; max-width: 100%; background: rgba(255,255,255,.98); box-shadow: 0 5px 16px rgba(15,23,42,.10); font-size: 14px; padding: 7px 12px; }
.ttt-tgs-root.has-attention .ttt-tgs-teaser-chip { animation: ttt-tgs-chip-attention 5.5s ease-in-out infinite; animation-delay: calc(var(--ttt-index) * 170ms); }

.ttt-tgs-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: min(320px, calc(100vw - 24px));
    height: min(540px, calc(100vh - 100px));
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    box-shadow: 0 24px 65px rgba(15, 23, 42, .22);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.97);
    transform-origin: right bottom;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.ttt-tgs-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.ttt-tgs-header {
    min-height: 68px;
    padding: 12px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--ttt-color) 96%, white), var(--ttt-color));
    color: #fff;
}

.ttt-tgs-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ttt-tgs-avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--ttt-color); display: grid; place-items: center; font-size: 20px; font-weight: 800; overflow: hidden; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.65); }
.ttt-tgs-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ttt-tgs-identity-text { min-width: 0; display: flex; flex-direction: column; }
.ttt-tgs-identity-text strong { font-size: 16px; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ttt-tgs-identity-text span { font-size: 11px; opacity: .88; }
.ttt-tgs-close { border: 0; background: rgba(255,255,255,.15); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 25px; line-height: 1; cursor: pointer; }

.ttt-tgs-body { min-height: 0; flex: 1; display: flex; flex-direction: column; background: #f7f8fb; }
.ttt-tgs-intro { padding: 14px; overflow-y: auto; }
.ttt-tgs-intro > p { margin: 0 0 12px; padding: 12px 14px; background: #fff; border-radius: 16px 16px 16px 4px; box-shadow: 0 3px 12px rgba(15,23,42,.06); color: #273449; font-size: 14px; }
.ttt-tgs-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.ttt-tgs-chip { appearance: none; border: 2px solid var(--ttt-color); color: var(--ttt-color); background: #fff; border-radius: 999px; padding: 7px 12px; font: inherit; cursor: pointer; text-align: left; max-width: 100%; transition: background .18s ease, color .18s ease, transform .18s ease; }
.ttt-tgs-chip:hover { background: var(--ttt-color); color: #fff; transform: translateY(-1px); }

.ttt-tgs-customer-form { padding: 14px; overflow-y: auto; }
.ttt-tgs-form-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #1e293b; }
.ttt-tgs-selected-topic { margin: 0 0 13px; padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--ttt-color) 9%, white); color: var(--ttt-color); font-size: 13px; font-weight: 650; }
.ttt-tgs-customer-form label { display: block; color: #334155; font-weight: 600; font-size: 13px; margin-bottom: 11px; }
.ttt-tgs-customer-form small { font-weight: 400; color: #64748b; }
.ttt-tgs-customer-form input { width: 100%; height: 40px; margin-top: 5px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; font: inherit; color: #0f172a; }
.ttt-tgs-prefill-note { margin: -3px 0 10px; padding: 8px 10px; border-radius: 9px; background: #ecfdf3; color: #166534; font-size: 12px; }
.ttt-tgs-contact-picker { width: 100%; min-height: 38px; margin: -2px 0 10px; border: 1px dashed var(--ttt-color); border-radius: 10px; background: #fff; color: var(--ttt-color); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.ttt-tgs-contact-picker:disabled { opacity: .6; cursor: wait; }
.ttt-tgs-primary { width: 100%; min-height: 42px; border: 0; border-radius: 11px; padding: 10px 15px; background: var(--ttt-color); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.ttt-tgs-primary:disabled { opacity: .55; cursor: wait; }
.ttt-tgs-form-error { min-height: 20px; color: #b91c1c; font-size: 13px; margin-bottom: 7px; }
.ttt-tgs-privacy { text-align: center; font-size: 11px; color: #64748b; margin: 10px 0 0; }
.ttt-tgs-privacy a { color: var(--ttt-color); }

.ttt-tgs-conversation { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ttt-tgs-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 10px; scroll-behavior: smooth; }
.ttt-tgs-message { display: flex; margin: 6px 0; }
.ttt-tgs-message.ttt-tgs-customer { justify-content: flex-end; }
.ttt-tgs-message.ttt-tgs-agent,
.ttt-tgs-message.ttt-tgs-system { justify-content: flex-start; }
.ttt-tgs-bubble { max-width: 84%; border-radius: 15px; padding: 8px 11px; box-shadow: 0 2px 8px rgba(15,23,42,.06); word-break: break-word; }
.ttt-tgs-customer .ttt-tgs-bubble { background: var(--ttt-color); color: #fff; border-bottom-right-radius: 4px; }
.ttt-tgs-agent .ttt-tgs-bubble { background: #fff; color: #263247; border-bottom-left-radius: 4px; }
.ttt-tgs-system .ttt-tgs-bubble { background: #fff3cd; color: #6b4e00; font-size: 13px; }
.ttt-tgs-sender { display: block; font-size: 11px; margin-bottom: 3px; color: var(--ttt-color); }
.ttt-tgs-text { white-space: pre-wrap; }

.ttt-tgs-composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px; background: #fff; border-top: 1px solid #e5e7eb; }
.ttt-tgs-composer textarea { flex: 1; min-height: 40px; max-height: 96px; resize: vertical; border: 1px solid #cbd5e1; border-radius: 13px; padding: 10px 12px; font: inherit; color: #0f172a; background: #fff; }
.ttt-tgs-composer button { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--ttt-color); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ttt-tgs-composer button svg { width: 20px; height: 20px; fill: currentColor; }
.ttt-tgs-composer.is-sending button { opacity: .55; cursor: wait; }


@keyframes ttt-tgs-pulse {
    0% { transform: scale(.92); opacity: .75; }
    70%, 100% { transform: scale(1.48); opacity: 0; }
}

@keyframes ttt-tgs-wiggle {
    0%, 84%, 100% { transform: rotate(0); }
    87% { transform: rotate(-7deg); }
    90% { transform: rotate(7deg); }
    93% { transform: rotate(-4deg); }
    96% { transform: rotate(3deg); }
}

@keyframes ttt-tgs-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes ttt-tgs-chip-attention {
    0%, 72%, 100% { transform: translateX(0); box-shadow: 0 5px 16px rgba(15,23,42,.10); }
    78% { transform: translateX(-5px); box-shadow: 0 8px 21px rgba(15,23,42,.15); }
    84% { transform: translateX(0); }
}

@media (max-width: 520px) {
    .ttt-tgs-root { right: 10px; bottom: 12px; }
    .ttt-tgs-launcher { width: 54px; height: 54px; }
    .ttt-tgs-teaser { position: fixed; right: 8px; left: auto; bottom: 72px; width: min(308px, calc(100vw - 16px)); max-height: min(400px, calc(100dvh - 86px)); padding-left: 8px; }
    .ttt-tgs-teaser-card { padding: 14px 16px 15px; border-radius: 18px; }
    .ttt-tgs-teaser-identity strong { font-size: 17px; }
    .ttt-tgs-teaser-greeting { font-size: 14px; }
    .ttt-tgs-teaser-chip { font-size: 13px; padding: 6px 11px; }
    .ttt-tgs-panel { position: fixed; right: 8px; left: auto; bottom: 72px; width: min(320px, calc(100vw - 16px)); height: min(520px, calc(100dvh - 86px)); border-radius: 18px; }
    .ttt-tgs-chip { font-size: 13px; padding: 7px 11px; }
}

@media (max-height: 620px) and (max-width: 520px) {
    .ttt-tgs-teaser-card { padding: 14px 18px; }
    .ttt-tgs-teaser-avatar { width: 40px; height: 40px; }
    .ttt-tgs-teaser-identity strong { font-size: 18px; }
    .ttt-tgs-teaser-greeting { margin-top: 8px; font-size: 14px; }
    .ttt-tgs-teaser-quick { gap: 7px; }
    .ttt-tgs-teaser-chip { font-size: 14px; padding: 6px 12px; }
}


@media (max-height: 760px) and (min-width: 521px) {
    .ttt-tgs-panel { height: min(470px, calc(100vh - 88px)); }
    .ttt-tgs-teaser { max-height: min(360px, calc(100vh - 82px)); }
}

@media (prefers-reduced-motion: reduce) {
    .ttt-tgs-panel,
    .ttt-tgs-launcher,
    .ttt-tgs-chip,
    .ttt-tgs-teaser-card,
    .ttt-tgs-launcher-ring { transition: none; animation: none !important; }
}

/* v1.2: khóa kích thước icon để không bị Flatsome/theme ghi đè */
.ttt-tgs-root button,
.ttt-tgs-root textarea,
.ttt-tgs-root input {
    font-family: inherit;
    box-sizing: border-box;
}

.ttt-tgs-root button.ttt-tgs-close {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    line-height: 0 !important;
    text-indent: 0 !important;
    vertical-align: middle !important;
    background: rgba(255,255,255,.16) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.ttt-tgs-root button.ttt-tgs-close:hover {
    background: rgba(255,255,255,.24) !important;
}

.ttt-tgs-root button.ttt-tgs-close svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.4 !important;
    stroke-linecap: round !important;
}

.ttt-tgs-root .ttt-tgs-composer {
    align-items: center !important;
}

.ttt-tgs-root .ttt-tgs-composer textarea {
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    line-height: 22px !important;
    box-shadow: none !important;
    outline: none !important;
}

.ttt-tgs-root .ttt-tgs-composer textarea:focus {
    border-color: var(--ttt-color) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ttt-color) 18%, transparent) !important;
}

.ttt-tgs-root .ttt-tgs-composer button[type="submit"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    line-height: 0 !important;
    text-indent: 0 !important;
    vertical-align: middle !important;
    background: var(--ttt-color) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.ttt-tgs-root .ttt-tgs-composer button[type="submit"] svg {
    display: block !important;
    width: 19px !important;
    height: 19px !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: currentColor !important;
    transform: translateX(1px) !important;
}

.ttt-tgs-text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.ttt-tgs-agent .ttt-tgs-text a { color: var(--ttt-color); }
.ttt-tgs-customer .ttt-tgs-text a { color: #fff; }


/* v1.4: kích thước cấu hình từ trang quản trị.
 * compact dùng kích thước mặc định của v1.3; standard và large chỉ ghi đè trong phạm vi widget.
 */
.ttt-tgs-root.ttt-tgs-size-standard {
    font-size: 15px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-launcher {
    width: 60px;
    height: 60px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-launcher svg {
    width: 32px;
    height: 32px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser {
    bottom: 72px;
    width: min(360px, calc(100vw - 28px));
    max-height: min(470px, calc(100dvh - 100px));
    gap: 10px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-card {
    padding: 17px 20px 18px;
    border-radius: 21px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-avatar {
    width: 44px;
    height: 44px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-identity strong {
    font-size: 20px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-greeting {
    margin-top: 10px;
    font-size: 17px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-quick {
    gap: 9px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-chip {
    font-size: 15px;
    padding: 8px 14px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-panel {
    bottom: 70px;
    width: min(360px, calc(100vw - 28px));
    height: min(580px, calc(100vh - 112px));
    border-radius: 20px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-header {
    min-height: 73px;
    padding: 13px 14px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-avatar {
    width: 45px;
    height: 45px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-identity-text strong {
    font-size: 17px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-identity-text span {
    font-size: 12px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-intro,
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-customer-form {
    padding: 16px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-intro > p {
    padding: 13px 15px;
    font-size: 15px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-chip {
    padding: 8px 13px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-messages {
    padding: 14px 12px;
}
.ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-composer {
    padding: 9px;
}

.ttt-tgs-root.ttt-tgs-size-large {
    font-size: 15px;
    right: 20px;
    bottom: 20px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-launcher {
    width: 62px;
    height: 62px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-launcher svg {
    width: 34px;
    height: 34px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser {
    bottom: 78px;
    width: min(400px, calc(100vw - 28px));
    max-height: min(520px, calc(100dvh - 105px));
    gap: 11px;
    padding: 4px 2px 5px 8px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-card {
    padding: 20px 24px 21px;
    border-radius: 25px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-avatar {
    width: 48px;
    height: 48px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-identity strong {
    font-size: 23px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-greeting {
    margin-top: 13px;
    font-size: 20px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-quick {
    gap: 10px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-chip {
    font-size: 17px;
    padding: 9px 17px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-panel {
    bottom: 76px;
    width: min(390px, calc(100vw - 28px));
    height: min(620px, calc(100vh - 125px));
    border-radius: 22px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-header {
    min-height: 78px;
    padding: 14px 15px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-avatar {
    width: 48px;
    height: 48px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-identity-text strong {
    font-size: 17px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-identity-text span {
    font-size: 12px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-intro,
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-customer-form {
    padding: 18px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-intro > p {
    margin-bottom: 16px;
    padding: 14px 16px;
    font-size: 16px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-quick {
    gap: 10px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-chip {
    padding: 9px 14px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-messages {
    padding: 16px 13px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-message {
    margin: 8px 0;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-bubble {
    max-width: 82%;
    border-radius: 16px;
    padding: 9px 12px;
}
.ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-composer {
    padding: 10px;
}

@media (max-width: 520px) {
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-launcher {
        width: 56px;
        height: 56px;
    }
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser {
        right: 8px;
        bottom: 74px;
        width: min(340px, calc(100vw - 16px));
        max-height: min(440px, calc(100dvh - 88px));
    }
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-panel {
        right: 8px;
        bottom: 74px;
        width: min(350px, calc(100vw - 16px));
        height: min(570px, calc(100dvh - 88px));
    }
    .ttt-tgs-root.ttt-tgs-size-large {
        right: 10px;
        bottom: 12px;
    }
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-launcher {
        width: 58px;
        height: 58px;
    }
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser {
        right: 8px;
        bottom: 76px;
        width: min(380px, calc(100vw - 16px));
        max-height: min(500px, calc(100dvh - 90px));
    }
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-panel {
        right: 8px;
        bottom: 76px;
        width: min(390px, calc(100vw - 16px));
        height: min(620px, calc(100dvh - 90px));
    }
}


/* v1.5: kích thước tự nhập từ trang quản trị. */
.ttt-tgs-root.ttt-tgs-size-custom {
    right: var(--ttt-custom-right, 12px);
    bottom: var(--ttt-custom-bottom, 12px);
    font-size: var(--ttt-custom-font, 13px);
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-launcher {
    width: var(--ttt-custom-launcher, 50px);
    height: var(--ttt-custom-launcher, 50px);
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-launcher svg {
    width: 54%;
    height: 54%;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser {
    bottom: calc(var(--ttt-custom-launcher, 50px) + 10px);
    width: min(var(--ttt-custom-teaser-width, 300px), calc(100vw - 16px));
    max-height: min(420px, calc(100dvh - var(--ttt-custom-launcher, 50px) - var(--ttt-custom-bottom, 12px) - 22px));
    gap: 7px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-card {
    padding: 12px 14px 13px;
    border-radius: 16px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-avatar {
    width: clamp(34px, calc(var(--ttt-custom-launcher, 50px) - 10px), 44px);
    height: clamp(34px, calc(var(--ttt-custom-launcher, 50px) - 10px), 44px);
    font-size: var(--ttt-custom-font, 13px);
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-identity strong {
    font-size: calc(var(--ttt-custom-font, 13px) + 3px);
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-greeting,
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-chip,
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-chip,
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-intro > p {
    font-size: var(--ttt-custom-font, 13px);
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-greeting {
    margin-top: 7px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-chip,
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-chip {
    padding: 6px 10px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-panel {
    bottom: calc(var(--ttt-custom-launcher, 50px) + 8px);
    width: min(var(--ttt-custom-width, 300px), calc(100vw - 16px));
    height: min(var(--ttt-custom-height, 480px), calc(100dvh - var(--ttt-custom-launcher, 50px) - var(--ttt-custom-bottom, 12px) - 18px));
    border-radius: 16px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-header {
    min-height: clamp(58px, calc(var(--ttt-custom-launcher, 50px) + 12px), 74px);
    padding: 10px 12px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-avatar {
    width: clamp(36px, calc(var(--ttt-custom-launcher, 50px) - 8px), 46px);
    height: clamp(36px, calc(var(--ttt-custom-launcher, 50px) - 8px), 46px);
    font-size: calc(var(--ttt-custom-font, 13px) + 3px);
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-identity-text strong {
    font-size: calc(var(--ttt-custom-font, 13px) + 2px);
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-identity-text span,
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-customer-form label,
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-form-error {
    font-size: max(11px, calc(var(--ttt-custom-font, 13px) - 1px));
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-intro,
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-customer-form {
    padding: 12px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-intro > p {
    margin-bottom: 10px;
    padding: 10px 12px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-messages {
    padding: 10px 9px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-message {
    margin: 5px 0;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-bubble {
    max-width: 86%;
    padding: 7px 10px;
}
.ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-composer {
    padding: 7px;
}

@media (max-width: 520px) {
    .ttt-tgs-root.ttt-tgs-size-custom {
        right: min(var(--ttt-custom-right, 12px), 12px);
        bottom: min(var(--ttt-custom-bottom, 12px), 16px);
    }
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-panel {
        right: 0;
        left: auto;
    }
}

@media (max-height: 680px) {
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-panel,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-panel {
        height: calc(100dvh - 86px);
    }
}


/* v1.6: cấu hình riêng cho mobile, ưu tiên không che nội dung sản phẩm. */
@media (max-width: 767px) {
    .ttt-tgs-root,
    .ttt-tgs-root.ttt-tgs-size-standard,
    .ttt-tgs-root.ttt-tgs-size-large,
    .ttt-tgs-root.ttt-tgs-size-custom {
        right: var(--ttt-mobile-right, 8px) !important;
        bottom: var(--ttt-mobile-bottom, 8px) !important;
        font-size: var(--ttt-mobile-font, 12px) !important;
    }

    .ttt-tgs-root .ttt-tgs-launcher,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-launcher,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-launcher,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-launcher {
        width: var(--ttt-mobile-launcher, 46px) !important;
        height: var(--ttt-mobile-launcher, 46px) !important;
        min-width: var(--ttt-mobile-launcher, 46px) !important;
        min-height: var(--ttt-mobile-launcher, 46px) !important;
    }

    .ttt-tgs-root .ttt-tgs-launcher svg,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-launcher svg,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-launcher svg,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-launcher svg {
        width: 54% !important;
        height: 54% !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser {
        position: fixed !important;
        right: var(--ttt-mobile-right, 8px) !important;
        left: auto !important;
        bottom: calc(var(--ttt-mobile-bottom, 8px) + var(--ttt-mobile-launcher, 46px) + 8px) !important;
        width: min(var(--ttt-mobile-teaser-width, 260px), calc(100vw - var(--ttt-mobile-right, 8px) - 8px)) !important;
        max-height: min(46dvh, calc(100dvh - var(--ttt-mobile-launcher, 46px) - var(--ttt-mobile-bottom, 8px) - 22px)) !important;
        gap: 6px !important;
        padding: 2px !important;
        overflow-y: auto !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser-card,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-card,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-card,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-card {
        padding: 11px 13px 12px !important;
        border-radius: 15px !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser-avatar,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-avatar,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-avatar,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-avatar {
        width: 34px !important;
        height: 34px !important;
        font-size: var(--ttt-mobile-font, 12px) !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser-identity,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-identity,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-identity,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-identity {
        gap: 8px !important;
        padding-right: 16px !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser-identity strong,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-teaser-identity strong,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-teaser-identity strong,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-teaser-identity strong {
        font-size: calc(var(--ttt-mobile-font, 12px) + 2px) !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser-greeting,
    .ttt-tgs-root .ttt-tgs-teaser-chip,
    .ttt-tgs-root .ttt-tgs-chip,
    .ttt-tgs-root .ttt-tgs-intro > p {
        font-size: var(--ttt-mobile-font, 12px) !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser-greeting {
        margin-top: 6px !important;
        line-height: 1.4 !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser-quick {
        gap: 5px !important;
    }

    .ttt-tgs-root .ttt-tgs-teaser-chip,
    .ttt-tgs-root .ttt-tgs-chip {
        padding: 5px 9px !important;
        border-width: 1.5px !important;
    }

    .ttt-tgs-root.ttt-tgs-mobile-teaser-greeting_only .ttt-tgs-teaser-quick {
        display: none !important;
    }

    .ttt-tgs-root .ttt-tgs-panel,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-panel,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-panel,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-panel {
        position: fixed !important;
        right: var(--ttt-mobile-right, 8px) !important;
        left: auto !important;
        bottom: calc(var(--ttt-mobile-bottom, 8px) + var(--ttt-mobile-launcher, 46px) + 8px) !important;
        width: min(var(--ttt-mobile-width, 280px), calc(100vw - var(--ttt-mobile-right, 8px) - 8px)) !important;
        height: min(var(--ttt-mobile-height, 430px), calc(100dvh - var(--ttt-mobile-launcher, 46px) - var(--ttt-mobile-bottom, 8px) - 20px)) !important;
        border-radius: 15px !important;
    }

    .ttt-tgs-root .ttt-tgs-header,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-header,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-header,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-header {
        min-height: 58px !important;
        padding: 9px 10px !important;
        gap: 8px !important;
    }

    .ttt-tgs-root .ttt-tgs-avatar,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-avatar,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-avatar,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: calc(var(--ttt-mobile-font, 12px) + 2px) !important;
    }

    .ttt-tgs-root .ttt-tgs-identity-text strong,
    .ttt-tgs-root.ttt-tgs-size-standard .ttt-tgs-identity-text strong,
    .ttt-tgs-root.ttt-tgs-size-large .ttt-tgs-identity-text strong,
    .ttt-tgs-root.ttt-tgs-size-custom .ttt-tgs-identity-text strong {
        font-size: calc(var(--ttt-mobile-font, 12px) + 2px) !important;
    }

    .ttt-tgs-root .ttt-tgs-identity-text span,
    .ttt-tgs-root .ttt-tgs-customer-form label,
    .ttt-tgs-root .ttt-tgs-form-error {
        font-size: max(10px, calc(var(--ttt-mobile-font, 12px) - 1px)) !important;
    }

    .ttt-tgs-root .ttt-tgs-intro,
    .ttt-tgs-root .ttt-tgs-customer-form {
        padding: 10px !important;
    }

    .ttt-tgs-root .ttt-tgs-intro > p {
        margin-bottom: 8px !important;
        padding: 9px 10px !important;
    }

    .ttt-tgs-root .ttt-tgs-messages {
        padding: 8px !important;
    }

    .ttt-tgs-root .ttt-tgs-message {
        margin: 4px 0 !important;
    }

    .ttt-tgs-root .ttt-tgs-bubble {
        max-width: 88% !important;
        padding: 7px 9px !important;
    }

    .ttt-tgs-root .ttt-tgs-composer {
        gap: 6px !important;
        padding: 6px !important;
    }

    .ttt-tgs-root .ttt-tgs-composer textarea {
        height: 38px !important;
        min-height: 38px !important;
        padding: 8px 9px !important;
        font-size: var(--ttt-mobile-font, 12px) !important;
    }

    .ttt-tgs-root .ttt-tgs-composer button[type="submit"] {
        flex-basis: 40px !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }

    .ttt-tgs-root button.ttt-tgs-close {
        flex-basis: 34px !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
    }
}

/* v1.8: phản hồi tức thì và trạng thái gửi mượt hơn */
.ttt-tgs-message .ttt-tgs-delivery-status {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.2;
    text-align: right;
    opacity: .72;
}

.ttt-tgs-message.is-pending .ttt-tgs-bubble {
    opacity: .78;
}

.ttt-tgs-message.is-pending .ttt-tgs-delivery-status::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 4px;
    border-radius: 50%;
    background: currentColor;
    animation: ttt-tgs-delivery-blink .8s ease-in-out infinite alternate;
}

.ttt-tgs-message.is-failed .ttt-tgs-bubble {
    outline: 1px solid rgba(185, 28, 28, .55);
}

.ttt-tgs-message.is-failed .ttt-tgs-delivery-status {
    color: #fecaca;
    opacity: 1;
}

.ttt-tgs-composer textarea {
    overflow-y: auto;
    transition: height .12s ease, border-color .18s ease, box-shadow .18s ease;
}

@keyframes ttt-tgs-delivery-blink {
    from { opacity: .25; transform: scale(.8); }
    to { opacity: 1; transform: scale(1.1); }
}

/* v1.9: tương thích Chrome/Windows và chống theme/extension làm ẩn nội dung. */
.ttt-tgs-root {
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.ttt-tgs-root .ttt-tgs-header {
    background: var(--ttt-color);
    background: linear-gradient(135deg, color-mix(in srgb, var(--ttt-color) 96%, white), var(--ttt-color));
}

.ttt-tgs-root .ttt-tgs-body,
.ttt-tgs-root .ttt-tgs-conversation,
.ttt-tgs-root .ttt-tgs-messages,
.ttt-tgs-root .ttt-tgs-message,
.ttt-tgs-root .ttt-tgs-bubble,
.ttt-tgs-root .ttt-tgs-text,
.ttt-tgs-root .ttt-tgs-sender,
.ttt-tgs-root .ttt-tgs-delivery-status {
    visibility: visible !important;
    opacity: 1 !important;
}

.ttt-tgs-root .ttt-tgs-message {
    display: flex !important;
}

.ttt-tgs-root .ttt-tgs-bubble {
    display: block !important;
    font-family: inherit !important;
    font-style: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ttt-tgs-root .ttt-tgs-text {
    display: inline !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: 1.45 !important;
    font-weight: 400 !important;
    text-shadow: none !important;
}

.ttt-tgs-root .ttt-tgs-agent .ttt-tgs-bubble {
    background: #ffffff !important;
    color: #263247 !important;
}

.ttt-tgs-root .ttt-tgs-customer .ttt-tgs-bubble {
    background: var(--ttt-color) !important;
    color: #ffffff !important;
}

.ttt-tgs-root .ttt-tgs-system .ttt-tgs-bubble {
    background: #fff3cd !important;
    color: #6b4e00 !important;
}

.ttt-tgs-root .ttt-tgs-message.is-connection-error .ttt-tgs-bubble {
    background: #fff1f2 !important;
    color: #9f1239 !important;
    border: 1px solid #fecdd3 !important;
}

.ttt-tgs-root [hidden] {
    display: none !important;
}

/* v2.0: chế độ hiệu năng cao cho Chrome/Windows. */
.ttt-tgs-root {
    contain: style;
}

.ttt-tgs-root .ttt-tgs-panel {
    contain: layout paint;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .18) !important;
    transition: opacity .16s ease, transform .16s ease, visibility .16s !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.ttt-tgs-root .ttt-tgs-teaser-card {
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .13) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.ttt-tgs-root .ttt-tgs-messages {
    scroll-behavior: auto !important;
    overscroll-behavior: contain;
    contain: layout paint;
}

.ttt-tgs-root .ttt-tgs-composer textarea {
    transition: border-color .14s ease, box-shadow .14s ease !important;
}

.ttt-tgs-root.is-engaged .ttt-tgs-launcher,
.ttt-tgs-root.is-engaged .ttt-tgs-launcher-ring,
.ttt-tgs-root.is-engaged .ttt-tgs-teaser-card,
.ttt-tgs-root.is-engaged .ttt-tgs-teaser-chip {
    animation: none !important;
}

@media (max-width: 767px), (pointer: coarse) {
    .ttt-tgs-root .ttt-tgs-panel,
    .ttt-tgs-root .ttt-tgs-teaser-card,
    .ttt-tgs-root .ttt-tgs-launcher {
        box-shadow: 0 8px 24px rgba(15, 23, 42, .16) !important;
    }
}


/* v2.1: khóa căn chỉnh nút câu hỏi sẵn và cho phép chọn lại nhiều lần. */
.ttt-tgs-root .ttt-tgs-teaser-quick,
.ttt-tgs-root .ttt-tgs-quick {
    min-width: 0 !important;
}

.ttt-tgs-root button.ttt-tgs-chip {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: var(--ttt-quick-height, 34px) !important;
    height: auto !important;
    padding: 6px 11px !important;
    margin: 0 !important;
    border-width: 1.5px !important;
    border-style: solid !important;
    border-color: var(--ttt-color) !important;
    border-radius: 999px !important;
    font-family: inherit !important;
    font-size: var(--ttt-quick-font, 13px) !important;
    font-weight: 500 !important;
    font-style: normal !important;
    line-height: 1.25 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: center !important;
    text-indent: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    vertical-align: middle !important;
    box-shadow: none !important;
}

.ttt-tgs-root button.ttt-tgs-chip::before,
.ttt-tgs-root button.ttt-tgs-chip::after {
    display: none !important;
    content: none !important;
}

.ttt-tgs-root button.ttt-tgs-chip:disabled,
.ttt-tgs-root button.ttt-tgs-chip.is-sending {
    cursor: wait !important;
    opacity: .62 !important;
    transform: none !important;
}

.ttt-tgs-root.ttt-tgs-quick-layout-full .ttt-tgs-teaser-quick {
    align-items: stretch !important;
}

.ttt-tgs-root.ttt-tgs-quick-layout-full .ttt-tgs-teaser-chip,
.ttt-tgs-root.ttt-tgs-quick-layout-full .ttt-tgs-intro .ttt-tgs-chip {
    width: 100% !important;
}

.ttt-tgs-root .ttt-tgs-conversation-quick {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.ttt-tgs-root .ttt-tgs-conversation-quick[hidden] {
    display: none !important;
}

.ttt-tgs-root button.ttt-tgs-conversation-chip {
    flex: 0 0 auto !important;
    max-width: min(230px, 82%) !important;
    min-height: max(30px, calc(var(--ttt-quick-height, 34px) - 2px)) !important;
    padding: 5px 10px !important;
    background: #fff !important;
    font-size: max(11px, calc(var(--ttt-quick-font, 13px) - 1px)) !important;
}

.ttt-tgs-root .ttt-tgs-teaser.has-session .ttt-tgs-teaser-quick {
    display: flex !important;
}

@media (max-width: 767px) {
    .ttt-tgs-root button.ttt-tgs-chip {
        min-height: var(--ttt-mobile-quick-height, 32px) !important;
        padding: 5px 9px !important;
        font-size: var(--ttt-mobile-quick-font, 12px) !important;
    }

    .ttt-tgs-root .ttt-tgs-conversation-quick {
        gap: 5px;
        padding: 5px 6px;
    }

    .ttt-tgs-root button.ttt-tgs-conversation-chip {
        max-width: min(210px, 84%) !important;
        min-height: max(28px, calc(var(--ttt-mobile-quick-height, 32px) - 2px)) !important;
        padding: 4px 8px !important;
        font-size: max(10px, calc(var(--ttt-mobile-quick-font, 12px) - 1px)) !important;
    }
}


/* v2.2: bảo đảm câu hỏi nhanh luôn bấm được và không mất chữ khi hover. */
.ttt-tgs-root .ttt-tgs-teaser:not(.is-panel-open):not(.is-dismissed) {
    pointer-events: auto !important;
}

.ttt-tgs-root .ttt-tgs-teaser-quick,
.ttt-tgs-root .ttt-tgs-quick,
.ttt-tgs-root .ttt-tgs-conversation-quick {
    position: relative !important;
    z-index: 6 !important;
    pointer-events: auto !important;
}

.ttt-tgs-root button.ttt-tgs-chip,
.ttt-tgs-root button.ttt-tgs-teaser-chip,
.ttt-tgs-root button.ttt-tgs-conversation-chip {
    position: relative !important;
    z-index: 7 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--ttt-color) !important;
    -webkit-text-fill-color: var(--ttt-color) !important;
    opacity: 1 !important;
}

.ttt-tgs-root button.ttt-tgs-chip:hover,
.ttt-tgs-root button.ttt-tgs-chip:focus,
.ttt-tgs-root button.ttt-tgs-chip:focus-visible,
.ttt-tgs-root button.ttt-tgs-chip:active,
.ttt-tgs-root button.ttt-tgs-teaser-chip:hover,
.ttt-tgs-root button.ttt-tgs-teaser-chip:focus,
.ttt-tgs-root button.ttt-tgs-teaser-chip:focus-visible,
.ttt-tgs-root button.ttt-tgs-teaser-chip:active,
.ttt-tgs-root button.ttt-tgs-conversation-chip:hover,
.ttt-tgs-root button.ttt-tgs-conversation-chip:focus,
.ttt-tgs-root button.ttt-tgs-conversation-chip:focus-visible,
.ttt-tgs-root button.ttt-tgs-conversation-chip:active {
    background-color: var(--ttt-color) !important;
    background-image: none !important;
    border-color: var(--ttt-color) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 1 !important;
}

.ttt-tgs-root button.ttt-tgs-chip:disabled,
.ttt-tgs-root button.ttt-tgs-chip.is-sending {
    pointer-events: none !important;
    cursor: wait !important;
    opacity: .62 !important;
}
