/* ============================================
   XABCD Live Chat - Frontend Chat Widget
   Modern floating chat bubble & window
   ============================================ */

:root {
    --xlc-primary: #7c3aed;
    --xlc-primary-dark: #6d28d9;
    --xlc-primary-light: #c4b5fd;
    --xlc-white: #ffffff;
    --xlc-dark: #1e1e2e;
    --xlc-gray: #78788c;
    --xlc-gray-dark: #2d2d3f;
    --xlc-gray-light: #ededf0;
    --xlc-bg: #f7f7f9;
    --xlc-success: #22c55e;
    --xlc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --xlc-radius: 20px;
    --xlc-shadow: 0 12px 48px rgba(30, 30, 60, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    --xlc-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
#xabcd-lc-root {
    /* Widget element font sizes — defaults (overridden by JS inline) */
    --xlc-fs-header: 12px;
    --xlc-fs-subtitle: 11px;
    --xlc-fs-body: 11px;
    --xlc-fs-input: 11px;
    --xlc-fs-powered: 10px;
    --xlc-fs-button: 13px;
    font-family: var(--xlc-font);
    font-size: calc(14px * var(--xlc-fs-scale, 1));
    line-height: 1.5;
    color: var(--xlc-dark);
    z-index: 2147483647;
    position: relative;
}

#xabcd-lc-root *,
#xabcd-lc-root *::before,
#xabcd-lc-root *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 2px;
}

/* ---- Chat Bubble ---- */
.xlc-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--xlc-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--xlc-transition);
    overflow: visible;
    border: none;
    padding: 0;
}

.xlc-bubble img {
    padding: 0;
}

.xlc-bubble.xlc-bubble-online-state {
    background: var(--xlc-success);
}

.xlc-bubble.xlc-bubble-offline-state {
    background: #9ca3af;
}

.xlc-bubble:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Bubble sizes */
.xlc-bubble.xlc-bubble-small { width: 56px; height: 56px; }
.xlc-bubble.xlc-bubble-medium { width: 64px; height: 64px; }
.xlc-bubble.xlc-bubble-large { width: 72px; height: 72px; }

.xlc-bubble.bottom-left {
    right: auto;
    left: 20px;
}

.xlc-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Pill-style bubble with text */
.xlc-bubble.xlc-bubble-pill {
    width: auto;
    height: auto;
    border-radius: 60px;
    padding: 8px 34px 8px 8px;
    gap: 12px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.xlc-bubble.xlc-bubble-pill:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2), 0 3px 10px rgba(0, 0, 0, 0.12);
}

.xlc-bubble.xlc-bubble-pill img.xlc-bubble-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
}

.xlc-bubble.xlc-bubble-pill.xlc-bubble-small img.xlc-bubble-avatar { width: 46px; height: 46px; }
.xlc-bubble.xlc-bubble-pill.xlc-bubble-large img.xlc-bubble-avatar { width: 58px; height: 58px; }

/* Pill bubble fallback icon */
.xlc-bubble.xlc-bubble-pill .xlc-bubble-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-left: 6px;
}

.xlc-bubble-text {
    color: var(--xlc-white);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.3;
    font-family: var(--xlc-font);
    letter-spacing: -0.01em;
}

.xlc-bubble.xlc-bubble-pill .xlc-bubble-badge {
    top: -6px;
    right: -6px;
}

.xlc-bubble-icon {
    color: var(--xlc-white);
    width: 28px;
    height: 28px;
}

.xlc-bubble-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #ef4444;
    border-radius: 11px;
    color: var(--xlc-white);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--xlc-white);
    z-index: 2;
}

/* Online indicator on bubble */
.xlc-bubble-online {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 14px;
    height: 14px;
    background: var(--xlc-success);
    border-radius: 50%;
    border: 2.5px solid var(--xlc-white);
}

/* ---- Chat Window ---- */
.xlc-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 390px;
    height: 580px;
    max-height: calc(100vh - 120px);
    background: var(--xlc-bg);
    border-radius: var(--xlc-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.06);
    z-index: 2147483647;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: xlc-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Window widths */
.xlc-window.xlc-window-small { width: 360px; }
.xlc-window.xlc-window-medium { width: 390px; }
.xlc-window.xlc-window-large { width: 420px; }

.xlc-window.bottom-left {
    right: auto;
    left: 20px;
}

.xlc-window.open {
    display: flex;
}

/* Keyboard focus. The window takes focus when opened from the keyboard, but
   as a container it needs no ring of its own. */
.xlc-bubble:focus-visible,
.xlc-prev-item:focus-visible {
    outline: 3px solid var(--xlc-primary);
    outline-offset: 3px;
}
.xlc-window:focus {
    outline: none;
}

@keyframes xlc-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---- Window Header ---- */
.xlc-header {
    background: var(--xlc-white);
    color: var(--xlc-dark);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.xlc-header-back {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--xlc-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: var(--xlc-transition);
    flex-shrink: 0;
    padding: 0;
}

.xlc-header-back:hover {
    background: var(--xlc-bg);
    color: var(--xlc-dark);
}

.xlc-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.xlc-header-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.xlc-header-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
}

.xlc-header-avatar-ph {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--xlc-primary), var(--xlc-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(18px * var(--xlc-fs-scale, 1));
    font-weight: 600;
}

.xlc-header-online {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background: var(--xlc-success);
    border-radius: 50%;
    border: 2px solid var(--xlc-white);
}

.xlc-header-text {
    min-width: 0;
}

