/**
 * Gviabcua.LiveSupport visitor widget.
 *
 * Everything is namespaced under .gls and uses custom properties so a host
 * site can restyle the widget without touching this file (ExternalWidget
 * appearance settings are injected as inline custom properties).
 */
.gls {
    --gls-primary: #2563eb;
    --gls-primary-soft: rgba(37, 99, 235, .12);
    --gls-primary-contrast: #ffffff;
    --gls-surface: #ffffff;
    --gls-surface-alt: #f4f5f7;
    --gls-canvas: #f7f8fa;
    --gls-text: #14161a;
    --gls-text-muted: #6b7280;
    --gls-border: #e4e6eb;
    --gls-border-strong: #d5d9e2;
    --gls-surface-3: #e3e6ec;
    --gls-radius: 18px;
    --gls-bubble-radius: 18px;
    --gls-shadow: 0 18px 48px -12px rgba(16, 24, 40, .28), 0 0 0 1px rgba(16, 24, 40, .04);

    position: fixed;
    z-index: 2147483000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--gls-text);
}

.gls *,
.gls *::before,
.gls *::after { box-sizing: border-box; }

/* The panel and badge are toggled with the `hidden` attribute; their own
   display rules would otherwise win over the UA stylesheet. */
.gls [hidden] { display: none !important; }

.gls--bottom-right { right: 20px; bottom: 20px; }
.gls--bottom-left  { left: 20px;  bottom: 20px; }

@media (prefers-color-scheme: dark) {
    .gls {
        --gls-surface: #16181d;
        --gls-surface-alt: #21242b;
        --gls-canvas: #101216;
        --gls-text: #f2f3f5;
        --gls-text-muted: #9aa1ad;
        --gls-border: #2c3038;
        --gls-border-strong: #3a404a;
        --gls-surface-3: #2a2e36;
        --gls-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    }
}

/* Launcher ---------------------------------------------------------------- */

.gls__dock {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.gls--bottom-left .gls__dock { flex-direction: row-reverse; justify-content: flex-end; }

.gls__launcher-label {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--gls-surface);
    border: 1px solid var(--gls-border);
    box-shadow: 0 6px 20px -6px rgba(16, 24, 40, .25);
    font-size: 13px;
    font-weight: 500;
    color: var(--gls-text);
    cursor: pointer;
    white-space: nowrap;
}

.gls.is-open .gls__launcher-label { display: none; }

.gls__launcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--gls-primary);
    color: var(--gls-primary-contrast);
    box-shadow:
        0 10px 24px -6px color-mix(in srgb, var(--gls-primary) 55%, transparent),
        0 2px 6px rgba(16, 24, 40, .18);
    cursor: pointer;
    transition: transform .18s cubic-bezier(.34, 1.4, .64, 1), box-shadow .18s ease;
}

.gls__launcher:hover { transform: translateY(-2px) scale(1.04); }
.gls__launcher:active { transform: scale(.97); }
.gls__launcher:focus-visible { outline: 3px solid var(--gls-primary-soft); outline-offset: 3px; }

.gls__launcher-icon { display: flex; }

.gls.is-open .gls__launcher { transform: scale(.92); opacity: .85; }

.gls__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--gls-surface);
}

/* Panel ------------------------------------------------------------------- */

.gls__panel {
    position: absolute;
    bottom: 74px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gls-border);
    border-radius: var(--gls-radius);
    background: var(--gls-surface);
    box-shadow: var(--gls-shadow);
    animation: gls-in .18s ease;
}

.gls--bottom-right .gls__panel { right: 0; }
.gls--bottom-left  .gls__panel { left: 0; }

/* The start form is as tall as its fields. A fixed height cut it off - one
   more field (e-mail, department, consent) and the button hid behind a
   scrollbar on a screen with room to spare. The panel grows upwards and
   scrolls only when the window itself is too short. */
@media (min-width: 481px) {
    .gls__panel[data-view="form"] {
        height: auto;
        min-height: min(580px, calc(100vh - 120px));
    }
}

