.gtx-chat {
    --gtx-chat-theme: var(--gtx-grad, linear-gradient(135deg, #0b5ed7, #163a72));
    --gtx-chat-accent: var(--gtx-accent-solid, #0b5ed7);
    --gtx-chat-on-theme: #fff;
    --gtx-chat-card-border: rgba(203, 213, 225, .82);
    --gtx-chat-card-radius: .85rem;
    --gtx-chat-card-shadow: 0 .22rem .62rem rgba(15, 23, 42, .075);
    --gtx-chat-card-shadow-hover: 0 .5rem 1.1rem rgba(22, 58, 114, .13);
    --gtx-chat-card-surface: rgba(255, 255, 255, .96);
    position: fixed;
    right: 1rem;
    bottom: calc(var(--gtx-footer-height, 0px) + 1rem);
    z-index: 1075;
    font-family: "Lato", sans-serif;
}

.gtx-chat-launcher {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 3rem;
    padding: .7rem 1rem;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    color: var(--gtx-chat-on-theme);
    background: var(--gtx-chat-theme);
    box-shadow: 0 .75rem 2rem rgba(15, 23, 42, .28);
    font-weight: 800;
}

.gtx-chat-launcher.gtx-chat-launcher--dropdown-hidden {
    display: none;
}

.gtx-chat-launcher:hover,
.gtx-chat-launcher:focus-visible {
    color: var(--gtx-chat-on-theme);
    transform: translateY(-1px);
    box-shadow: 0 1rem 2.25rem rgba(15, 23, 42, .34);
}

.gtx-chat-launcher i { font-size: 1.15rem; }

.gtx-chat-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(390px, calc(100vw - 2rem));
    height: min(620px, calc(100vh - var(--gtx-header-height, 0px) - var(--gtx-footer-height, 0px) - 2rem));
    min-height: 420px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 1rem;
    color: #172033;
    background: #fff;
    box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, .32);
}

.gtx-chat-panel[hidden] { display: none; }

.gtx-chat-header {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .8rem;
    color: var(--gtx-chat-on-theme);
    background: var(--gtx-chat-theme);
}

.gtx-chat-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 2.4rem;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .16);
}

.gtx-chat-title { font-weight: 800; line-height: 1.15; }
.gtx-chat-title span { margin-left: .25rem; padding: .1rem .3rem; border-radius: .3rem; background: rgba(255,255,255,.18); font-size: .62rem; vertical-align: middle; }
.gtx-chat-status { margin-top: .15rem; font-size: .72rem; opacity: .9; }
.gtx-chat-status i { display: inline-block; width: .45rem; height: .45rem; margin-right: .3rem; border-radius: 50%; background: #64e690; }

.gtx-chat-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    padding: 0;
    border: 0;
    border-radius: .5rem;
    color: inherit;
    background: transparent;
}

.gtx-chat-icon-button:hover,
.gtx-chat-icon-button:focus-visible { background: rgba(255, 255, 255, .16); }

.gtx-chat-guide-button {
    border: 1px solid rgba(255, 255, 255, .82);
    color: #1e293b;
    background: linear-gradient(145deg, #ffffff 0%, #e2e8f0 48%, #94a3b8 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 .3rem .7rem rgba(15, 23, 42, .28);
    font-weight: 900;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.gtx-chat-guide-button:hover,
.gtx-chat-guide-button:focus-visible,
.gtx-chat-guide-button[aria-expanded="true"] {
    color: #0f172a;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 42%, #cbd5e1 100%);
    box-shadow:
        inset 0 1px 0 #fff,
        0 .42rem .9rem rgba(15, 23, 42, .34);
    transform: translateY(-1px);
}

.gtx-chat-command-guide {
    position: absolute;
    inset: 4rem 0 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    min-height: 0;
    color: #172033;
    background:
        radial-gradient(circle at 100% 0, rgba(13, 110, 253, .1), transparent 12rem),
        linear-gradient(180deg, #f8faff 0%, #f2f5fa 100%);
}

.gtx-chat-command-guide[hidden] { display: none; }

.gtx-chat-command-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
    background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(242, 247, 255, .98));
    box-shadow: 0 .35rem 1.1rem rgba(15, 23, 42, .06);
}

.gtx-chat-command-guide-header strong {
    display: block;
    color: var(--gtx-chat-accent);
    font-size: 1rem;
    letter-spacing: -.01em;
}
.gtx-chat-command-guide-header > div > div { margin-top: .15rem; color: #667085; font-size: .72rem; }

.gtx-chat-guide-close {
    border: 1px solid #d5dce7;
    color: #344054;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 .15rem .4rem rgba(15, 23, 42, .08);
}

.gtx-chat-guide-close:hover,
.gtx-chat-guide-close:focus-visible { color: var(--gtx-chat-accent); background: #fff; }

.gtx-chat-command-guide-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: .8rem;
    scrollbar-color: rgba(82, 96, 117, .45) transparent;
    scrollbar-width: thin;
}

.gtx-chat-command-guide-list::-webkit-scrollbar { width: .45rem; }
.gtx-chat-command-guide-list::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(82, 96, 117, .35); }

.gtx-chat-command-guide-note {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .75rem .8rem;
    border: 1px solid rgba(13, 110, 253, .18);
    border-radius: .85rem;
    color: #344054;
    background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(231, 241, 255, .96));
    box-shadow: 0 .35rem .9rem rgba(22, 58, 114, .08);
    font-size: .72rem;
    line-height: 1.4;
}