.xlc-header-text h4 {
    font-size: var(--xlc-fs-header) !important;
    font-weight: 700;
    margin: 0;
    color: var(--xlc-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.xlc-header-text span {
    font-size: var(--xlc-fs-subtitle) !important;
    color: var(--xlc-gray);
    letter-spacing: 0.01em;
}

/* The status line is drawn as a pill: green while agents are online ("Online
   Status Text"), pink while offline ("Offline Status Text", "We'll be back
   …"). Each colour is a setting. Selector is specific enough, with !important
   on font-size, to beat the header span rule above; #xabcd-lc-root prefix so
   the widget reset doesn't zero the padding/margin. */
#xabcd-lc-root .xlc-header-text span.xlc-status-live,
#xabcd-lc-root .xlc-header-text span.xlc-status-away {
    display: inline-block;
    margin-top: 5px;
    padding: 6px 11px;
    /* Half the single-line height: one line is a full pill, two lines get
       rounded corners rather than oversized semicircle ends. */
    border-radius: 14px;
    background: #e4f6eb; /* fallback for browsers without color-mix() */
    background: color-mix(in srgb, var(--xlc-status-color, #02ac4f) 11%, #fff);
    color: var(--xlc-status-color, #02ac4f);
    font-size: calc(11px * var(--xlc-fs-scale, 1)) !important;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    /* Long status text wraps onto a second line instead of being cut off,
       between words (a single word too long for the line still breaks). */
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 100%;
    vertical-align: top;
}
#xabcd-lc-root.xlc-dark .xlc-header-text span.xlc-status-live {
    background: rgba(2, 172, 79, 0.16);
    background: color-mix(in srgb, var(--xlc-status-color, #02ac4f) 18%, transparent);
    color: color-mix(in srgb, var(--xlc-status-color, #02ac4f) 70%, #fff);
}
#xabcd-lc-root .xlc-header-text span.xlc-status-away {
    background: #ffeef4; /* fallback for browsers without color-mix() */
    background: color-mix(in srgb, var(--xlc-status-offline-color, #fd5d93) 11%, #fff);
    color: var(--xlc-status-offline-color, #fd5d93);
}
#xabcd-lc-root.xlc-dark .xlc-header-text span.xlc-status-away {
    background: rgba(253, 93, 147, 0.16);
    background: color-mix(in srgb, var(--xlc-status-offline-color, #fd5d93) 18%, transparent);
    color: color-mix(in srgb, var(--xlc-status-offline-color, #fd5d93) 70%, #fff);
}

/* Away: the status text runs as a thin strip under the header instead of a
   pill that wraps (see syncStatusBanner). */
#xabcd-lc-root .xlc-window.xlc-has-status-banner .xlc-header-text span.xlc-status-away {
    display: none;
}
#xabcd-lc-root .xlc-status-banner {
    flex-shrink: 0;
    padding: 5px 16px;
    background: #ffeef4; /* fallback for browsers without color-mix() */
    background: color-mix(in srgb, var(--xlc-status-offline-color, #fd5d93) 11%, #fff);
    color: var(--xlc-status-offline-color, #fd5d93);
    font-size: calc(11px * var(--xlc-fs-scale, 1));
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#xabcd-lc-root .xlc-status-banner[hidden] {
    display: none;
}
#xabcd-lc-root.xlc-dark .xlc-status-banner {
    background: rgba(253, 93, 147, 0.16);
    background: color-mix(in srgb, var(--xlc-status-offline-color, #fd5d93) 18%, #1a1a2e);
    color: color-mix(in srgb, var(--xlc-status-offline-color, #fd5d93) 70%, #fff);
}

.xlc-font-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border: 1px solid var(--xlc-gray-light);
    border-radius: 8px;
    background: var(--xlc-bg);
    color: var(--xlc-gray);
    cursor: pointer;
    transition: var(--xlc-transition);
    font-size: 0;
    line-height: 1;
    flex-shrink: 0;
}

.xlc-font-pill:hover,
.xlc-font-pill.is-active {
    border-color: var(--xlc-primary);
    color: var(--xlc-primary);
}

/* Header menu and maximize: square buttons the size of the close button. */
#xabcd-lc-root .xlc-header-menu,
#xabcd-lc-root .xlc-header-max {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
}

/* ---- Header menu: previous conversations, email the chat, text size ---- */
#xabcd-lc-root .xlc-menu-wrap {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

#xabcd-lc-root .xlc-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    min-width: 220px;
    padding: 6px;
    background: var(--xlc-white);
    border: 1px solid var(--xlc-gray-light);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#xabcd-lc-root .xlc-menu[hidden],
#xabcd-lc-root .xlc-menu-item[hidden] {
    display: none;
}

#xabcd-lc-root .xlc-menu-item,
#xabcd-lc-root .xlc-menu-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--xlc-dark);
    font-family: inherit;
    font-size: var(--xlc-fs-body);
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
}

#xabcd-lc-root .xlc-menu-item { cursor: pointer; }
#xabcd-lc-root .xlc-menu-item svg,
#xabcd-lc-root .xlc-menu-row > svg { color: var(--xlc-gray); flex-shrink: 0; }

#xabcd-lc-root .xlc-menu-item:hover,
#xabcd-lc-root .xlc-menu-item:focus-visible {
    background: var(--xlc-bg);
    color: var(--xlc-primary);
    outline: none;
}

#xabcd-lc-root .xlc-menu-item:hover svg,
#xabcd-lc-root .xlc-menu-item:focus-visible svg { color: var(--xlc-primary); }

#xabcd-lc-root .xlc-header-history.is-active { color: var(--xlc-primary); }

#xabcd-lc-root .xlc-menu-size {
    display: flex;
    margin-left: auto;
    padding-left: 12px;
}

#xabcd-lc-root .xlc-menu-size-btn {
    min-width: 34px;
    padding: 4px 8px;
    border: 1px solid var(--xlc-gray-light);
    background: var(--xlc-bg);
    color: var(--xlc-gray);
    font-family: inherit;
    font-size: 12px; /* fixed: the controls stay put while the text scales */
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--xlc-transition);
}

#xabcd-lc-root .xlc-menu-size-btn:first-child { border-radius: 8px 0 0 8px; border-right: none; }
#xabcd-lc-root .xlc-menu-size-btn:last-child { border-radius: 0 8px 8px 0; }
#xabcd-lc-root .xlc-menu-size-up { font-size: 14px; }

#xabcd-lc-root .xlc-menu-size-btn:hover,
#xabcd-lc-root .xlc-menu-size-btn:focus-visible {
    border-color: var(--xlc-primary);
    color: var(--xlc-primary);
    outline: none;
}

.xlc-header-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--xlc-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: var(--xlc-transition);
    flex-shrink: 0;
    padding: 0;
}

.xlc-header-close:hover {
    background: var(--xlc-bg);
    color: var(--xlc-dark);
}

/* ---- Views ---- */
.xlc-view {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.xlc-view.active {
    display: flex;
}

/* ---- Home View ---- */
.xlc-home {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: 100%;
    min-height: 0;
    background: var(--xlc-white);
    overflow: hidden;
    padding: 0 !important;
}

.xlc-home-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 34px 28px 0;
}

.xlc-home-welcome {
    margin-bottom: 1em !important;
}

.xlc-home-welcome h3 {
    font-size: calc(28px * var(--xlc-fs-scale, 1)) !important;
    font-weight: 700;
    color: #221b44;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.xlc-home-welcome p {
    font-size: calc(16px * var(--xlc-fs-scale, 1)) !important;
    color: #6b7280;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5;
}

.xlc-start-chat-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 24px 0 !important;
    padding: 14px 18px !important;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 45%, #7c3aed 100%);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.22), inset 0 1px 0 rgba(255,255,255,0.18);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    position: relative;
    overflow: hidden;
    font-family: var(--xlc-font);
    color: #fff;
    text-align: left;
}

.xlc-start-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    filter: brightness(1.03);
}

.xlc-start-chat-btn:active {
    transform: translateY(-1px) scale(0.995);
}

.xlc-start-chat-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.03) 40%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.xlc-start-chat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(6px);
    position: relative;
    z-index: 1;
    padding: 0;
}

.xlc-start-chat-icon svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    padding: 0;
}

.xlc-start-chat-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    padding: 0;
}

.xlc-start-chat-text span {
    padding: 0;
}

.xlc-start-chat-title {
    color: #fff !important;
    font-size: calc(17px * var(--xlc-fs-scale, 1)) !important;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.005em;
}

.xlc-start-chat-subtitle {
    margin-top: 2px;
    color: rgba(255,255,255,0.85) !important;
    font-size: calc(12.5px * var(--xlc-fs-scale, 1)) !important;
    font-weight: 400;
    line-height: 1.4;
}

/* Previous conversations (opened from the header's history button) */
#xabcd-lc-root .xlc-history {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 24px 24px 20px;
    background: var(--xlc-white);
}

#xabcd-lc-root .xlc-history-title {
    font-size: calc(12px * var(--xlc-fs-scale, 1)) !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #8a8f9c;
    margin: 0 0 16px;
    padding: 0;
}

#xabcd-lc-root .xlc-history-empty {
    margin: 0;
    padding: 0;
    font-size: calc(14px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
}

.xlc-prev-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xlc-prev-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #ececf2;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.xlc-prev-item:hover {
    transform: translateY(-2px);
    border-color: #d8ccff;
    box-shadow: 0 10px 24px rgba(124,58,237,.08);
}

.xlc-prev-item-left {
    flex: 1;
    min-width: 0;
}

.xlc-prev-item-name {
    font-size: calc(16px * var(--xlc-fs-scale, 1));
    font-weight: 700;
    color: #18181b;
    margin-bottom: 4px;
    padding: 0;
}

.xlc-prev-item-preview {
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    color: #7b8190;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    padding: 0;
}

.xlc-prev-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
    flex-shrink: 0;
}

.xlc-prev-item-date {
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    color: #8d93a1;
    padding: 0;
}

.xlc-prev-item-arrow {
    color: #a855f7;
    flex-shrink: 0;
    transition: transform .2s ease;
}

.xlc-prev-item:hover .xlc-prev-item-arrow {
    transform: translateX(2px);
}

/* ---- Pre-chat Form ---- */
.xlc-prechat {
    padding: 24px 20px;
    overflow-y: auto;
}

.xlc-prechat h4 {
    font-size: calc(16px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    color: var(--xlc-gray-dark);
    margin: 0 0 4px 0;
}

.xlc-prechat p {
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
    margin: 0 0 16px 0;
}

.xlc-form-group {
    margin-bottom: 12px;
}

.xlc-form-group label {
    display: block;
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    color: var(--xlc-gray-dark);
    margin-bottom: 4px;
}

.xlc-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--xlc-gray-light);
    border-radius: 10px;
    font-size: calc(14px * var(--xlc-fs-scale, 1));
    font-family: var(--xlc-font);
    outline: none;
    transition: var(--xlc-transition);
    color: var(--xlc-dark);
    background: var(--xlc-white);
}

.xlc-input:focus {
    border-color: var(--xlc-primary);
    box-shadow: 0 0 0 3px rgba(173, 113, 224, 0.15);
}

.xlc-input::placeholder {
    color: #adb5bd;
}