@keyframes gls-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
    .gls--bottom-right, .gls--bottom-left { right: 12px; left: 12px; bottom: 12px; }
    .gls__panel {
        position: fixed;
        inset: 8px;
        width: auto;
        height: auto;
        max-height: none;
    }
    .gls__launcher { margin-left: auto; }
    .gls--bottom-left .gls__launcher { margin-left: 0; margin-right: auto; }
}

/* Full window. The launcher steps aside: the header has its own controls,
   and a round button floating over the last message would hide it. */
.gls.is-expanded .gls__panel {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
}

.gls.is-expanded.is-open .gls__dock { display: none; }

/* A full-width line of text is hard to read; the conversation keeps a column. */
.gls.is-expanded .gls__messages,
.gls.is-expanded .gls__footer > * {
    width: 100%;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* Header ------------------------------------------------------------------ */

.gls__header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 13px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, .18) 0%, transparent 55%),
        var(--gls-primary);
    color: var(--gls-primary-contrast);
    box-shadow: 0 1px 0 rgba(16, 24, 40, .06);
}

.gls__header-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    font-size: 13px;
    font-weight: 700;
}

.gls__header-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* A logo has to fit whole inside the circle, a photo may be cropped. */
.gls__header-avatar img.gls__header-logo { padding: 5px; object-fit: contain; box-sizing: border-box; }
.gls__header-avatar.is-operator {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .45), 0 2px 8px rgba(16, 24, 40, .2);
}

.gls__header-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.gls__title {
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gls__subtitle {
    font-size: 12px;
    opacity: .82;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gls__status {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9ca3af;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .3);
}

.gls__status--online { background: #22c55e; }
.gls__status--offline { background: #9ca3af; }
.gls__status--error { background: #f59e0b; }

.gls__hbtn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: .85;
    transition: background .15s ease, opacity .15s ease;
}

.gls__hbtn:hover { background: rgba(255, 255, 255, .18); opacity: 1; }

/* Header menu ------------------------------------------------------------- */

.gls__menu {
    position: absolute;
    top: 56px;
    right: 12px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    min-width: 190px;
    padding: 5px;
    border-radius: 12px;
    background: var(--gls-surface);
    border: 1px solid var(--gls-border);
    box-shadow: 0 14px 34px -10px rgba(16, 24, 40, .35);
}

.gls__menu-item {
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--gls-text);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.gls__menu-item:hover { background: var(--gls-surface-alt); }

/* Body -------------------------------------------------------------------- */

.gls__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    background: var(--gls-canvas);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--gls-text-muted) 35%, transparent) transparent;
}

.gls__body::-webkit-scrollbar { width: 8px; }
.gls__body::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
    background-color: color-mix(in srgb, var(--gls-text-muted) 30%, transparent);
}

.gls__messages { display: flex; flex-direction: column; gap: 4px; }

.gls__intro {
    padding: 4px 2px 10px;
}

.gls__intro-title {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 650;
    letter-spacing: -.01em;
}

.gls__intro-note,
.gls__offline { margin: 0; color: var(--gls-text-muted); font-size: 13px; line-height: 1.5; }

.gls__faces { display: flex; margin-top: 12px; }

.gls__face {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: -8px;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--gls-canvas);
    background: var(--gls-surface-alt);
    font-size: 11px;
    font-weight: 700;
    color: var(--gls-text-muted);
}

.gls__face img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Day separator */
.gls__day {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 6px;
    color: var(--gls-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.gls__day::before,
.gls__day::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--gls-border);
}

/* Messages ---------------------------------------------------------------- */

.gls__message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.gls__message.is-grouped { margin-top: 2px; }

.gls__avatar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--gls-surface-alt);
    color: var(--gls-text-muted);
    font-size: 11px;
    font-weight: 700;
}

.gls__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gls__stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    max-width: 78%;
}

.gls__message-author {
    font-size: 11px;
    font-weight: 600;
    color: var(--gls-text-muted);
    padding-left: 2px;
}