.gtx-chat-command-guide-note > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    flex: 0 0 1.65rem;
    border-radius: .5rem;
    color: #fff;
    background: var(--gtx-chat-theme);
    box-shadow: 0 .25rem .55rem rgba(22, 58, 114, .18);
}

.gtx-chat-command-guide-group {
    display: flex;
    align-items: center;
    margin: 1rem .15rem .5rem;
}

.gtx-chat-command-guide-group button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem;
    border: 0;
    color: #526075;
    background: transparent;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
}

.gtx-chat-command-guide-group button:hover,
.gtx-chat-command-guide-group button:focus-visible {
    color: var(--gtx-chat-accent);
}

.gtx-chat-command-guide-group::after {
    height: 1px;
    flex: 1 1 auto;
    margin-left: .25rem;
    background: linear-gradient(90deg, rgba(148, 163, 184, .5), transparent);
    content: "";
}

.gtx-chat-command-guide-group i { color: var(--gtx-chat-accent); font-size: .78rem; }

.gtx-chat-guide-chevron {
    transition: transform .18s ease;
}

[data-chat-guide-toggle][aria-expanded="true"] .gtx-chat-guide-chevron {
    transform: rotate(180deg);
}

.gtx-chat-command-guide-item {
    position: relative;
    padding: .72rem .75rem;
    overflow: hidden;
    border: 1px solid var(--gtx-chat-card-border);
    border-radius: var(--gtx-chat-card-radius);
    background: var(--gtx-chat-card-surface);
    box-shadow: var(--gtx-chat-card-shadow);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.gtx-chat-command-guide-item::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--gtx-chat-theme);
    content: "";
    opacity: .8;
}

.gtx-chat-command-guide-item:hover {
    border-color: rgba(13, 110, 253, .35);
    box-shadow: var(--gtx-chat-card-shadow-hover);
    transform: translateY(-1px);
}

.gtx-chat-command-guide-item + .gtx-chat-command-guide-item { margin-top: .5rem; }

.gtx-chat-command-guide-item button {
    position: relative;
    width: 100%;
    padding: 0 1.35rem 0 0;
    border: 0;
    color: var(--gtx-chat-accent);
    background: transparent;
    text-align: left;
    font-size: .79rem;
    font-weight: 800;
    line-height: 1.3;
}

.gtx-chat-command-guide-item button::after {
    position: absolute;
    top: 50%;
    right: .05rem;
    color: #94a3b8;
    content: "\F285";
    font-family: "bootstrap-icons";
    font-size: .72rem;
    transform: translateY(-50%);
    transition: color .16s ease, transform .16s ease;
}

.gtx-chat-command-guide-item button:hover,
.gtx-chat-command-guide-item button:focus-visible { text-decoration: none; }

.gtx-chat-command-guide-item button:hover::after,
.gtx-chat-command-guide-item button:focus-visible::after { color: var(--gtx-chat-accent); transform: translate(.18rem, -50%); }

.gtx-chat-command-guide-item button:focus-visible { outline: 2px solid var(--gtx-chat-accent); outline-offset: .25rem; border-radius: .2rem; }

.gtx-chat-command-guide-item span {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin-top: .38rem;
    color: #526075;
    font-size: .7rem;
    line-height: 1.35;
}

.gtx-chat-command-guide-item span i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 1.2rem;
    border-radius: .35rem;
    color: var(--gtx-chat-accent);
    background: rgba(13, 110, 253, .08);
    font-size: .66rem;
}