.xlc-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--xlc-primary), var(--xlc-primary-dark));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: calc(14px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    font-family: var(--xlc-font);
    cursor: pointer;
    transition: var(--xlc-transition);
    margin-top: 4px;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.xlc-submit-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* The widget reset (#xabcd-lc-root * { padding: 2px; margin: 0 }) outranks
   the class rules above, which left the pre-chat and offline forms cramped:
   fields against the edges, labels on top of their inputs. Same values,
   with the root id so they apply. */
#xabcd-lc-root .xlc-prechat { padding: 24px 20px; }
#xabcd-lc-root .xlc-prechat h4 { margin: 0 0 4px; }
#xabcd-lc-root .xlc-prechat p { margin: 0 0 16px; }
#xabcd-lc-root .xlc-form-group { margin-bottom: 14px; padding: 0; }
#xabcd-lc-root .xlc-form-group label { margin-bottom: 6px; padding: 0; }
#xabcd-lc-root .xlc-input { padding: 10px 14px; }
#xabcd-lc-root .xlc-submit-btn { padding: 13px; margin-top: 4px; }

/* ---- Offline form ("Leave us a message") ---- */
#xabcd-lc-root .xlc-offline {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#xabcd-lc-root .xlc-offline > *,
#xabcd-lc-root .xlc-offline-head > *,
#xabcd-lc-root .xlc-offline-form,
#xabcd-lc-root .xlc-offline-row { padding: 0; }
#xabcd-lc-root .xlc-offline-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
#xabcd-lc-root .xlc-offline-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--xlc-primary) 12%, transparent);
    color: var(--xlc-primary);
}
#xabcd-lc-root .xlc-offline h4 {
    font-size: calc(17px * var(--xlc-fs-scale, 1));
    font-weight: 700;
    color: var(--xlc-dark);
    margin: 2px 0 4px;
    padding: 0;
}
#xabcd-lc-root .xlc-offline-head p {
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    line-height: 1.45;
    color: var(--xlc-gray);
    margin: 0;
    padding: 0;
}
/* Name and email side by side when there is room (wide or maximized window). */
#xabcd-lc-root .xlc-offline-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    column-gap: 12px;
}
#xabcd-lc-root .xlc-offline .xlc-form-group { margin-bottom: 14px; }
#xabcd-lc-root .xlc-offline textarea.xlc-input {
    min-height: 104px;
    resize: vertical;
    line-height: 1.45;
}
#xabcd-lc-root .xlc-req { color: var(--xlc-primary); padding: 0; }
#xabcd-lc-root .xlc-input[aria-invalid="true"] { border-color: #e5484d; }
#xabcd-lc-root .xlc-field-error {
    padding: 0;
    color: #e5484d;
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    line-height: 1.4;
}
#xabcd-lc-root .xlc-field-error:not(:empty) { margin-top: 6px; }
#xabcd-lc-root .xlc-offline-error:not(:empty) { margin: 0 0 10px; }
#xabcd-lc-root .xlc-offline .xlc-submit-btn:disabled { opacity: 0.7; cursor: default; transform: none; }
#xabcd-lc-root .xlc-offline-note {
    padding: 0;
    margin-top: 10px;
    text-align: center;
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
}
#xabcd-lc-root .xlc-offline-success {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 20px 12px;
    border-radius: 14px;
    background: var(--xlc-white);
    border: 1px solid var(--xlc-gray-light);
}
#xabcd-lc-root .xlc-offline-success-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--xlc-success) 15%, transparent);
    color: var(--xlc-success);
}
#xabcd-lc-root .xlc-offline-success h4 { margin: 0; }
#xabcd-lc-root .xlc-offline-success p {
    margin: 0;
    padding: 0;
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
}
#xabcd-lc-root .xlc-link-btn {
    margin-top: 6px;
    padding: 4px 6px;
    border: none;
    background: none;
    color: var(--xlc-primary);
    font-family: inherit;
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    cursor: pointer;
}
#xabcd-lc-root .xlc-link-btn:hover { text-decoration: underline; }

/* Business hours: one compact card, days with the same hours on one line. */
#xabcd-lc-root .xlc-hours {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--xlc-white);
    border: 1px solid var(--xlc-gray-light);
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    color: var(--xlc-dark);
}
#xabcd-lc-root .xlc-hours * { padding: 0; }
#xabcd-lc-root .xlc-hours-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: calc(11px * var(--xlc-fs-scale, 1));
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--xlc-gray);
}
#xabcd-lc-root .xlc-hours-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
}
#xabcd-lc-root .xlc-hours-row.is-today { font-weight: 700; color: var(--xlc-primary); }
#xabcd-lc-root .xlc-hours-closed { color: var(--xlc-gray); }
#xabcd-lc-root .xlc-hours-tz {
    margin-top: 8px;
    font-size: calc(11px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
}

#xabcd-lc-root.xlc-dark .xlc-offline h4 { color: #e4e4e7; }
#xabcd-lc-root.xlc-dark .xlc-hours,
#xabcd-lc-root.xlc-dark .xlc-offline-success {
    background: #1a1a2e;
    border-color: #2a2a3e;
    color: #e4e4e7;
}
#xabcd-lc-root.xlc-dark .xlc-hours-closed,
#xabcd-lc-root.xlc-dark .xlc-hours-title,
#xabcd-lc-root.xlc-dark .xlc-hours-tz { color: #9ca3af; }

/* ---- Chat View ---- */
.xlc-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 24px 12px;
    background: var(--xlc-white);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Date Separator */
.xlc-date-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

.xlc-date-sep span {
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
    background: var(--xlc-white);
    padding: 2px 12px;
    position: relative;
}

.xlc-date-sep::before {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--xlc-gray-light);
}

.xlc-date-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--xlc-gray-light);
}

/* Base message */
.xlc-msg {
    display: flex;
    gap: 8px;
    max-width: 80%;
    margin-bottom: 0;
    min-width: 0;
    animation: xlc-msg-in 0.2s ease;
}

@keyframes xlc-msg-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Visitor messages - right aligned, purple */
.xlc-msg-visitor {
    align-self: flex-end;
    margin-left: auto;
    flex-direction: row-reverse;
    margin-bottom: 2px;
}

.xlc-msg-visitor .xlc-msg-bubble {
    background: linear-gradient(135deg, var(--xlc-primary), var(--xlc-primary-dark));
    color: #fff;
}

/* Consecutive visitor messages read as one block: tighter spacing and joined
   corners on the right, like the agent side already does. */
/* #xabcd-lc-root prefix: the widget's reset (#xabcd-lc-root * { margin: 0 })
   outranks class-only selectors, so an unprefixed margin never applies. */
#xabcd-lc-root .xlc-msg-visitor + .xlc-msg-visitor {
    /* 10px list gap + 8px of reset padding between bubbles -> 4px visible gap */
    margin-top: -14px;
}
.xlc-msg-visitor:has(+ .xlc-msg-visitor) .xlc-msg-bubble {
    border-bottom-right-radius: 6px;
}
.xlc-msg-visitor + .xlc-msg-visitor .xlc-msg-bubble {
    border-top-right-radius: 6px;
}

.xlc-msg-visitor .xlc-msg-content {
    align-items: flex-end;
}

/* Delivery state of the visitor's own messages */
.xlc-msg-visitor.xlc-msg-sending .xlc-msg-bubble {
    opacity: 0.6;
}
.xlc-msg-visitor.xlc-msg-failed .xlc-msg-bubble {
    opacity: 0.6;
    outline: 1px solid #e5484d;
    outline-offset: 1px;
}
#xabcd-lc-root .xlc-msg-status {
    margin-top: 3px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: calc(11px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    color: #e5484d;
}
.xlc-msg-status:hover {
    text-decoration: underline;
}
#xabcd-lc-root .xlc-upload-status {
    margin-top: 3px;
    padding: 0;
    font-size: calc(11px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
}

/* ✓ stored / ✓✓ seen by an agent, under each of the visitor's own messages.
   #xabcd-lc-root prefix: the reset's margin/padding would otherwise win. */
#xabcd-lc-root .xlc-msg-ticks {
    align-self: flex-end;
    margin-top: 2px;
    padding: 0 4px 0 0;
    font-size: calc(11px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    color: var(--xlc-gray);
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}
#xabcd-lc-root .xlc-msg-ticks[data-state="read"] {
    /* Tight so ✓✓ reads as one double tick. The negative spacing also trails
       the last glyph, so the padding gives it back and both states end flush. */
    letter-spacing: -0.3em;
    padding-right: calc(4px + 0.3em);
    color: var(--xlc-primary, #ad71e0);
}

/* Reopens a survey the visitor hasn't answered yet */
#xabcd-lc-root .xlc-survey-open {
    align-self: flex-start;
    margin-top: 6px;
    padding: 6px 14px;
    border: 1.5px solid var(--xlc-primary, #ad71e0);
    border-radius: 18px;
    background: transparent;
    color: var(--xlc-primary, #ad71e0);
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
#xabcd-lc-root .xlc-survey-open:hover {
    background: var(--xlc-primary, #ad71e0);
    color: #fff;
}

/* Thin, arrowless scrollbar for everything in the window that scrolls: the
   message list, the home screen (Quick help), the Quick help screens and
   previous conversations. (Was the browser default everywhere but the
   message list.) */
.xlc-chat-messages::-webkit-scrollbar,
.xlc-home-scroll::-webkit-scrollbar,
.xlc-kb::-webkit-scrollbar,
.xlc-history::-webkit-scrollbar {
    width: 6px;
}
.xlc-chat-messages::-webkit-scrollbar-track,
.xlc-home-scroll::-webkit-scrollbar-track,
.xlc-kb::-webkit-scrollbar-track,
.xlc-history::-webkit-scrollbar-track {
    background: transparent;
}
.xlc-chat-messages::-webkit-scrollbar-thumb,
.xlc-home-scroll::-webkit-scrollbar-thumb,
.xlc-kb::-webkit-scrollbar-thumb,
.xlc-history::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}
.xlc-chat-messages::-webkit-scrollbar-thumb:hover,
.xlc-home-scroll::-webkit-scrollbar-thumb:hover,
.xlc-kb::-webkit-scrollbar-thumb:hover,
.xlc-history::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
.xlc-chat-messages::-webkit-scrollbar-button,
.xlc-home-scroll::-webkit-scrollbar-button,
.xlc-kb::-webkit-scrollbar-button,
.xlc-history::-webkit-scrollbar-button {
    display: none;
    height: 0;
}
#xabcd-lc-root.xlc-dark .xlc-chat-messages::-webkit-scrollbar-thumb,
#xabcd-lc-root.xlc-dark .xlc-home-scroll::-webkit-scrollbar-thumb,
#xabcd-lc-root.xlc-dark .xlc-kb::-webkit-scrollbar-thumb,
#xabcd-lc-root.xlc-dark .xlc-history::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
#xabcd-lc-root.xlc-dark .xlc-chat-messages::-webkit-scrollbar-thumb:hover,
#xabcd-lc-root.xlc-dark .xlc-home-scroll::-webkit-scrollbar-thumb:hover,
#xabcd-lc-root.xlc-dark .xlc-kb::-webkit-scrollbar-thumb:hover,
#xabcd-lc-root.xlc-dark .xlc-history::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
/* Firefox (no ::-webkit-scrollbar) */
@supports not selector(::-webkit-scrollbar) {
    .xlc-chat-messages,
    .xlc-home-scroll,
    .xlc-kb,
    .xlc-history {
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    }
    #xabcd-lc-root.xlc-dark .xlc-chat-messages,
    #xabcd-lc-root.xlc-dark .xlc-home-scroll,
    #xabcd-lc-root.xlc-dark .xlc-kb,
    #xabcd-lc-root.xlc-dark .xlc-history {
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }
}