.gls__bubble {
    padding: 10px 13px;
    border-radius: var(--gls-bubble-radius);
    background: var(--gls-surface);
    border: 1px solid var(--gls-border);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.gls__bubble a { color: var(--gls-primary); }
.gls__bubble p:first-child { margin-top: 0; }
.gls__bubble p:last-child { margin-bottom: 0; }

.gls__time {
    font-size: 10px;
    color: var(--gls-text-muted);
    padding: 0 2px;
}

.gls__message--operator .gls__bubble,
.gls__message--bot .gls__bubble {
    border-bottom-left-radius: 6px;
}

.gls__message--bot .gls__avatar { background: var(--gls-primary-soft); color: var(--gls-primary); }

@keyframes gls-revised {
    0%, 65% { background: var(--gls-primary-soft); }
    100%    { background: transparent; }
}

.gls__message.is-revised {
    border-radius: 10px;
    animation: gls-revised 2.4s ease forwards;
}

.gls__message--deleted .gls__bubble {
    font-style: italic;
    opacity: .6;
}

@media (prefers-reduced-motion: reduce) {
    .gls__message.is-revised { animation-duration: 1ms; }
}

.gls__message--visitor { flex-direction: row-reverse; }
.gls__message--visitor .gls__stack { align-items: flex-end; margin-left: auto; }

.gls__message--visitor .gls__bubble {
    background: var(--gls-primary);
    border-color: transparent;
    color: var(--gls-primary-contrast);
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--gls-primary) 70%, transparent);
}

.gls__message--visitor .gls__bubble a { color: inherit; text-decoration: underline; }

/* Service messages -------------------------------------------------------- */

.gls__system {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 8px auto;
    padding: 5px 12px;
    max-width: 90%;
    border-radius: 999px;
    background: var(--gls-surface-alt);
    color: var(--gls-text-muted);
    font-size: 12px;
    text-align: center;
}

.gls__system-icon { font-size: 12px; line-height: 1; }
.gls__system-time { opacity: .7; font-size: 10px; }

.gls__notice {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12.5px;
    line-height: 1.45;
}

.gls__notice::before { content: "!"; font-weight: 700; }

/* Attachments ------------------------------------------------------------- */

.gls__attachment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--gls-border);
    border-radius: 10px;
    background: var(--gls-surface);
    color: inherit;
    text-decoration: none;
    font-size: 12px;
}

.gls__attachment:hover { border-color: var(--gls-primary); }
.gls__attachment-name { font-weight: 600; word-break: break-all; }
.gls__attachment-size { color: var(--gls-text-muted); }

.gls__thumb {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--gls-border);
    max-width: 220px;
}

.gls__thumb img { display: block; width: 100%; height: auto; }

/* Typing ------------------------------------------------------------------ */

.gls__typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 2px 0;
    color: var(--gls-text-muted);
    font-size: 12px;
}

.gls__dots { display: inline-flex; gap: 3px; }

.gls__dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    animation: gls-dot 1.1s infinite ease-in-out;
}

.gls__dots i:nth-child(2) { animation-delay: .15s; }
.gls__dots i:nth-child(3) { animation-delay: .3s; }

