.site-chat {
    --chat-text: #f5f7ff;
    --chat-muted: rgba(217, 224, 241, 0.72);
    --chat-line: rgba(143, 174, 220, 0.16);
    --chat-panel-bg:
        linear-gradient(180deg, rgba(11, 18, 34, 0.82), rgba(7, 12, 24, 0.88)),
        radial-gradient(circle at top right, rgba(96, 170, 227, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(121, 224, 205, 0.08), transparent 26%);
    --chat-field-bg: linear-gradient(180deg, rgba(14, 22, 40, 0.9), rgba(9, 15, 28, 0.92));
    --chat-bubble: rgba(255, 255, 255, 0.04);
    --chat-bubble-border: rgba(255, 255, 255, 0.08);
    --chat-shadow: 0 30px 90px rgba(3, 8, 21, 0.34);
    position: fixed;
    right: clamp(16px, 2.8vw, 32px);
    bottom: clamp(16px, 2.8vw, 32px);
    z-index: 1200;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0;
}

.site-chat__panel[hidden],
.site-chat__notice[hidden],
.site-chat__launcher-dot[hidden],
.site-chat__composer[hidden],
.site-chat__gate[hidden] {
    display: none !important;
}

.body--has-chat .scroll-top {
    bottom: 116px;
}

.body--has-chat.site-chat-open .scroll-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    pointer-events: none;
}

.header-drop-menu .site-chat {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.site-chat__launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 14px 18px 14px 14px;
    border: 1px solid rgba(205, 220, 255, 0.14);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(41, 36, 54, 0.74), rgba(28, 24, 39, 0.68)),
        linear-gradient(135deg, rgba(20, 28, 45, 0.48), rgba(13, 18, 32, 0.5));
    color: var(--chat-text);
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 44px rgba(5, 10, 23, 0.2);
    backdrop-filter: blur(18px) saturate(138%);
    -webkit-backdrop-filter: blur(18px) saturate(138%);
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, border-color 220ms ease;
}

.site-chat__launcher::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
    pointer-events: none;
}

.site-chat__launcher:hover,
.site-chat__launcher:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(205, 221, 255, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 20px 50px rgba(5, 10, 23, 0.24);
}

.site-chat--open .site-chat__launcher {
    opacity: 0;
    pointer-events: none;
    transform: none;
    height: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.site-chat__launcher-main {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.site-chat__launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(61, 71, 94, 0.34), rgba(34, 39, 58, 0.28));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-chat__launcher-icon-svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: rgba(243, 247, 255, 0.9);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-chat__launcher-copy {
    position: relative;
    z-index: 1;
    text-align: left;
}

.site-chat__launcher-title {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.site-chat__launcher-arrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: rgba(243, 247, 255, 0.76);
}

.site-chat__launcher-arrow-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-chat__launcher-dot {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff8b82;
    box-shadow: 0 0 0 5px rgba(255, 139, 130, 0.12);
}

.site-chat__panel {
    position: relative;
    width: min(418px, calc(100vw - 24px));
    min-height: 620px;
    max-height: min(84vh, 760px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid rgba(136, 173, 219, 0.16);
    border-radius: 34px;
    background: var(--chat-panel-bg);
    color: var(--chat-text);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, 18px, 0) scale(0.968);
    transform-origin: bottom right;
    transition:
        opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 260ms;
    box-shadow: var(--chat-shadow);
    backdrop-filter: blur(26px) saturate(152%);
    -webkit-backdrop-filter: blur(26px) saturate(152%);
    will-change: opacity, transform;
}

.site-chat__panel--dragover {
    outline: 2px dashed rgba(20, 184, 166, 0.5);
    outline-offset: -6px;
}

.site-chat--open .site-chat__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    transition:
        opacity 240ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0s;
}

.site-chat__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%),
        radial-gradient(circle at 82% 8%, rgba(89, 167, 244, 0.16), transparent 30%),
        radial-gradient(circle at 0% 100%, rgba(125, 227, 203, 0.1), transparent 24%),
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: auto, auto, auto, 30px 30px, 30px 30px;
    opacity: 0.18;
    pointer-events: none;
}

.site-chat__panel::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background:
        linear-gradient(135deg, rgba(220, 240, 255, 0.24), rgba(132, 172, 219, 0.08) 38%, rgba(91, 168, 245, 0.18) 70%, rgba(255, 255, 255, 0.03)),
        radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.22), transparent 36%),
        radial-gradient(circle at 100% 100%, rgba(91, 168, 245, 0.16), transparent 40%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.92;
    pointer-events: none;
}

.site-chat__panel-glow {
    position: absolute;
    top: -96px;
    right: -46px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 227, 203, 0.16), transparent 72%);
    filter: blur(24px);
    pointer-events: none;
}