/* Agent message group */
.xlc-msg-agent-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 80%;
    margin-bottom: 2px;
}

/* Agent messages inside group */
.xlc-msg-agent {
    align-self: flex-start;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 3px;
}

/* Avatar slot - hidden by default (it still holds the space, so every bubble
   in a group lines up), shown beside the first message of the group */
.xlc-msg-avatar-slot {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    visibility: hidden;
}

.xlc-msg-agent.xlc-msg-first .xlc-msg-avatar-slot {
    visibility: visible;
    /* Level with the top of that bubble, where the group starts, rather than
       its bottom edge. */
    align-self: flex-start;
}

.xlc-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.xlc-msg-avatar-ph {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--xlc-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    flex-shrink: 0;
    color: var(--xlc-gray);
}

.xlc-msg-content {
    display: flex;
    flex-direction: column;
}

/* "Show original / Show translation" toggle under a translated agent bubble */
.xlc-show-original {
    align-self: flex-start;
    margin-top: 3px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: calc(11px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    color: var(--xlc-primary, #9333ea);
    opacity: 0.85;
}

.xlc-show-original:hover {
    opacity: 1;
    text-decoration: underline;
}

.xlc-msg-agent .xlc-msg-bubble {
    background: var(--xlc-bg);
    color: var(--xlc-dark);
}

/* Agent name */
.xlc-agent-name {
    font-size: calc(11px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
    margin-top: 6px;
    padding-left: 36px;
}

/* ...heading an agent's group, above its first message and in line with the
   bubbles. #xabcd-lc-root prefix: the widget reset (#xabcd-lc-root * { margin:
   0; padding: 2px }) outranks class-only selectors, which is why the name used
   to sit at the far left. */
#xabcd-lc-root .xlc-msg-agent-group > .xlc-agent-name {
    margin: 0 0 4px;
    padding: 0 0 0 38px;
}

/* System messages (surveys) */
.xlc-msg-system {
    align-self: flex-start;
    display: flex;
    gap: 6px;
    align-items: flex-end;
    margin-bottom: 2px;
    max-width: 85%;
}

.xlc-msg-system .xlc-msg-avatar-slot {
    visibility: visible;
}

.xlc-msg-system .xlc-msg-bubble {
    background: var(--xlc-bg);
    color: var(--xlc-gray);
}

/* System info messages (assigned, resolved, transferred) */
.xlc-msg-system-info {
    align-self: center;
    text-align: center;
    width: 100%;
    margin: 8px 0;
}

.xlc-msg-system-info .xlc-system-text {
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
    font-style: italic;
}

/* Bot messages */
.xlc-msg-bot {
    align-self: flex-start;
    display: flex;
    gap: 6px;
    align-items: flex-end;
    margin-bottom: 2px;
    max-width: 80%;
}

.xlc-msg-bot .xlc-msg-avatar-slot {
    visibility: visible;
}

.xlc-msg-bot .xlc-msg-bubble {
    background: #f0ebf8;
    color: var(--xlc-gray-dark);
}

.xlc-msg-bubble {
    border-radius: 18px;
    padding: 12px 18px !important;
    font-size: var(--xlc-fs-body) !important;
    line-height: 1.55;
    word-break: break-word;
}

/* Typing indicator */
.xlc-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    margin-bottom: 2px;
}

.xlc-typing-dots {
    display: flex;
    gap: 3px;
    padding: 8px 14px;
    background: var(--xlc-white);
    border: 1px solid var(--xlc-gray-light);
    border-radius: 16px;
}

.xlc-typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--xlc-gray);
    animation: xlc-bounce 1.4s infinite both;
}

.xlc-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.xlc-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes xlc-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-3px); opacity: 1; }
}

/* Chat input area */
.xlc-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 20px 2em;
    background: var(--xlc-white);
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.xlc-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid var(--xlc-gray-light);
    border-radius: 24px;
    padding: 4px 8px 4px 0;
    transition: var(--xlc-transition);
    background: var(--xlc-bg);
    min-height: 44px;
}

.xlc-input-wrap:focus-within {
    background: var(--xlc-white);
}

/* No focus ring on the message box. The widget already set outline:none, but
   host themes (e.g. a global textarea:focus style) are more specific and were
   drawing their own outline/border around the textarea, so force it here. */
#xabcd-lc-root .xlc-chat-input-area textarea,
#xabcd-lc-root .xlc-chat-input-area textarea:focus,
#xabcd-lc-root .xlc-chat-input-area textarea:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.xlc-chat-input-area textarea {
    flex: 1;
    padding: 10px 8px 10px 16px !important;
    border: none;
    font-size: var(--xlc-fs-input) !important;
    font-family: var(--xlc-font);
    resize: none;
    outline: none;
    max-height: 80px;
    line-height: 1.4;
    color: var(--xlc-dark);
    background: transparent;
}

.xlc-chat-input-area textarea::placeholder {
    color: #adb5bd;
}

.xlc-input-actions {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 4px;
}

.xlc-input-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--xlc-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--xlc-transition);
    padding: 0;
}

.xlc-input-icon:hover {
    color: var(--xlc-dark);
    background: var(--xlc-bg);
}

.xlc-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, var(--xlc-primary), var(--xlc-primary-dark));
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--xlc-transition);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.xlc-send-btn:hover {
    filter: brightness(1.05);
    transform: scale(1.04);
}

.xlc-send-btn svg {
    width: 18px;
    height: 18px;
}

/* ---- Survey View ---- */
.xlc-survey {
    padding: 20px;
    overflow-y: auto;
}

.xlc-survey h4 {
    font-size: calc(16px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    color: var(--xlc-gray-dark);
    margin: 0 0 12px 0;
}

.xlc-survey-question {
    margin-bottom: 14px;
}

.xlc-survey-question label {
    display: block;
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-weight: 500;
    color: var(--xlc-gray-dark);
    margin-bottom: 6px;
}

.xlc-survey-question input[type="text"],
.xlc-survey-question textarea,
.xlc-survey-question select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--xlc-gray-light);
    border-radius: 8px;
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-family: var(--xlc-font);
    outline: none;
    transition: var(--xlc-transition);
    color: var(--xlc-dark);
}

.xlc-survey-question input:focus,
.xlc-survey-question textarea:focus,
.xlc-survey-question select:focus {
    border-color: var(--xlc-primary);
}

/* Rating stars */
.xlc-rating {
    display: flex;
    gap: 6px;
}

.xlc-rating-star {
    width: 32px;
    height: 32px;
    border: 2px solid var(--xlc-gray-light);
    border-radius: 8px;
    background: var(--xlc-white);
    cursor: pointer;
    font-size: calc(18px * var(--xlc-fs-scale, 1));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--xlc-transition);
}

.xlc-rating-star:hover,
.xlc-rating-star.active {
    border-color: #ffd600;
    background: #fffde7;
}

/* Radio / Checkbox */
.xlc-option-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xlc-option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--xlc-transition);
}

.xlc-option-label:hover {
    background: var(--xlc-bg);
}

.xlc-option-label input {
    accent-color: var(--xlc-primary);
}


/* ---- Inline status dot ---- */
.xlc-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--xlc-success);
    margin-right: 5px;
    vertical-align: middle;
    position: relative;
    top: -0.5px;
}

/* ---- Powered by ---- */
.xlc-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 8px;
    font-size: calc(13px * var(--xlc-fs-scale, 1)) !important;
    color: #8a8f9c;
    border-top: 1px solid #f0f0f4;
    background: var(--xlc-white);
    flex-shrink: 0;
}

.xlc-powered svg {
    width: 16px;
    height: 16px;
    stroke: #9ca3af;
    flex-shrink: 0;
}

.xlc-powered a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   Dark Theme (default)
   ============================================ */
#xabcd-lc-root.xlc-dark {
    --xlc-white: #1a1a2e;
    --xlc-dark: #e4e4e7;
    --xlc-gray: #9ca3af;
    --xlc-gray-dark: #e4e4e7;
    --xlc-gray-light: #2a2a3e;
    --xlc-bg: #12121e;
}