@keyframes gls-dot {
    0%, 60%, 100% { opacity: .25; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

/* Footer ------------------------------------------------------------------ */

.gls__footer {
    flex: 0 0 auto;
    padding: 10px 12px;
    border-top: 1px solid var(--gls-border);
    background: var(--gls-surface);
}

.gls__form { display: flex; flex-direction: column; gap: 10px; }

/* The intro view scrolls as one column, so the form sits in the body. The
   brand colour bleeds a little way down from the header, which is what stops
   the panel reading as a plain white box with a blue strip on top. */
.gls__panel[data-view="form"] .gls__body {
    padding: 18px 16px 20px;
    background:
        linear-gradient(
            var(--gls-primary) 0,
            var(--gls-primary) 78px,
            color-mix(in srgb, var(--gls-primary) 18%, var(--gls-canvas)) 118px,
            var(--gls-canvas) 170px
        );
}

.gls__panel[data-view="form"] .gls__messages { gap: 0; }

.gls__panel[data-view="form"] .gls__intro {
    padding: 0 2px 16px;
    color: var(--gls-primary-contrast);
}

.gls__panel[data-view="form"] .gls__intro-note,
.gls__panel[data-view="form"] .gls__offline {
    color: color-mix(in srgb, var(--gls-primary-contrast) 92%, transparent);
}

/* The form itself is a card floating on that gradient. */
.gls__panel[data-view="form"] .gls__form {
    padding: 16px;
    border-radius: var(--gls-radius);
    background: var(--gls-surface);
    border: 1px solid color-mix(in srgb, var(--gls-border) 70%, transparent);
    box-shadow: 0 12px 30px -16px rgba(16, 24, 40, .45);
}

.gls__panel[data-view="form"] .gls__faces { margin-top: 10px; }
.gls__panel[data-view="form"] .gls__face { border-color: color-mix(in srgb, var(--gls-primary) 65%, #fff); }

.gls__field { display: flex; flex-direction: column; gap: 3px; }

.gls__field-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--gls-text-muted);
}

/* Required fields: an asterisk after the label, explained under the form. */
.gls__req { color: #d92d20; font-weight: 700; }
.gls__required-note { margin: -2px 0 0; font-size: 11px; color: var(--gls-text-muted); }
.gls__input:user-invalid { border-color: #d92d20; }

.gls__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gls-border);
    border-radius: 11px;
    background: var(--gls-surface-alt);
    color: var(--gls-text);
    font: inherit;
    font-size: 13.5px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.gls__input:hover { border-color: var(--gls-border-strong); }
.gls__input:focus { background: var(--gls-surface); }
.gls__input::placeholder { color: color-mix(in srgb, var(--gls-text-muted) 75%, transparent); }

.gls__input:focus {
    outline: none;
    border-color: var(--gls-primary);
    box-shadow: 0 0 0 3px var(--gls-primary-soft);
}

.gls__textarea { resize: vertical; min-height: 62px; }

.gls__button {
    padding: 11px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--gls-primary);
    color: var(--gls-primary-contrast);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--gls-primary) 80%, transparent);
    transition: filter .15s ease, transform .12s ease, box-shadow .15s ease;
}

.gls__button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.gls__button:active { transform: none; }
.gls__button:disabled { opacity: .6; cursor: default; }
.gls__button--block { width: 100%; }

.gls__link {
    padding: 6px 8px;
    border: 0;
    background: none;
    color: var(--gls-text-muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

.gls__link:hover { color: var(--gls-primary); }
.gls__link--block { width: 100%; text-align: center; }

/* Composer ---------------------------------------------------------------- */

.gls__composer { display: flex; flex-direction: column; gap: 8px; }

.gls__composer-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 4px 4px 4px 12px;
    border: 1px solid var(--gls-border);
    border-radius: 16px;
    background: var(--gls-surface-alt);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.gls__composer-row:focus-within { background: var(--gls-surface); }

.gls__composer-row:focus-within {
    border-color: var(--gls-primary);
    box-shadow: 0 0 0 3px var(--gls-primary-soft);
}

.gls__composer-input {
    flex: 1 1 auto;
    max-height: 110px;
    padding: 7px 0;
    border: 0;
    border-radius: 0;
    background: none;
    resize: none;
}

.gls__composer-input:focus { box-shadow: none; }

.gls__composer-actions { display: flex; align-items: center; gap: 4px; }

.gls__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--gls-text-muted);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.gls__icon:hover { background: var(--gls-surface-alt); color: var(--gls-text); }

.gls__send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: var(--gls-primary);
    color: var(--gls-primary-contrast);
    cursor: pointer;
    transition: filter .15s ease;
}

.gls__send:hover:not(:disabled) { filter: brightness(1.08); }