.site-chat__header,
.site-chat__notice,
.site-chat__gate,
.site-chat__messages,
.site-chat__composer {
    position: relative;
    z-index: 1;
}

.site-chat__header {
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 26px 22px 32px;
    border-bottom: none;
    border-radius: 32px 32px 0 0;
    background:
        radial-gradient(ellipse 140% 90% at 0% -20%, rgba(79, 70, 229, 0.6), transparent 55%),
        radial-gradient(ellipse 80% 100% at 110% 10%, rgba(14, 165, 233, 0.45), transparent 50%),
        radial-gradient(ellipse 90% 70% at 50% 120%, rgba(217, 70, 239, 0.3), transparent 50%),
        #0f172a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 12px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.site-chat__header::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse 50% 80% at 0% 20%, rgba(255, 255, 255, 0.14), transparent 70%),
        radial-gradient(ellipse 120% 40% at 50% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
        radial-gradient(ellipse 60% 30% at 30% 10%, rgba(255, 255, 255, 0.1), transparent 60%),
        repeating-conic-gradient(rgba(255, 255, 255, 0.02) 0% 25%, transparent 0% 50%) 0 0 / 24px 24px;
    pointer-events: none;
    opacity: 0.7;
}

.site-chat__header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5) 15%, rgba(6, 182, 212, 0.6) 50%, rgba(217, 70, 239, 0.5) 85%, transparent);
    pointer-events: none;
}

.site-chat__header-copy {
    display: grid;
    gap: 6px;
}

.site-chat__title {
    margin: 0;
    font-size: 28px;
    line-height: 0.98;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #34d399 0%, #38bdf8 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.4));
}

@keyframes chat-title-shine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.site-chat__subtitle {
    margin: 0;
    max-width: 320px;
    color: rgba(226, 232, 255, 0.78);
    font-size: 13px;
    line-height: 1.45;
}

.site-chat__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--chat-text);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
    flex-shrink: 0;
}

.site-chat__close:hover,
.site-chat__close:focus-visible {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.site-chat__notice {
    margin: 14px 20px 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 139, 130, 0.14);
    background: rgba(255, 139, 130, 0.08);
    color: #ffd7d2;
    font-size: 13px;
    line-height: 1.5;
}

.site-chat__gate {
    padding: 18px 20px 0;
}

.site-chat__gate-card {
    padding: 18px;
    border: 1px solid rgba(142, 170, 212, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.034);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-chat__gate-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.site-chat__gate-text,
.site-chat__gate-note {
    margin: 0;
    color: var(--chat-muted);
    font-size: 13px;
    line-height: 1.55;
}

.site-chat__gate-text {
    margin-top: 10px;
}

.site-chat__gate-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 16px;
}

.site-chat__gate-field {
    display: flex;
}

.site-chat__gate-field input {
    width: 100%;
    border: 2px solid rgba(122, 167, 200, 0.34);
    background: var(--chat-field-bg);
    color: var(--chat-text);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.018);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-chat__gate-field input {
    height: 52px;
    padding: 0 16px;
    border-radius: 18px;
}

.site-chat__gate-field input::placeholder {
    color: rgba(214, 223, 244, 0.38);
}