#xabcd-lc-root.xlc-dark .xlc-bubble {
    border-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-window {
    background: #1a1a2e;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3);
}

#xabcd-lc-root.xlc-dark .xlc-header {
    background: #1a1a2e;
    border-bottom-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-header-back,
#xabcd-lc-root.xlc-dark .xlc-header-close {
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-header-history.is-active {
    color: var(--xlc-primary);
}

#xabcd-lc-root.xlc-dark .xlc-history {
    background: #12121e;
}

#xabcd-lc-root.xlc-dark .xlc-header-back:hover,
#xabcd-lc-root.xlc-dark .xlc-header-close:hover {
    background: #222238;
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-font-pill {
    background: #1a1a2e;
    border-color: #2a2a3e;
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-font-pill:hover {
    border-color: var(--xlc-primary);
    color: var(--xlc-primary);
}

#xabcd-lc-root.xlc-dark .xlc-menu {
    background: #1a1a2e;
    border-color: #2a2a3e;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

#xabcd-lc-root.xlc-dark .xlc-menu-item,
#xabcd-lc-root.xlc-dark .xlc-menu-row {
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-menu-item:hover,
#xabcd-lc-root.xlc-dark .xlc-menu-item:focus-visible {
    background: #222238;
    color: var(--xlc-primary);
}

#xabcd-lc-root.xlc-dark .xlc-menu-size-btn {
    background: #12121e;
    border-color: #2a2a3e;
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-header-online {
    border-color: #1a1a2e;
}

#xabcd-lc-root.xlc-dark .xlc-chat-messages {
    background: #1a1a2e;
}

#xabcd-lc-root.xlc-dark .xlc-date-sep span {
    background: #1a1a2e;
    color: #6b6b80;
}

#xabcd-lc-root.xlc-dark .xlc-date-sep::before,
#xabcd-lc-root.xlc-dark .xlc-date-sep::after {
    background: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-msg-agent .xlc-msg-bubble {
    background: #2a2a3e;
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-msg-avatar-ph {
    background: #363650;
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-agent-name {
    color: #6b6b80;
}

#xabcd-lc-root.xlc-dark .xlc-msg-system .xlc-msg-bubble {
    background: #222238;
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-msg-system-info .xlc-system-text {
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-msg-bot .xlc-msg-bubble {
    background: #252540;
    color: #d4b5f0;
}

#xabcd-lc-root.xlc-dark .xlc-typing-dots {
    background: #2a2a3e;
    border-color: #363650;
}

#xabcd-lc-root.xlc-dark .xlc-chat-input-area {
    background: #1a1a2e;
}

#xabcd-lc-root.xlc-dark .xlc-input-wrap {
    background: #1a1a2e;
    border-color: #2a2a3e;
}


#xabcd-lc-root.xlc-dark .xlc-chat-input-area textarea {
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-chat-input-area textarea::placeholder {
    color: #6b6b80;
}

#xabcd-lc-root.xlc-dark .xlc-input-icon {
    color: #6b6b80;
}

#xabcd-lc-root.xlc-dark .xlc-input-icon:hover {
    color: #e4e4e7;
    background: #222238;
}

#xabcd-lc-root.xlc-dark .xlc-home {
    background: #12121e;
}

#xabcd-lc-root.xlc-dark .xlc-home-welcome h3 {
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-prev-item {
    background: #1a1a2e;
    border-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-prev-item:hover {
    background: #222238;
    border-color: #4a3a6e;
}

#xabcd-lc-root.xlc-dark .xlc-prev-item-name {
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-prev-item-arrow {
    color: #6b6b80;
}

#xabcd-lc-root.xlc-dark .xlc-prechat {
    background: #1a1a2e;
}

#xabcd-lc-root.xlc-dark .xlc-prechat h4 {
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-input {
    background: #12121e;
    color: #e4e4e7;
    border-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-input:focus {
    border-color: var(--xlc-primary);
}

#xabcd-lc-root.xlc-dark .xlc-input::placeholder {
    color: #6b6b80;
}

#xabcd-lc-root.xlc-dark .xlc-survey {
    background: #1a1a2e;
}

#xabcd-lc-root.xlc-dark .xlc-survey h4 {
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-survey-question label {
    color: #d1d1d8;
}

#xabcd-lc-root.xlc-dark .xlc-survey-question input[type="text"],
#xabcd-lc-root.xlc-dark .xlc-survey-question textarea,
#xabcd-lc-root.xlc-dark .xlc-survey-question select {
    background: #12121e;
    color: #e4e4e7;
    border-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-rating-star {
    background: #222238;
    border-color: #363650;
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-rating-star:hover,
#xabcd-lc-root.xlc-dark .xlc-rating-star.active {
    border-color: #ffd600;
    background: #2a2a1e;
}

#xabcd-lc-root.xlc-dark .xlc-option-label {
    color: #d1d1d8;
}

#xabcd-lc-root.xlc-dark .xlc-option-label:hover {
    background: #222238;
}

#xabcd-lc-root.xlc-dark .xlc-powered {
    background: #1a1a2e;
    border-top-color: #2a2a3e;
    color: #6b6b80;
}

/* ---- Quick Rating Bar ---- */
.xlc-quick-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--xlc-bg);
    border-top: 1px solid var(--xlc-gray-light);
    flex-shrink: 0;
}

.xlc-rating-prompt {
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    color: var(--xlc-gray);
}

.xlc-rating-btns {
    display: flex;
    gap: 8px;
}

.xlc-rate-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
    border: 1.5px solid var(--xlc-gray-light);
    border-radius: 8px;
    background: var(--xlc-white);
    color: var(--xlc-gray);
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    font-family: var(--xlc-font);
    cursor: pointer;
    transition: var(--xlc-transition);
}

.xlc-rate-btn:hover {
    border-color: var(--xlc-primary);
    color: var(--xlc-primary);
}

.xlc-rate-good:hover {
    border-color: var(--xlc-success);
    color: var(--xlc-success);
    background: rgba(45, 206, 137, 0.06);
}

.xlc-rate-bad:hover {
    border-color: #f5365c;
    color: #f5365c;
    background: rgba(245, 54, 92, 0.06);
}

.xlc-rate-btn svg {
    width: 16px;
    height: 16px;
}

.xlc-rating-thanks {
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    color: var(--xlc-success);
    font-weight: 500;
}

.xlc-rating-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.xlc-leave-comment-btn {
    padding: 6px 16px;
    border: 1.5px solid var(--xlc-primary);
    border-radius: 8px;
    background: transparent;
    color: var(--xlc-primary);
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    font-family: var(--xlc-font);
    cursor: pointer;
    transition: var(--xlc-transition);
}

.xlc-leave-comment-btn:hover {
    background: var(--xlc-primary);
    color: var(--xlc-white);
}

.xlc-comment-form {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: flex-end;
}

.xlc-comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--xlc-gray-light);
    border-radius: 8px;
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    font-family: var(--xlc-font);
    resize: none;
    outline: none;
    background: var(--xlc-white);
    color: var(--xlc-text);
}

.xlc-comment-input:focus {
    border-color: var(--xlc-primary);
}

.xlc-comment-send-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: var(--xlc-primary);
    color: var(--xlc-white);
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    font-family: var(--xlc-font);
    cursor: pointer;
    transition: var(--xlc-transition);
    white-space: nowrap;
}

.xlc-comment-send-btn:hover {
    opacity: 0.9;
}

.xlc-comment-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Attachment Styles ---- */
.xlc-msg-attachment {
    margin-top: 4px;
}

.xlc-attach-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--xlc-transition);
    display: block;
}

.xlc-attach-img:hover {
    opacity: 0.85;
}

.xlc-file-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--xlc-bg);
    border: 1px solid var(--xlc-gray-light);
    border-radius: 8px;
    font-size: calc(12px * var(--xlc-fs-scale, 1));
    color: var(--xlc-primary);
    text-decoration: none;
    transition: var(--xlc-transition);
}

.xlc-file-link:hover {
    background: var(--xlc-gray-light);
}

/* Dark theme additions for new elements */
#xabcd-lc-root.xlc-dark .xlc-quick-rating {
    background: #12121e;
    border-top-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-rate-btn {
    background: #1a1a2e;
    border-color: #2a2a3e;
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-file-link {
    background: #222238;
    border-color: #363650;
    color: var(--xlc-primary-light);
}

#xabcd-lc-root.xlc-dark .xlc-comment-input {
    background: #1a1a2e;
    border-color: #2a2a3e;
    color: #e5e7eb;
}

#xabcd-lc-root.xlc-dark .xlc-comment-input:focus {
    border-color: var(--xlc-primary);
}

#xabcd-lc-root.xlc-dark .xlc-leave-comment-btn {
    border-color: var(--xlc-primary);
    color: var(--xlc-primary-light);
}