.gtx-chat-command-guide-tip {
    padding: .72rem .85rem;
    border-top: 1px solid rgba(148, 163, 184, .25);
    color: #526075;
    background: linear-gradient(180deg, #fff, #f8faff);
    box-shadow: 0 -.3rem 1rem rgba(15, 23, 42, .04);
    font-size: .7rem;
    line-height: 1.35;
}

.gtx-chat-command-guide-tip i { margin-right: .35rem; color: var(--gtx-chat-accent); }

@media (prefers-reduced-motion: reduce) {
    .gtx-chat-command-guide-item,
    .gtx-chat-command-guide-item button::after { transition: none; }
}

.gtx-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    background: #f5f7fb;
}

.gtx-chat-message {
    width: fit-content;
    max-width: 88%;
    margin-bottom: .65rem;
    padding: .65rem .8rem;
    border-radius: .85rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: .9rem;
    line-height: 1.4;
}

.gtx-chat-message.is-assistant {
    position: relative;
    max-width: 94%;
    padding: .8rem .9rem .85rem 1rem;
    border: 1px solid #dce4ef;
    border-left: 3px solid var(--gtx-chat-accent);
    border-radius: .8rem;
    color: #24324a;
    background: linear-gradient(145deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 .3rem .8rem rgba(22, 58, 114, .1);
}

.gtx-chat-message.is-assistant::before {
    display: block;
    margin-bottom: .35rem;
    color: var(--gtx-chat-accent);
    content: "RABINOVICH";
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
}

.gtx-chat-message.is-user {
    margin-left: auto;
    border-bottom-right-radius: .25rem;
    color: var(--gtx-chat-on-theme);
    background: var(--gtx-chat-theme);
}

.gtx-chat-message.is-error { color: #842029; border-color: #f5c2c7; background: #f8d7da; }
.gtx-chat-message.is-warning { color: #664d03; border-color: #ffecb5; background: #fff3cd; }
.gtx-chat-message.is-thinking { color: #667085; font-style: italic; }
.gtx-chat-thinking-spinner { width: .8rem; height: .8rem; margin-left: .45rem; vertical-align: -.08rem; border-width: .12em; }
.gtx-chat-message a { font-weight: 700; }
.gtx-chat-message.is-assistant a { color: var(--gtx-chat-accent); }

.gtx-chat-vehicle-card {
    margin-top: .65rem;
    overflow: hidden;
    border: 1px solid var(--gtx-chat-card-border);
    border-radius: var(--gtx-chat-card-radius);
    background: var(--gtx-chat-card-surface);
    box-shadow: var(--gtx-chat-card-shadow);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.gtx-chat-vehicle-card:hover {
    border-color: rgba(13, 110, 253, .35);
    box-shadow: var(--gtx-chat-card-shadow-hover);
    transform: translateY(-1px);
}

.gtx-chat-vehicle-title {
    padding: .6rem .7rem;
    border-bottom: 1px solid #e4e9f1;
    color: var(--gtx-chat-accent);
    background: #f7f9fc;
    font-size: .85rem;
    letter-spacing: .01em;
}

.gtx-chat-vehicle-detail {
    display: grid;
    grid-template-columns: 1rem auto 1fr;
    align-items: baseline;
    gap: .35rem;
    padding: .35rem .7rem;
    color: #526075;
    font-size: .8rem;
}

.gtx-chat-vehicle-detail > i { color: var(--gtx-chat-accent); }
.gtx-chat-vehicle-detail-label { color: #344054; font-weight: 700; }

.gtx-chat-vehicle-detail.is-price {
    color: #172033;
    background: #f8fafc;
    font-weight: 700;
}

.gtx-chat-vehicle-link,
.gtx-chat-inventory-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: 100%;
    min-height: 2.3rem;
    padding: .5rem .7rem;
    border: 1px solid var(--gtx-chat-accent);
    border-radius: .6rem;
    color: var(--gtx-chat-on-theme) !important;
    background: var(--gtx-chat-theme);
    box-shadow: 0 .22rem .5rem rgba(22, 58, 114, .14);
    font-size: .76rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.gtx-chat-vehicle-link { margin-top: .1rem; }

.gtx-chat-inventory-link { margin-top: .75rem; }

.gtx-chat-vehicle-link i,
.gtx-chat-inventory-link i { font-size: 1rem; }

.gtx-chat-vehicle-link:hover,
.gtx-chat-vehicle-link:focus-visible,
.gtx-chat-inventory-link:hover,
.gtx-chat-inventory-link:focus-visible {
    color: var(--gtx-chat-on-theme) !important;
    filter: brightness(1.08);
    box-shadow: 0 .4rem .8rem rgba(22, 58, 114, .2);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .gtx-chat-vehicle-card,
    .gtx-chat-vehicle-link,
    .gtx-chat-inventory-link { transition: none; }
}

.gtx-chat-suggestions {
    display: flex;
    flex: 0 0 auto;
    gap: .4rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .55rem .7rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.gtx-chat-suggestions button {
    flex: 0 0 auto;
    padding: .35rem .55rem;
    border: 1px solid var(--gtx-chat-accent);
    border-radius: 999px;
    color: var(--gtx-chat-accent);
    background: #f8fbff;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.gtx-chat-suggestions button:disabled {
    cursor: wait;
    opacity: .5;
}

.gtx-chat-lead {
    max-height: 70%;
    overflow-y: auto;
    padding: .75rem;
    border-top: 1px solid #dce3ed;
    background: #fff;
}

.gtx-chat-panel.is-contact-open .gtx-chat-messages {
    flex: 0 0 5rem;
    max-height: 5rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid #dce3ed;
}

.gtx-chat-panel.is-contact-open .gtx-chat-message {
    max-width: 100%;
    margin-bottom: .35rem;
    padding: .45rem .6rem;
    font-size: .78rem;
}

.gtx-chat-panel.is-contact-open .gtx-chat-message::before,
.gtx-chat-panel.is-contact-open .gtx-chat-vehicle-card {
    display: none;
}

.gtx-chat-panel.is-contact-open .gtx-chat-suggestions { display: none; }

.gtx-chat-panel.is-contact-open .gtx-chat-lead {
    display: block;
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    padding: 1rem;
}

.gtx-chat-lead-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.gtx-chat-lead-heading .gtx-chat-icon-button { color: #3b4658; }
.gtx-chat-consent { margin: .55rem 0; font-size: .72rem; }
.gtx-chat-lead-feedback { min-height: 1.2rem; margin-bottom: .35rem; font-size: .76rem; }
.gtx-chat-lead-feedback.is-error { color: #b02a37; }
.gtx-chat-lead-feedback.is-success { color: #146c43; }
.gtx-chat-lead-feedback.is-warning { color: #8a6500; }

.gtx-chat-lead-actions {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: .5rem;
}

.gtx-chat-lead-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
}

.gtx-chat-compose {
    display: flex;
    align-items: end;
    gap: .5rem;
    padding: .65rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.gtx-chat-compose textarea {
    width: 100%;
    max-height: 7rem;
    resize: none;
    padding: .6rem .7rem;
    border: 1px solid #cfd6e1;
    border-radius: .7rem;
    outline: none;
    font: inherit;
    font-size: .86rem;
}

.gtx-chat-compose textarea:focus { border-color: var(--gtx-chat-accent); box-shadow: 0 0 0 .18rem rgba(15, 23, 42, .12); }
.gtx-chat-compose button { width: 2.55rem; height: 2.55rem; flex: 0 0 2.55rem; border: 0; border-radius: .7rem; color: var(--gtx-chat-on-theme); background: var(--gtx-chat-theme); }
.gtx-chat-compose button:disabled { opacity: .55; }
.gtx-chat-disclaimer { padding: 0 .7rem .55rem; color: #6b7280; background: #fff; text-align: center; font-size: .62rem; }

.gtx-chat-lead .btn-primary {
    border-color: var(--gtx-chat-accent);
    color: var(--gtx-chat-on-theme);
    background: var(--gtx-chat-theme);
}

html.theme-silver .gtx-chat { --gtx-chat-on-theme: #172033; }

@media (max-width: 575.98px) {
    .gtx-chat { right: .65rem; bottom: calc(var(--gtx-footer-height, 0px) + .65rem); }
    .gtx-chat-panel { position: fixed; inset: var(--gtx-header-height, 0px) 0 var(--gtx-footer-height, 0px); width: 100%; height: auto; min-height: 0; border: 0; border-radius: 0; }
    .gtx-chat-launcher span { display: none; }
    .gtx-chat-launcher { width: 3.25rem; height: 3.25rem; justify-content: center; padding: 0; }
}

@media (prefers-reduced-motion: no-preference) {
    .gtx-chat-launcher { transition: transform .15s ease, box-shadow .15s ease; }
}