.gls__send:disabled {
    background: var(--gls-surface-3);
    color: var(--gls-text-muted);
    cursor: default;
}

.gls__pending { display: flex; flex-wrap: wrap; gap: 6px; }

.gls__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 6px 4px 10px;
    border-radius: 999px;
    background: var(--gls-surface-alt);
    font-size: 12px;
}

.gls__chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }

.gls__chip-x {
    border: 0;
    background: none;
    color: var(--gls-text-muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.gls__endrow { display: flex; justify-content: center; margin-top: 6px; }

/* Ended conversation ------------------------------------------------------ */

.gls__ended { display: flex; flex-direction: column; gap: 10px; }

.gls__ended-title {
    margin: 0;
    text-align: center;
    font-weight: 600;
    color: var(--gls-text-muted);
    font-size: 13px;
}

.gls__ended-note { margin: 0; text-align: center; font-size: 13px; }

.gls__ended-actions { display: flex; flex-direction: column; gap: 6px; }

.gls__rating {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--gls-border);
    border-radius: 12px;
    background: var(--gls-surface-alt);
}

.gls__rating-title { margin: 0; text-align: center; font-size: 13px; font-weight: 600; }

.gls__stars { display: flex; justify-content: center; gap: 4px; }

.gls__star {
    border: 0;
    background: none;
    color: #d1d5db;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: transform .12s ease, color .12s ease;
}

.gls__star:hover { transform: scale(1.12); }
.gls__star.is-on { color: #f59e0b; }

/* Credit ------------------------------------------------------------------ */

.gls__credit {
    flex: 0 0 auto;
    padding: 6px 12px 8px;
    background: var(--gls-surface);
    text-align: center;
    font-size: 10px;
    letter-spacing: .03em;
    color: var(--gls-text-muted);
}

/* Quiet until looked at. A credit that shouts competes with the conversation
   above it; one that cannot be noticed at all is not a credit. */
.gls__credit-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    opacity: .7;
    transition: opacity .15s ease, background-color .15s ease, color .15s ease;
}

.gls__credit-link:hover,
.gls__credit-link:focus-visible {
    opacity: 1;
    color: var(--gls-primary);
    background: var(--gls-primary-soft);
}

.gls__credit-mark { font-size: 9px; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
    .gls *, .gls *::before, .gls *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   Interactive elements the operator sends (buttons, quick replies, requests)
   ══════════════════════════════════════════════════════════════════════════ */

.gls__keys {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.gls__key {
    padding: 7px 13px;
    border: 1px solid var(--gls-primary);
    border-radius: 999px;
    background: var(--gls-surface);
    color: var(--gls-primary);
    font: inherit;
    font-size: 12.5px;
    line-height: 1.2;
    cursor: pointer;
    transition: background .14s ease, color .14s ease, transform .1s ease;
}

.gls__key:hover:not(:disabled) { background: var(--gls-primary); color: var(--gls-primary-contrast); }
.gls__key:active:not(:disabled) { transform: scale(.97); }

.gls__key:disabled { opacity: .45; cursor: default; }

.gls__key.is-chosen {
    opacity: 1;
    background: var(--gls-primary);
    border-color: var(--gls-primary);
    color: var(--gls-primary-contrast);
}

.gls__inline-form {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
}

.gls__inline-form .gls__input { flex: 1 1 auto; padding: 7px 10px; font-size: 13px; }

/* Two fields side by side in the intro form ------------------------------- */

.gls__row { display: flex; gap: 8px; }
.gls__row .gls__field { flex: 1 1 0; min-width: 0; }

@media (max-width: 380px) {
    .gls__row { flex-direction: column; }
}

/* Recording and media -------------------------------------------------- */

.gls__icon.is-recording {
    background: var(--gls-primary);
    color: var(--gls-primary-contrast);
    position: relative;
    animation: gls-rec 1.1s infinite;
}

.gls__icon.is-recording::after {
    content: attr(data-time);
    position: absolute;
    top: -18px;
    right: 0;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--gls-primary);
    color: var(--gls-primary-contrast);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

@keyframes gls-rec {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gls-primary) 55%, transparent); }
    60% { box-shadow: 0 0 0 7px transparent; }
}