/* ---- Responsive ---- */
/* ---- Quick Reply Buttons ---- */
.xlc-qr-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.xlc-qr-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1.5px solid var(--xlc-primary, #ad71e0);
    border-radius: 18px;
    background: transparent;
    color: var(--xlc-primary, #ad71e0);
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.xlc-qr-btn:hover {
    background: var(--xlc-primary, #ad71e0);
    color: #fff;
}

.xlc-qr-btn:disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.xlc-qr-btn-selected {
    background: var(--xlc-primary, #ad71e0) !important;
    color: #fff !important;
    opacity: 1 !important;
}

.xlc-qr-btn-used {
    opacity: 0.4;
}

/* Emoji Picker */
.xlc-emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 4px;
    background: var(--xlc-white);
    border: 1px solid var(--xlc-gray-light);
    border-radius: var(--xlc-radius);
    box-shadow: var(--xlc-shadow);
    z-index: 100;
    display: none;
    flex-direction: column;
    max-height: 240px;
    overflow: hidden;
}

.xlc-emoji-picker.open {
    display: flex;
}

.xlc-emoji-search {
    padding: 8px;
    border-bottom: 1px solid var(--xlc-gray-light);
}

.xlc-emoji-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--xlc-gray-light);
    border-radius: 8px;
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    outline: none;
    font-family: var(--xlc-font);
    background: var(--xlc-white);
    color: var(--xlc-dark);
}

.xlc-emoji-search input:focus {
    border-color: var(--xlc-primary);
}

.xlc-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 8px;
    overflow-y: auto;
    flex: 1;
}

.xlc-emoji-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(20px * var(--xlc-fs-scale, 1));
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}

.xlc-emoji-grid span:hover {
    background: var(--xlc-bg);
}

#xabcd-lc-root.xlc-dark .xlc-emoji-picker {
    background: #1a1a2e;
    border-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-emoji-search {
    border-bottom-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-emoji-search input {
    background: #12121e;
    border-color: #2a2a3e;
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-emoji-grid span:hover {
    background: #2a2a3e;
}

/* ---- Maximize (desktop only) ----
   The button and the maximized layout only apply on wide screens with a mouse;
   on phones the window already fills the screen, and on tablets/touch screens
   the button stays hidden. */
#xabcd-lc-root .xlc-header-max {
    display: none;
}
#xabcd-lc-root .xlc-header-max .xlc-icon-restore { display: none; }

/* Resize grip: a faint pair of diagonal lines in the top corner that faces
   into the page (top-left for a bottom-right widget, top-right otherwise). */
#xabcd-lc-root .xlc-resize-grip {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    z-index: 5;
    cursor: nwse-resize;
    color: var(--xlc-gray);
    opacity: 0.55;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6px; /* clear of the rounded corner */
    box-sizing: border-box;
    touch-action: none;
    transition: opacity 0.15s ease, color 0.15s ease;
}
#xabcd-lc-root .xlc-window.bottom-left .xlc-resize-grip {
    left: auto;
    right: 0;
    cursor: nesw-resize;
    justify-content: flex-end;
}
#xabcd-lc-root .xlc-window.bottom-left .xlc-resize-grip svg { transform: rotate(90deg); }
#xabcd-lc-root .xlc-window:hover .xlc-resize-grip { opacity: 0.75; }
#xabcd-lc-root .xlc-resize-grip:hover,
#xabcd-lc-root .xlc-window.xlc-resizing .xlc-resize-grip { opacity: 1; color: var(--xlc-primary); }
#xabcd-lc-root .xlc-window.xlc-resizing { user-select: none; -webkit-user-select: none; }
#xabcd-lc-root .xlc-window.xlc-maximized .xlc-header-max .xlc-icon-expand { display: none; }
#xabcd-lc-root .xlc-window.xlc-maximized .xlc-header-max .xlc-icon-restore { display: block; }

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    #xabcd-lc-root .xlc-header-max { display: flex; }
    #xabcd-lc-root .xlc-resize-grip { display: flex; }
    #xabcd-lc-root .xlc-window.xlc-maximized .xlc-resize-grip { display: none; }

    /* A size the visitor dragged to. */
    #xabcd-lc-root .xlc-window.xlc-resized {
        width: var(--xlc-win-w);
        height: var(--xlc-win-h);
    }

    #xabcd-lc-root .xlc-window.xlc-maximized {
        top: 24px;
        bottom: 24px;
        left: 24px;
        right: 24px;
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
    }

    /* The launcher would sit on the maximized window's corner; the header's
       close button closes it. */
    #xabcd-lc-root:has(.xlc-window.xlc-maximized.open) .xlc-bubble { display: none; }

    /* Keep lines readable in the wide window. */
    #xabcd-lc-root .xlc-window.xlc-maximized .xlc-msg {
        max-width: min(80%, 760px);
    }
}

@media (max-width: 480px) {
    .xlc-window,
    .xlc-window.xlc-window-small,
    .xlc-window.xlc-window-medium,
    .xlc-window.xlc-window-large {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 85vh;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        z-index: 2147483647;
    }

    .xlc-window.bottom-left {
        left: 0;
    }

    .xlc-bubble {
        bottom: 16px;
        right: 16px;
    }

    .xlc-bubble.bottom-left {
        left: 16px;
        right: auto;
    }

    /* Force circle-only bubble on mobile (no extended pill) */
    .xlc-bubble.xlc-bubble-pill {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        padding: 0;
        gap: 0;
        overflow: hidden;
    }

    .xlc-bubble.xlc-bubble-pill.xlc-bubble-small { width: 56px; height: 56px; }
    .xlc-bubble.xlc-bubble-pill.xlc-bubble-large { width: 72px; height: 72px; }

    .xlc-bubble.xlc-bubble-pill img.xlc-bubble-avatar {
        width: 100%;
        height: 100%;
        border: none;
    }

    .xlc-bubble-text {
        display: none !important;
    }

    /* Hide bubble when window is open on mobile */
    .xlc-window.open ~ .xlc-bubble {
        display: none !important;
    }

    /* Prevent iOS Safari auto-zoom on input focus (requires font-size >= 16px) */
    @supports (-webkit-touch-callout: none) {
        .xlc-chat-input-area textarea,
        .xlc-input,
        .xlc-survey-question input[type="text"],
        .xlc-survey-question textarea,
        .xlc-comment-input {
            font-size: max(16px, calc(16px * var(--xlc-fs-scale, 1))) !important;
        }
    }
}

/* ============================================
   Home view spacing
   The reset at the top (#xabcd-lc-root * { padding: 2px; margin: 0; })
   outranks plain class rules, so the home view's own padding and margins
   never applied and its content sat 2px from the window edge. Restated with
   the ID so they do — Quick help has to line up with the greeting above it.
   ============================================ */
#xabcd-lc-root .xlc-home-scroll {
    padding: 30px 24px 0;
}

#xabcd-lc-root .xlc-prev-item {
    padding: 16px 18px;
}

/* ============================================
   Quick help: knowledge base links on the home
   view, and the view they open (a category, an
   article, search, or a log-in prompt).
   Every rule carries #xabcd-lc-root so it beats
   the reset above and host-theme styles for
   buttons, headings and lists.
   ============================================ */
#xabcd-lc-root .xlc-qh[hidden],
#xabcd-lc-root .xlc-qh-search-wrap[hidden] {
    display: none !important;
}

#xabcd-lc-root .xlc-qh {
    display: block;
    margin: 0 0 20px;
    padding: 20px 0 0;
    border-top: 1px solid #ececf2;
}

#xabcd-lc-root .xlc-qh-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 0;
}

#xabcd-lc-root .xlc-qh-title {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: calc(18px * var(--xlc-fs-scale, 1));
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #221b44;
}

#xabcd-lc-root .xlc-qh-sub {
    min-width: 0;
    padding: 0;
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#xabcd-lc-root .xlc-qh-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

/* Host themes style <button> freely; take back everything that shows. */
#xabcd-lc-root .xlc-qh-item,
#xabcd-lc-root .xlc-qh-search,
#xabcd-lc-root .xlc-kb-item,
#xabcd-lc-root .xlc-kb-crumb,
#xabcd-lc-root .xlc-kb-vote,
#xabcd-lc-root .xlc-kb-chat,
#xabcd-lc-root .xlc-kb-retry {
    -webkit-appearance: none;
    appearance: none;
    min-height: 0;
    font-family: inherit;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
}

#xabcd-lc-root .xlc-qh-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 9px 14px 9px 9px;
    border: 1px solid #e7e7ee;
    border-radius: 12px;
    background: #fff;
    color: #18181b;
    font-size: calc(16px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#xabcd-lc-root .xlc-qh-item:hover {
    border-color: #d8ccff;
    background: #fff;
    color: #18181b;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.08);
    transform: translateY(-1px);
}

#xabcd-lc-root .xlc-qh-item:focus-visible,
#xabcd-lc-root .xlc-qh-search:focus-visible,
#xabcd-lc-root .xlc-kb-item:focus-visible,
#xabcd-lc-root .xlc-kb-crumb:focus-visible,
#xabcd-lc-root .xlc-kb-vote:focus-visible,
#xabcd-lc-root .xlc-kb-chat:focus-visible,
#xabcd-lc-root .xlc-kb-retry:focus-visible,
#xabcd-lc-root .xlc-kb-open:focus-visible,
#xabcd-lc-root .xlc-kb-login-btn:focus-visible {
    outline: 2px solid var(--xlc-primary);
    outline-offset: 2px;
}

