.gr-chat-root {
    bottom: var(--gr-chat-position-bottom, 22px);
    font-family: var(--gr-chat-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    left: var(--gr-chat-position-left, auto);
    position: fixed;
    right: var(--gr-chat-position-right, 22px);
    z-index: 99999;
}

#gr-chat-root .gr-chat-launcher,
.gr-chat-launcher {
    align-items: center;
    background: var(--gr-chat-primary, #1f4b99);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 42px !important;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    gap: 9px;
    line-height: 42px !important;
    min-height: 42px !important;
    padding: 0 15px !important;
    position: relative;
    text-align: center;
    transform: translateZ(0);
    transition: box-shadow .2s ease, transform .2s ease, background-color .2s ease;
    vertical-align: middle;
}

.gr-chat-launcher:hover,
.gr-chat-launcher:focus-visible,
.gr-chat-root.is-open .gr-chat-launcher {
    box-shadow: 0 14px 36px rgba(0, 0, 0, .24);
    transform: translateY(-1px);
}

.gr-chat-launcher:active {
    transform: translateY(0) scale(.98);
}

.gr-chat-launcher__dot {
    background: #8a94a6;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    height: 9px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 0 rgba(138, 148, 166, .35);
    position: relative;
    transition: background-color .2s ease;
    width: 9px;
}

.gr-chat-launcher__dot::after {
    animation: gr-chat-ping 1.8s ease-out infinite;
    border: 1px solid rgba(138, 148, 166, .4);
    border-radius: 999px;
    content: "";
    inset: -5px;
    position: absolute;
}

.gr-chat-root[data-availability="online"] .gr-chat-launcher__dot {
    background: #48c78e;
}

.gr-chat-root[data-availability="online"] .gr-chat-launcher__dot::after {
    border-color: rgba(72, 199, 142, .55);
}

.gr-chat-root[data-availability="limited"] .gr-chat-launcher__dot {
    background: #d49a1f;
}

.gr-chat-root[data-availability="limited"] .gr-chat-launcher__dot::after {
    border-color: rgba(212, 154, 31, .5);
}

.gr-chat-unread-badge {
    align-items: center;
    animation: gr-chat-badge-pop .24s cubic-bezier(.2, .8, .2, 1) both;
    background: #d63638;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .22);
    box-sizing: border-box;
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    line-height: 1;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: -8px;
    top: -8px;
    z-index: 2;
}

.gr-chat-unread-badge[hidden] {
    display: none !important;
}

.gr-chat-backdrop {
    background: rgba(6, 10, 18, .68);
    inset: 0;
    opacity: 0;
    position: fixed;
    transition: opacity .42s ease;
    z-index: -1;
}

.gr-chat-backdrop.is-visible {
    opacity: 1;
    z-index: 99998;
}

.gr-chat-backdrop[hidden] {
    display: none !important;
}

.gr-chat-panel {
    background: var(--gr-chat-panel-bg, #fff);
    /* border: 1px solid var(--gr-chat-border, #d9dee7);*/
    border-radius: var(--gr-chat-radius, 8px);
    bottom: 58px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .32);
    color: var(--gr-chat-text, #17212b);
    max-width: calc(100vw - 28px);
    opacity: 0;
    overflow: hidden;
    position: absolute;
    left: var(--gr-chat-panel-left, auto);
    right: var(--gr-chat-panel-right, 0);
    transform: translateY(12px) scale(.97);
    transform-origin: var(--gr-chat-panel-origin, right bottom);
    transition: opacity .42s ease, transform .42s cubic-bezier(.16, .84, .24, 1);
    width: 340px;
    z-index: 99999;
}

.gr-chat-panel.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gr-chat-root.is-expanded .gr-chat-panel {
    border-radius: min(var(--gr-chat-radius, 8px), 12px);
    bottom: auto;
    display: flex;
    flex-direction: column;
    left: 50%;
    max-height: calc(100vh - 48px);
    max-width: calc(100vw - 32px);
    position: fixed;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%) scale(.97);
    transform-origin: center center;
    width: min(720px, calc(100vw - 32px));
}

.gr-chat-root.is-expanded .gr-chat-panel.is-visible {
    transform: translate(-50%, -50%) scale(1);
}

.gr-chat-panel[hidden] {
    display: none !important;
}

.gr-chat-header {
    align-items: center;
    background: var(--gr-chat-primary, #1f4b99);
    color: #fff;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 11px 13px;
}

.gr-chat-header-actions {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.gr-chat-expand,
.gr-chat-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    min-width: 28px;
    padding: 0 6px;
}

.gr-chat-expand {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
}

.gr-chat-close {
    font-size: 24px;
    line-height: 1;
}

.gr-chat-expand:hover,
.gr-chat-expand:focus-visible,
.gr-chat-close:hover,
.gr-chat-close:focus-visible {
    background: rgba(255, 255, 255, .14);
    outline: none;
}

.gr-chat-intro,
.gr-chat-privacy {
    color: var(--gr-chat-muted, #4a5563);
    line-height: 1.4;
    margin: 0;
    padding: 10px 13px 0;
}

.gr-chat-intro {
    font-size: 14px;
}

.gr-chat-availability {
    align-items: flex-start;
    color: var(--gr-chat-muted, #4a5563);
    display: flex;
    font-size: 12px;
    gap: 7px;
    line-height: 1.35;
    padding: 9px 13px 0;
    transition: color .2s ease;
}

.gr-chat-availability__dot {
    background: #8a94a6;
    border-radius: 50%;
    flex: 0 0 auto;
    height: 8px;
    margin-top: 4px;
    transition: background-color .2s ease, box-shadow .2s ease;
    width: 8px;
}

.gr-chat-availability[data-state="online"] .gr-chat-availability__dot {
    background: #1aa179;
    box-shadow: 0 0 0 3px rgba(26, 161, 121, .14);
}

.gr-chat-availability[data-state="limited"] .gr-chat-availability__dot {
    background: #d49a1f;
    box-shadow: 0 0 0 3px rgba(212, 154, 31, .14);
}

.gr-chat-privacy {
    font-size: 12px;
}

.gr-chat-privacy p,
.gr-chat-privacy ul,
.gr-chat-privacy ol {
    margin: 0 0 6px;
}

.gr-chat-privacy p:last-child,
.gr-chat-privacy ul:last-child,
.gr-chat-privacy ol:last-child {
    margin-bottom: 0;
}

.gr-chat-privacy ul,
.gr-chat-privacy ol {
    padding-left: 18px;
}

.gr-chat-privacy a {
    color: var(--gr-chat-primary, #1f4b99);
    font-weight: 700;
    text-decoration: underline;
}

.gr-chat-messages {
    background: var(--gr-chat-app-bg, #f4f7f9);
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 220px;
    margin: 10px 0 0;
    overflow: auto;
    padding: 12px 13px;
}

.gr-chat-root.is-expanded .gr-chat-messages {
    flex: 1 1 auto;
    height: clamp(280px, 46vh, 520px);
}

.gr-chat-empty {
    color: var(--gr-chat-muted, #657282);
    font-size: 13px;
}

.gr-chat-system-notice {
    align-self: center;
    background: rgba(23, 33, 43, .08);
    border-radius: 999px;
    color: var(--gr-chat-muted, #657282);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    max-width: 92%;
    padding: 5px 9px;
    text-align: center;
}

.gr-chat-system-notice--new {
    animation: gr-chat-system-notice-in .28s cubic-bezier(.2, .8, .2, 1) both;
}

.gr-chat-bubble {
    border: 1px solid var(--gr-chat-border, #d9dee7);
    border-radius: var(--gr-chat-control-radius, 6px);
    font-size: 13px;
    line-height: 1.38;
    max-width: 82%;
    padding: 8px 10px;
    white-space: pre-wrap;
}

.gr-chat-bubble--new {
    animation: gr-chat-bubble-in .28s cubic-bezier(.2, .8, .2, 1) both;
}

.gr-chat-bubble p,
.gr-chat-bubble div,
.gr-chat-bubble blockquote,
.gr-chat-bubble ul,
.gr-chat-bubble ol {
    margin: 0 0 6px;
}

.gr-chat-bubble p:last-child,
.gr-chat-bubble div:last-child,
.gr-chat-bubble blockquote:last-child,
.gr-chat-bubble ul:last-child,
.gr-chat-bubble ol:last-child {
    margin-bottom: 0;
}

.gr-chat-bubble ul,
.gr-chat-bubble ol {
    padding-left: 18px;
}

.gr-chat-bubble a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.gr-chat-bubble--incoming {
    align-self: flex-start;
    background: var(--gr-chat-incoming-bg, #fff);
    border-color: var(--gr-chat-incoming-border, #d9dee7);
    color: var(--gr-chat-incoming-text, #1d2327);
}

.gr-chat-bubble--outgoing {
    align-self: flex-end;
    background: var(--gr-chat-outgoing-bg, #dcecf8);
    border-color: var(--gr-chat-outgoing-border, #dcecf8);
    color: var(--gr-chat-outgoing-text, #1d2327);
}

.gr-chat-typing {
    align-items: center;
    align-self: flex-end;
    background: var(--gr-chat-outgoing-bg, #dcecf8);
    border: 1px solid var(--gr-chat-outgoing-border, #dcecf8);
    border-radius: var(--gr-chat-control-radius, 6px);
    color: var(--gr-chat-muted, #4a5563);
    display: inline-flex;
    gap: 7px;
    font-size: 12px;
    line-height: 1.3;
    max-width: 82%;
    padding: 7px 9px;
}

.gr-chat-typing[hidden] {
    display: none !important;
}

.gr-chat-typing__dots {
    align-items: center;
    display: inline-flex;
    gap: 3px;
}

.gr-chat-typing__dots span {
    animation: gr-chat-typing-dot 1s ease-in-out infinite;
    background: currentColor;
    border-radius: 999px;
    display: block;
    height: 4px;
    opacity: .42;
    width: 4px;
}

.gr-chat-typing__dots span:nth-child(2) {
    animation-delay: .16s;
}

.gr-chat-typing__dots span:nth-child(3) {
    animation-delay: .32s;
}

.gr-chat-form {
    padding: 10px 13px 12px;
}

.gr-chat-fields {
    display: grid;
    gap: 7px;
    grid-template-columns: 1fr;
    margin-bottom: 8px;
}

#gr-chat-root.is-expanded .gr-chat-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

#gr-chat-root .gr-chat-form input,
#gr-chat-root .gr-chat-form textarea,
.gr-chat-form input,
.gr-chat-form textarea {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid var(--gr-chat-border, #ccd4dd);
    border-radius: var(--gr-chat-control-radius, 6px);
    box-sizing: border-box;
    font: inherit;
    font-size: 13px;
    line-height: 20px !important;
    min-height: 36px !important;
    padding: 7px 9px !important;
    width: 100%;
}

#gr-chat-root .gr-chat-form input,
.gr-chat-form input {
    height: 36px !important;
}

.gr-chat-form textarea {
    min-height: 76px;
    resize: vertical;
}

.gr-chat-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 10px;
}

.gr-chat-status {
    color: var(--gr-chat-muted, #657282);
    font-size: 12px;
    min-height: 18px;
    transition: opacity .2s ease;
}

.gr-chat-submit {
    background: var(--gr-chat-primary, #1f4b99);
    border: 0;
    border-radius: var(--gr-chat-control-radius, 6px);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    min-height: 34px;
    padding: 0 14px;
    transition: opacity .2s ease, transform .18s ease, box-shadow .18s ease;
}

.gr-chat-submit:hover,
.gr-chat-submit:focus-visible {
    box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
    transform: translateY(-1px);
}

.gr-chat-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.gr-chat-form.is-sending .gr-chat-submit {
    animation: gr-chat-submit-pulse .9s ease-in-out infinite;
}

@keyframes gr-chat-ping {
    0% {
        opacity: .8;
        transform: scale(.55);
    }

    80%,
    100% {
        opacity: 0;
        transform: scale(1.45);
    }
}

@keyframes gr-chat-bubble-in {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gr-chat-system-notice-in {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gr-chat-typing-dot {

    0%,
    80%,
    100% {
        opacity: .38;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@keyframes gr-chat-submit-pulse {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-1px);
    }
}

@keyframes gr-chat-badge-pop {
    0% {
        opacity: 0;
        transform: scale(.62);
    }

    70% {
        opacity: 1;
        transform: scale(1.12);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .gr-chat-launcher,
    .gr-chat-backdrop,
    .gr-chat-panel,
    .gr-chat-availability,
    .gr-chat-availability__dot,
    .gr-chat-submit {
        transition: none;
    }

    .gr-chat-launcher__dot::after,
    .gr-chat-unread-badge,
    .gr-chat-system-notice--new,
    .gr-chat-typing__dots span,
    .gr-chat-bubble--new,
    .gr-chat-form.is-sending .gr-chat-submit {
        animation: none;
    }
}

@media (max-width: 480px) {
    .gr-chat-root {
        bottom: max(14px, var(--gr-chat-position-bottom, 22px));
        left: var(--gr-chat-position-left, auto);
        right: var(--gr-chat-position-right, 14px);
    }

    .gr-chat-panel {
        bottom: 0px;
        left: var(--gr-chat-panel-mobile-left, auto);
        right: var(--gr-chat-panel-mobile-right, -2px);
        width: calc(100vw - 24px);
        height: 85vh;
    }

    .gr-chat-root.is-expanded .gr-chat-panel {
        max-height: calc(100vh - 22px);
        max-width: calc(100vw - 18px);
        width: calc(100vw - 18px);
    }

    .gr-chat-fields {
        grid-template-columns: 1fr;
    }

    #gr-chat-root.is-expanded .gr-chat-fields {
        grid-template-columns: 1fr !important;
    }
}