/* A fixed width, not 100%: in a message with no text the stack shrinks to its
   content, and a 100%-wide audio player collapsed to its menu button. */
.gls__player { width: 240px; max-width: 100%; margin-top: 4px; }
.gls__player--video { max-width: 240px; max-height: 320px; border-radius: 12px; display: block; background: #000; }

/* Our own audio controls: Chrome's native bar is 54px tall, does not shrink,
   and could not seek through a MediaRecorder WebM. */
.gls__audio {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 240px;
    max-width: 100%;
    margin-top: 4px;
    padding: 7px 10px 7px 7px;
    border: 1px solid var(--gls-border);
    border-radius: 14px;
    background: var(--gls-surface);
    box-sizing: border-box;
}

.gls__audio audio { display: none; }

.gls__audio-play {
    position: relative;
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--gls-primary);
    cursor: pointer;
}

.gls__audio-play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent var(--gls-primary-contrast);
}

.gls__audio-play.is-playing::before {
    width: 9px;
    height: 11px;
    transform: translate(-50%, -50%);
    border: 0;
    border-left: 3px solid var(--gls-primary-contrast);
    border-right: 3px solid var(--gls-primary-contrast);
    box-sizing: border-box;
}

.gls__audio-play:focus-visible { outline: 3px solid var(--gls-primary-soft); outline-offset: 2px; }

.gls__audio-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gls__audio-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; }
.gls__audio-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gls__audio-time { flex: none; color: var(--gls-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.gls__audio-seek {
    --gls-progress: 0%;
    width: 100%;
    height: 14px;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.gls__audio-seek:disabled { cursor: default; }

.gls__audio-seek::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--gls-primary) var(--gls-progress), var(--gls-border-strong) var(--gls-progress));
}

.gls__audio-seek::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--gls-primary) var(--gls-progress), var(--gls-border-strong) var(--gls-progress));
}

.gls__audio-seek::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    margin-top: -4px;
    border: 0;
    border-radius: 50%;
    background: var(--gls-primary);
    -webkit-appearance: none;
    appearance: none;
}

.gls__audio-seek::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--gls-primary);
}

.gls__audio-seek:disabled::-webkit-slider-thumb { visibility: hidden; }
.gls__audio-seek:disabled::-moz-range-thumb { visibility: hidden; }

.gls__chip-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 6px; display: block; }
.gls__chip-size { color: var(--gls-text-muted); font-size: 11px; }

/* Contacts offered when nobody is online, and the privacy notice under the form. */
.gls__intro-contacts { margin: 8px 0 0; font-size: 13px; }
.gls__intro-contacts a,
.gls__consent a { color: var(--gls-primary); text-decoration: underline; text-underline-offset: 2px; }
.gls__consent { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--gls-text-muted); text-align: center; }
.gls__credit[hidden] { display: none !important; }

/* The message a reply answers. */
.gls__quote {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin-bottom: 3px;
    padding: 4px 8px;
    border-left: 3px solid var(--gls-primary);
    border-radius: 6px;
    background: rgba(0, 0, 0, .04);
    font-size: 12px;
    line-height: 1.35;
}

.gls__quote-who { font-weight: 600; }
.gls__quote-text { opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* What the camera sees while a video message is being recorded. */
.gls__preview {
    position: relative;
    width: 132px;
    height: 132px;
    margin: 0 auto 8px;
    border-radius: 50%;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 0 3px var(--gls-primary);
}

.gls__preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.gls__preview-dot {
    position: absolute;
    top: 14px;
    right: 22px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5484d;
    animation: gls-rec 1s ease-in-out infinite alternate;
}

@keyframes gls-rec { from { opacity: 1; } to { opacity: .3; } }