#xabcd-lc-root .xlc-qh-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    color: var(--xlc-qh-color, #7c3aed);
    background: var(--xlc-qh-tint, rgba(124, 58, 237, 0.12));
}

#xabcd-lc-root .xlc-qh-icon svg {
    width: 20px;
    height: 20px;
    padding: 0;
}

#xabcd-lc-root .xlc-qh-label {
    flex: 1;
    min-width: 0;
    padding: 0;
    overflow-wrap: anywhere;
}

#xabcd-lc-root .xlc-qh-chevron {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    padding: 0;
    color: #6b7280;
}

/* Search bar, pinned at the foot of the home view in the help footer's place */
#xabcd-lc-root .xlc-qh-search-wrap {
    flex-shrink: 0;
    margin: 0;
    padding: 14px 24px 16px;
    border-top: 1px solid #ececf2;
}

#xabcd-lc-root .xlc-qh-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e7e7ee;
    border-radius: 12px;
    background: #f6f6f9;
    color: #6b7280;
    font-size: calc(15px * var(--xlc-fs-scale, 1));
    font-weight: 400;
    text-align: left;
    transition: border-color .2s ease, background .2s ease;
}

#xabcd-lc-root .xlc-qh-search:hover {
    border-color: #d8ccff;
    background: #f3f0fb;
    color: #4b5563;
}

#xabcd-lc-root .xlc-qh-search-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    color: #4b5563;
}

#xabcd-lc-root .xlc-qh-search-text {
    flex: 1;
    min-width: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* With Quick help showing there is more to fit on the home view, so a little
   less space around the chat button. (The button itself is the same compact
   size either way.) */
#xabcd-lc-root .xlc-home.xlc-has-qh .xlc-start-chat-btn {
    margin: 20px 0 !important;
}

#xabcd-lc-root .xlc-home.xlc-has-qh .xlc-home-scroll {
    padding-bottom: 4px;
}

/* ---- Help view: category, article, search, log-in ---- */
#xabcd-lc-root .xlc-kb {
    /* Follows the visitor's A-/A+ like the chat does, but never smaller than
       comfortable for reading a whole article. */
    --xlc-kb-fs: max(15px, var(--xlc-fs-body));
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 20px 24px 24px;
    background: #fff;
    color: #374151;
    font-size: var(--xlc-kb-fs);
    line-height: 1.55;
    outline: none;
}

#xabcd-lc-root .xlc-kb-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-heading,
#xabcd-lc-root .xlc-kb-title,
#xabcd-lc-root .xlc-kb-login-title {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #221b44;
}

#xabcd-lc-root .xlc-kb-heading {
    font-size: calc(19px * var(--xlc-fs-scale, 1));
}

#xabcd-lc-root .xlc-kb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 12px 12px 14px;
    border: 1px solid #e7e7ee;
    border-radius: 12px;
    background: #fff;
    color: #18181b;
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#xabcd-lc-root .xlc-kb-item:hover {
    border-color: #d8ccff;
    background: #fff;
    color: #18181b;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.08);
}

#xabcd-lc-root .xlc-kb-item-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-item-title {
    padding: 0;
    font-size: var(--xlc-kb-fs);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#xabcd-lc-root .xlc-kb-item-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0;
    font-size: calc(var(--xlc-kb-fs) - 1px);
    font-weight: 400;
    line-height: 1.45;
    color: #6b7280;
}

#xabcd-lc-root .xlc-kb-empty,
#xabcd-lc-root .xlc-kb-status {
    margin: 4px 0 0;
    padding: 0;
    color: #6b7280;
}

#xabcd-lc-root .xlc-kb-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#xabcd-lc-root .xlc-kb-spinner {
    width: 16px;
    height: 16px;
    padding: 0;
    border: 2px solid #e5e7eb;
    border-top-color: var(--xlc-primary);
    border-radius: 50%;
    animation: xlc-kb-spin .7s linear infinite;
}

@keyframes xlc-kb-spin {
    to { transform: rotate(360deg); }
}

#xabcd-lc-root .xlc-kb-retry {
    margin: 0;
    padding: 5px 12px;
    border: 1px solid var(--xlc-primary);
    border-radius: 8px;
    background: transparent;
    color: var(--xlc-primary);
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-weight: 600;
}

/* Article */
#xabcd-lc-root .xlc-kb-article {
    padding: 0;
}

#xabcd-lc-root .xlc-kb-crumb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    margin: 0 0 10px -4px;
    padding: 2px 6px 2px 2px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--xlc-primary);
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-weight: 600;
}

#xabcd-lc-root .xlc-kb-crumb:hover {
    background: rgba(124, 58, 237, 0.08);
    color: var(--xlc-primary);
}

#xabcd-lc-root .xlc-kb-crumb svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-crumb span {
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#xabcd-lc-root .xlc-kb-title {
    margin: 0 0 14px;
    font-size: calc(var(--xlc-kb-fs) + 6px);
}

/* Article body, as the Knowledge Base page prints it */
#xabcd-lc-root .xlc-kb-content {
    padding: 0;
    color: #374151;
    font-size: var(--xlc-kb-fs);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#xabcd-lc-root .xlc-kb-content * {
    padding: 0;
}

#xabcd-lc-root .xlc-kb-content p {
    margin: 0 0 0.8em;
}

#xabcd-lc-root .xlc-kb-content h2,
#xabcd-lc-root .xlc-kb-content h3,
#xabcd-lc-root .xlc-kb-content h4,
#xabcd-lc-root .xlc-kb-content h5,
#xabcd-lc-root .xlc-kb-content h6 {
    margin: 1.3em 0 0.5em;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    color: #221b44;
}

#xabcd-lc-root .xlc-kb-content h2 { font-size: 1.2em; }
#xabcd-lc-root .xlc-kb-content h3 { font-size: 1.07em; }
#xabcd-lc-root .xlc-kb-content h4,
#xabcd-lc-root .xlc-kb-content h5,
#xabcd-lc-root .xlc-kb-content h6 { font-size: 1em; }

#xabcd-lc-root .xlc-kb-content > :first-child {
    margin-top: 0;
}

#xabcd-lc-root .xlc-kb-content ul,
#xabcd-lc-root .xlc-kb-content ol {
    margin: 0 0 0.9em;
    padding-left: 1.4em;
}

#xabcd-lc-root .xlc-kb-content ul { list-style: disc outside; }
#xabcd-lc-root .xlc-kb-content ol { list-style: decimal outside; }

#xabcd-lc-root .xlc-kb-content li {
    margin: 0 0 0.35em;
}

#xabcd-lc-root .xlc-kb-content li > ul,
#xabcd-lc-root .xlc-kb-content li > ol {
    margin: 0.35em 0 0;
}

#xabcd-lc-root .xlc-kb-content strong,
#xabcd-lc-root .xlc-kb-content b {
    font-weight: 700;
    color: #1f2937;
}

#xabcd-lc-root .xlc-kb-content em,
#xabcd-lc-root .xlc-kb-content i {
    font-style: italic;
}

#xabcd-lc-root .xlc-kb-content a {
    color: var(--xlc-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#xabcd-lc-root .xlc-kb-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.6em 0;
    border-radius: 8px;
}

#xabcd-lc-root .xlc-kb-content code {
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: #f3f4f6;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

#xabcd-lc-root .xlc-kb-content pre {
    margin: 0 0 0.9em;
    padding: 0.75em;
    overflow-x: auto;
    border-radius: 8px;
    background: #f3f4f6;
}

#xabcd-lc-root .xlc-kb-content pre code {
    padding: 0;
    background: transparent;
}

#xabcd-lc-root .xlc-kb-content blockquote {
    margin: 0 0 0.9em;
    padding-left: 0.9em;
    border-left: 3px solid #e5e7eb;
    color: #6b7280;
}

#xabcd-lc-root .xlc-kb-content table {
    display: block;
    max-width: 100%;
    margin: 0 0 0.9em;
    overflow-x: auto;
    border-collapse: collapse;
}

#xabcd-lc-root .xlc-kb-content th,
#xabcd-lc-root .xlc-kb-content td {
    padding: 0.4em 0.6em;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

#xabcd-lc-root .xlc-kb-content hr {
    margin: 1.2em 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
}

/* Was this helpful? */
#xabcd-lc-root .xlc-kb-helpful {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #ececf2;
    font-size: calc(14px * var(--xlc-fs-scale, 1));
    color: #4b5563;
}

#xabcd-lc-root .xlc-kb-helpful-q,
#xabcd-lc-root .xlc-kb-helpful-done {
    padding: 0;
    font-weight: 600;
}

#xabcd-lc-root .xlc-kb-helpful-btns {
    display: flex;
    gap: 8px;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-vote {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #4b5563;
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-weight: 600;
}

#xabcd-lc-root .xlc-kb-vote:hover {
    border-color: var(--xlc-primary);
    background: #fff;
    color: var(--xlc-primary);
}

#xabcd-lc-root .xlc-kb-vote svg {
    width: 15px;
    height: 15px;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 16px 0 0;
    padding: 0;
    color: var(--xlc-primary);
    font-size: calc(13px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    text-decoration: none;
}

#xabcd-lc-root .xlc-kb-open:hover {
    text-decoration: underline;
}