.site-chat__gate-field input:focus {
    outline: none;
    border-color: rgba(139, 225, 206, 0.46);
    box-shadow:
        0 0 0 4px rgba(83, 138, 228, 0.08),
        0 12px 30px rgba(7, 20, 44, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.site-chat__gate-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 52px;
    padding: 0 18px;
    border: none;
    border-radius: 18px;
    background:
        radial-gradient(60% 80% at 85% 20%, #4a90e8 0%, transparent 100%),
        radial-gradient(95.6% 92.05% at 17.92% 13.75%, #93cdf5 0%, #0b57db 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    box-shadow:
        0 4px 24px 0 rgba(6, 62, 160, 0.12),
        0 4px 20px 0 rgba(6, 62, 160, 0.4);
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.site-chat__gate-submit:hover,
.site-chat__gate-submit:focus-visible,
.site-chat__send:hover,
.site-chat__send:focus-visible {
    transform: translateY(-1px);
}

.site-chat__gate-note {
    margin-top: 12px;
}

.site-chat__messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 20px 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.site-chat__messages::-webkit-scrollbar {
    width: 6px;
}

.site-chat__messages::-webkit-scrollbar-track {
    background: transparent;
}

.site-chat__messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.site-chat__messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

.site-chat__welcome {
    display: flex;
}

.site-chat__welcome-badge {
    display: inline-flex;
    max-width: 300px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(141, 228, 207, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--chat-muted);
    font-size: 13px;
    line-height: 1.5;
}

.site-chat__bubble {
    position: relative;
    max-width: min(78%, 300px);
    padding: 14px 16px 12px;
    border: 1px solid var(--chat-bubble-border);
    border-radius: 22px;
    background: var(--chat-bubble);
    color: rgba(243, 247, 255, 0.92);
    line-height: 1.55;
    font-size: 15px;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 30px rgba(4, 10, 24, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-chat__bubble--visitor {
    align-self: flex-end;
    border-bottom-right-radius: 12px;
    color: #f8fbff;
    background:
        radial-gradient(circle at 18% 18%, rgba(154, 201, 255, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(56, 102, 196, 0.7), rgba(35, 73, 154, 0.78));
    border-color: rgba(128, 181, 255, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 14px 32px rgba(19, 48, 112, 0.2);
}

.site-chat__bubble--operator,
.site-chat__bubble--system {
    align-self: flex-start;
    border-bottom-left-radius: 12px;
}

.site-chat__bubble--operator {
    background:
        radial-gradient(circle at 14% 20%, rgba(20, 184, 166, 0.18), transparent 40%),
        linear-gradient(135deg, rgba(13, 42, 48, 0.92), rgba(15, 30, 42, 0.95));
    border-color: rgba(20, 184, 166, 0.3);
    color: #f0fdfa;
    box-shadow:
        inset 0 1px 0 rgba(20, 184, 166, 0.12),
        0 12px 30px rgba(4, 10, 24, 0.14);
}

.site-chat__bubble--system {
    background: linear-gradient(180deg, rgba(26, 34, 48, 0.74), rgba(20, 28, 40, 0.8));
    border-color: rgba(159, 183, 214, 0.12);
    color: rgba(214, 223, 244, 0.78);
}

.site-chat__media {
    display: block;
    max-width: 100%;
    max-height: 240px;
    border-radius: 14px;
    margin-bottom: 8px;
    object-fit: cover;
}

.site-chat__meta {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: rgba(214, 223, 244, 0.56);
}

.site-chat__bubble--visitor .site-chat__meta {
    color: rgba(236, 243, 255, 0.72);
}

.site-chat__bubble--operator .site-chat__meta {
    color: rgba(153, 246, 228, 0.6);
}

.site-chat__sender {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.site-chat__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.site-chat__avatar--initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(99, 102, 241, 0.3));
    border: 1px solid rgba(20, 184, 166, 0.25);
    color: rgba(153, 246, 228, 0.9);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.site-chat__sender-name {
    font-size: 11px;
    font-weight: 600;
    color: rgba(153, 246, 228, 0.72);
    letter-spacing: 0.01em;
}

.site-chat__sender-name--you {
    color: rgba(180, 205, 255, 0.72);
}

.site-chat__bubble--enter {
    animation: site-chat-bubble-in 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes site-chat-bubble-in {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.site-chat__offline-notice {
    position: relative;
    z-index: 1;
    padding: 16px 20px;
    border-top: 1px solid var(--chat-line);
    background: linear-gradient(180deg, rgba(14, 22, 40, 0.9), rgba(9, 15, 28, 0.92));
    color: rgba(153, 246, 228, 0.78);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.site-chat__offline-notice[hidden] {
    display: none !important;
}

.site-chat__composer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border-top: 1px solid var(--chat-line);
    background: var(--chat-field-bg);
    transition: box-shadow 180ms ease;
}

.site-chat__composer:focus-within {
    box-shadow: inset 0 1px 0 rgba(139, 225, 206, 0.12);
}

.site-chat__composer-wrap {
    position: relative;
    display: flex;
    align-items: flex-end;
    border: none;
    border-radius: 0;
    background: transparent;
}

.site-chat__composer textarea {
    flex: 1;
    min-height: 72px;
    max-height: 120px;
    padding: 18px 0 18px 20px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--chat-text);
    resize: none;
    overflow-y: auto;
    line-height: 1.42;
    box-shadow: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.site-chat__composer textarea::-webkit-scrollbar {
    width: 5px;
}

.site-chat__composer textarea::-webkit-scrollbar-track {
    background: transparent;
}

.site-chat__composer textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.site-chat__composer textarea:focus {
    outline: none;
    box-shadow: none;
}

.site-chat__composer textarea::placeholder {
    color: rgba(214, 223, 244, 0.38);
}

.site-chat__composer-actions {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 8px 12px 8px 4px;
    flex-shrink: 0;
}

.site-chat__attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    color: rgba(214, 223, 244, 0.5);
    transition: color 180ms ease, background 180ms ease;
}

.site-chat__attach:hover {
    color: rgba(214, 223, 244, 0.82);
    background: rgba(255, 255, 255, 0.06);
}

.site-chat__attach--disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

.site-chat__attach-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-chat__send {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(83, 126, 228, 0.96), rgba(52, 100, 220, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(40, 90, 222, 0.24);
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.site-chat__send:disabled {
    opacity: 0.58;
    transform: none;
}

.site-chat__send-icon {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    fill: #fff;
    margin-left: 2px;
}

.site-chat__upload-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
}

.site-chat__upload-status[hidden] {
    display: none !important;
}

.site-chat__upload-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.site-chat__upload-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, #4a90e8, #7de3cb);
    transition: width 200ms ease;
}

.site-chat__upload-text {
    font-size: 11px;
    color: var(--chat-muted);
    white-space: nowrap;
}

@media (max-width: 767px) {
    .site-chat {
        right: 12px;
        left: auto;
        bottom: 88px;
        align-items: flex-end;
    }

    .site-chat--open {
        right: 0;
        left: 0;
        bottom: 0;
        z-index: 9999999;
    }

    body.site-chat-open .header {
        z-index: 0 !important;
    }

    .site-chat__launcher {
        align-self: flex-end;
        min-width: 0;
        width: auto;
        padding: 10px 16px 10px 12px;
        gap: 10px;
    }

    .body--has-chat .scroll-top {
        right: auto;
        left: 12px;
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    .site-chat__launcher-main {
        gap: 10px;
    }

    .site-chat__launcher-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 12px;
    }

    .site-chat__launcher-icon-svg {
        width: 20px;
        height: 20px;
    }

    .site-chat__launcher-title {
        font-size: 15px;
    }

    .site-chat__panel {
        width: 100%;
        min-height: 0;
        max-height: calc(100dvh - 60px);
        height: calc(100dvh - 60px);
        border-radius: 32px 32px 0 0;
    }

    .site-chat__header {
        border-radius: 32px 32px 0 0;
    }

    .site-chat__header::after {
        display: none;
    }

    .site-chat__header,
    .site-chat__gate,
    .site-chat__messages,
    .site-chat__composer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .site-chat__title {
        font-size: 24px;
    }

    .site-chat__subtitle {
        max-width: 280px;
    }

    .site-chat__gate-form {
        grid-template-columns: 1fr;
    }

    .site-chat__gate-submit {
        width: 100%;
    }

    .site-chat__bubble {
        max-width: 88%;
    }

    .site-chat__composer textarea {
        padding: 12px 0 12px 16px;
    }
}

html[dir="rtl"] .site-chat {
    right: auto;
    left: clamp(16px, 2.8vw, 32px);
    align-items: flex-start;
}

html[dir="rtl"] .site-chat__panel {
    transform-origin: bottom left;
}

html[dir="rtl"] .site-chat__launcher-copy,
html[dir="rtl"] .site-chat__header-copy {
    text-align: right;
}

html[dir="rtl"] .site-chat__launcher-dot {
    right: auto;
    left: 18px;
}


.cookie_popup.cookie-show + .site-chat {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

@media (max-width: 920px) {
    .site-chat {
        right: 16px;
        left: auto;
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        align-items: flex-end;
    }

    /* When chat is open, re-anchor container to screen edges */
    .site-chat--open {
        right: 0;
        left: 0;
        bottom: 0;
        z-index: 9999999;
        align-items: stretch;
    }

    .site-chat__launcher {
        width: auto;
        min-width: 0;
        padding: 10px 16px 10px 10px;
        gap: 10px;
        border-radius: 999px;
    }

    .site-chat__launcher-arrow {
        display: none;
    }

    .site-chat__launcher-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
    }

    .site-chat__launcher-title {
        font-size: 16px;
    }

    .site-chat__launcher-dot {
        top: 8px;
        right: 8px;
    }

    .body--has-chat .scroll-top {
        right: auto;
        left: 16px;
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    .site-chat__panel {
        width: 100%;
        min-height: 0;
        max-height: calc(100dvh - 60px);
        height: calc(100dvh - 60px);
        border-radius: 32px 32px 0 0;
        transform-origin: bottom center;
        transform: translate3d(0, 100%, 0);
    }

    .site-chat--open .site-chat__panel {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@media (max-width: 450px) {
    .site-chat__launcher {
        width: auto;
        min-width: 0;
        height: auto;
        padding: 9px 14px 9px 9px;
        border-radius: 999px;
    }

    .site-chat__launcher-title {
        font-size: 15px;
    }

    .site-chat__panel {
        width: 100%;
        max-height: calc(100dvh - 60px);
        height: calc(100dvh - 60px);
        border-radius: 32px 32px 0 0;
    }

    .site-chat__header,
    .site-chat__gate,
    .site-chat__messages,
    .site-chat__composer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