#xabcd-lc-root .xlc-kb-open svg {
    width: 14px;
    height: 14px;
    padding: 0;
}

/* Still need help? */
#xabcd-lc-root .xlc-kb-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 24px 0 0;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, #faf7ff 0%, #f6f2ff 100%);
    border: 1px solid #efe7ff;
}

#xabcd-lc-root .xlc-kb-cta-text {
    padding: 0;
    font-size: calc(14px * var(--xlc-fs-scale, 1));
    font-weight: 600;
    color: #221b44;
}

#xabcd-lc-root .xlc-kb-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 45%, #7c3aed 100%);
    color: #fff;
    font-size: calc(15px * var(--xlc-fs-scale, 1));
    font-weight: 700;
    transition: filter .2s ease, transform .2s ease;
}

#xabcd-lc-root .xlc-kb-chat:hover {
    filter: brightness(1.05);
    color: #fff;
    transform: translateY(-1px);
}

#xabcd-lc-root .xlc-kb-chat svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-chat-label {
    padding: 0;
}

/* Search */
#xabcd-lc-root .xlc-kb-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 0 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #6b7280;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#xabcd-lc-root .xlc-kb-search-box:focus-within {
    border-color: var(--xlc-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

#xabcd-lc-root .xlc-kb-search-box svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-search-input {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    color: #18181b;
    font-family: inherit;
    font-size: calc(15px * var(--xlc-fs-scale, 1));
}

#xabcd-lc-root .xlc-kb-search-input::placeholder {
    color: #9ca3af;
}

#xabcd-lc-root .xlc-kb-search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

#xabcd-lc-root .xlc-kb-results {
    padding: 0;
}

/* Log-in prompt */
#xabcd-lc-root .xlc-kb-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px 0;
    text-align: center;
}

#xabcd-lc-root .xlc-kb-login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 0 14px;
    padding: 0;
    border-radius: 16px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--xlc-primary);
}

#xabcd-lc-root .xlc-kb-login-icon svg {
    width: 24px;
    height: 24px;
    padding: 0;
}

#xabcd-lc-root .xlc-kb-login-title {
    margin: 0 0 8px;
    font-size: calc(19px * var(--xlc-fs-scale, 1));
}

#xabcd-lc-root .xlc-kb-login-text {
    margin: 0 0 18px;
    padding: 0;
    font-size: calc(14px * var(--xlc-fs-scale, 1));
    line-height: 1.5;
    color: #6b7280;
}

#xabcd-lc-root .xlc-kb-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    margin: 0;
    padding: 11px 26px;
    border-radius: 12px;
    background: var(--xlc-primary);
    color: #fff;
    font-size: calc(15px * var(--xlc-fs-scale, 1));
    font-weight: 700;
    text-decoration: none;
    text-shadow: none;
    box-shadow: none;
}

#xabcd-lc-root .xlc-kb-login-btn:hover {
    color: #fff;
    filter: brightness(1.06);
}

/* ---- Quick help: dark theme ---- */
#xabcd-lc-root.xlc-dark .xlc-qh,
#xabcd-lc-root.xlc-dark .xlc-qh-search-wrap,
#xabcd-lc-root.xlc-dark .xlc-kb-helpful {
    border-top-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-qh-title,
#xabcd-lc-root.xlc-dark .xlc-kb-heading,
#xabcd-lc-root.xlc-dark .xlc-kb-title,
#xabcd-lc-root.xlc-dark .xlc-kb-login-title,
#xabcd-lc-root.xlc-dark .xlc-kb-cta-text,
#xabcd-lc-root.xlc-dark .xlc-kb-content h2,
#xabcd-lc-root.xlc-dark .xlc-kb-content h3,
#xabcd-lc-root.xlc-dark .xlc-kb-content h4,
#xabcd-lc-root.xlc-dark .xlc-kb-content h5,
#xabcd-lc-root.xlc-dark .xlc-kb-content h6,
#xabcd-lc-root.xlc-dark .xlc-kb-content strong,
#xabcd-lc-root.xlc-dark .xlc-kb-content b {
    color: #f4f4f5;
}

#xabcd-lc-root.xlc-dark .xlc-qh-sub,
#xabcd-lc-root.xlc-dark .xlc-qh-chevron,
#xabcd-lc-root.xlc-dark .xlc-kb-empty,
#xabcd-lc-root.xlc-dark .xlc-kb-status,
#xabcd-lc-root.xlc-dark .xlc-kb-item-excerpt,
#xabcd-lc-root.xlc-dark .xlc-kb-login-text {
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-qh-item,
#xabcd-lc-root.xlc-dark .xlc-kb-item {
    border-color: #2a2a3e;
    background: #1a1a2e;
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-qh-item:hover,
#xabcd-lc-root.xlc-dark .xlc-kb-item:hover {
    border-color: #4a3a6e;
    background: #222238;
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-qh-icon {
    background: var(--xlc-qh-tint-dark, rgba(124, 58, 237, 0.22));
    color: var(--xlc-qh-color, #7c3aed);
    color: color-mix(in srgb, var(--xlc-qh-color, #7c3aed) 65%, #fff);
}

#xabcd-lc-root.xlc-dark .xlc-qh-search {
    border-color: #2a2a3e;
    background: #1a1a2e;
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-qh-search:hover {
    border-color: #4a3a6e;
    background: #222238;
    color: #d1d5db;
}

#xabcd-lc-root.xlc-dark .xlc-qh-search-icon {
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-kb {
    background: #12121e;
    color: #d1d5db;
}

#xabcd-lc-root.xlc-dark .xlc-kb-content {
    color: #d1d5db;
}

#xabcd-lc-root.xlc-dark .xlc-kb-content code,
#xabcd-lc-root.xlc-dark .xlc-kb-content pre {
    background: #222238;
}

#xabcd-lc-root.xlc-dark .xlc-kb-content blockquote,
#xabcd-lc-root.xlc-dark .xlc-kb-content th,
#xabcd-lc-root.xlc-dark .xlc-kb-content td,
#xabcd-lc-root.xlc-dark .xlc-kb-content hr {
    border-color: #2a2a3e;
}

#xabcd-lc-root.xlc-dark .xlc-kb-content a,
#xabcd-lc-root.xlc-dark .xlc-kb-crumb,
#xabcd-lc-root.xlc-dark .xlc-kb-open {
    color: var(--xlc-primary-light);
}

#xabcd-lc-root.xlc-dark .xlc-kb-helpful {
    color: #d1d5db;
}

#xabcd-lc-root.xlc-dark .xlc-kb-vote {
    border-color: #2a2a3e;
    background: #1a1a2e;
    color: #d1d5db;
}

#xabcd-lc-root.xlc-dark .xlc-kb-vote:hover {
    border-color: var(--xlc-primary);
    background: #1a1a2e;
    color: var(--xlc-primary-light);
}

#xabcd-lc-root.xlc-dark .xlc-kb-cta {
    border-color: #2a2a3e;
    background: #1a1a2e;
}

#xabcd-lc-root.xlc-dark .xlc-kb-search-box {
    border-color: #2a2a3e;
    background: #1a1a2e;
    color: #9ca3af;
}

#xabcd-lc-root.xlc-dark .xlc-kb-search-input {
    color: #e4e4e7;
}

#xabcd-lc-root.xlc-dark .xlc-kb-search-input::placeholder {
    color: #6b6b80;
}

#xabcd-lc-root.xlc-dark .xlc-kb-spinner {
    border-color: #2a2a3e;
    border-top-color: var(--xlc-primary);
}

#xabcd-lc-root.xlc-dark .xlc-kb-login-icon {
    background: rgba(124, 58, 237, 0.18);
    color: var(--xlc-primary-light);
}

/* ---- Quick help: phones ---- */
@media (max-width: 480px) {
    #xabcd-lc-root .xlc-home-scroll {
        padding: 24px 20px 0;
    }

    #xabcd-lc-root .xlc-history {
        padding: 20px 20px 18px;
    }

    /* The chat button's title fits one line on a 320px phone. */
    #xabcd-lc-root .xlc-start-chat-btn {
        gap: 12px;
        padding: 12px 14px !important;
    }

    #xabcd-lc-root .xlc-start-chat-title {
        font-size: calc(16px * var(--xlc-fs-scale, 1)) !important;
    }

    #xabcd-lc-root .xlc-start-chat-subtitle {
        font-size: calc(12px * var(--xlc-fs-scale, 1)) !important;
    }

    /* Narrow header: a little less space between its parts leaves the
       status line room beside the history, A- and A+ pills. */
    #xabcd-lc-root .xlc-header {
        gap: 6px;
    }

    #xabcd-lc-root .xlc-header-info {
        gap: 8px;
    }

    #xabcd-lc-root .xlc-qh-search-wrap {
        padding: 12px 20px 14px;
    }

    #xabcd-lc-root .xlc-kb {
        padding: 18px 20px 22px;
    }

    /* 16px or iOS Safari zooms the page when the box is focused. */
    #xabcd-lc-root .xlc-kb-search-input {
        font-size: max(16px, calc(16px * var(--xlc-fs-scale, 1)));
    }
}
