/* support-chat widget — self-contained, prefix sc-chat */
.sc-chat .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sc-chat {
    --sc-teal: #1a3f73;
    --sc-teal-bright: #3d6fb5;
    --sc-teal-deep: #122c52;
    --sc-teal-dark: #0c1f3d;
    --sc-teal-ink: #08162c;
    --sc-mint: #eaf1f8;
    --sc-paper: #ffffff;
    --sc-mist: #f2f5f9;
    --sc-line: #d0dbe8;
    --sc-ink: #122033;
    --sc-ink-soft: #5a6b7d;
    --sc-coral: #f0627a;
    --sc-gold: #f0b429;
    --sc-radius-pill: 999px;
    --sc-font: system-ui, -apple-system, "Segoe UI", sans-serif;

    --sc-chat-panel-w: min(24.5rem, calc(100vw - 1.5rem));
    --sc-chat-panel-h: min(34rem, calc(100dvh - 6.5rem));
    --sc-chat-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Ccircle cx='6' cy='10' r='1.25' fill='%231a3f73' fill-opacity='0.09'/%3E%3Ccircle cx='28' cy='22' r='1' fill='%233d6fb5' fill-opacity='0.08'/%3E%3Ccircle cx='40' cy='8' r='1.1' fill='%23f0627a' fill-opacity='0.07'/%3E%3Ccircle cx='16' cy='36' r='1' fill='%231a3f73' fill-opacity='0.07'/%3E%3Ccircle cx='38' cy='38' r='1.2' fill='%233d6fb5' fill-opacity='0.08'/%3E%3C/svg%3E");
    position: fixed;
    inset-inline-end: 1.1rem;
    bottom: 1.1rem;
    z-index: 80;
    font-family: var(--sc-font);
}

.sc-chat__dock {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.sc-chat__beckon {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: min(16rem, calc(100vw - 2rem));
    padding: 0.55rem 0.95rem;
    border: 1px solid color-mix(in srgb, #ff8a9a 55%, white);
    border-radius: 999px;
    background:
        linear-gradient(135deg, #ff6b81 0%, #f0627a 42%, #e94e6d 100%);
    color: #fff;
    box-shadow:
        0 16px 32px -14px rgb(233 78 109 / 0.65),
        inset 0 1px 0 rgb(255 255 255 / 0.35);
    font-size: 0.88rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    line-height: 1.2;
    animation: sc-chat-beckon 2.4s ease-in-out infinite;
    transform-origin: center bottom;
}

html[dir='rtl'] .sc-chat__beckon {
    transform-origin: center bottom;
}

.sc-chat.is-open .sc-chat__beckon {
    display: none;
}

.sc-chat__beckon-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 0 rgb(255 255 255 / 0.7);
    animation: sc-chat-pulse-light 1.6s ease-out infinite;
    flex-shrink: 0;
}

.sc-chat__beckon-text {
    min-width: 0;
}

.sc-chat__beckon-tail {
    position: absolute;
    inset-inline-start: 50%;
    bottom: -0.32rem;
    width: 0.7rem;
    height: 0.7rem;
    margin-inline-start: -0.35rem;
    background: #e94e6d;
    transform: rotate(45deg);
    box-shadow: 2px 2px 0 0 color-mix(in srgb, #ff8a9a 40%, transparent);
}

.sc-chat__launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    max-width: min(100vw - 2rem, 18rem);
    padding: 0.5rem 0.95rem 0.5rem 0.5rem;
    border: 1px solid color-mix(in srgb, var(--sc-teal-bright) 35%, transparent);
    border-radius: var(--sc-radius-pill);
    background:
        linear-gradient(135deg, var(--sc-teal-dark) 0%, var(--sc-teal) 55%, var(--sc-teal-bright) 140%);
    color: #fff;
    box-shadow:
        0 18px 40px -18px rgb(8 22 44 / 0.55),
        inset 0 1px 0 rgb(255 255 255 / 0.18);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sc-chat__launcher:hover {
    transform: translateY(-2px);
    box-shadow:
        0 22px 44px -16px rgb(8 22 44 / 0.6),
        inset 0 1px 0 rgb(255 255 255 / 0.22);
}

.sc-chat__launcher:focus-visible {
    outline: 2px solid var(--sc-coral);
    outline-offset: 3px;
}

.sc-chat__launcher-glow {
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: radial-gradient(circle at 20% 20%, rgb(240 98 122 / 0.35), transparent 55%);
    opacity: 0.7;
    pointer-events: none;
    animation: sc-chat-glow 3.2s ease-in-out infinite;
}

.sc-chat__launcher-ping {
    position: absolute;
    inset-inline-start: 0.35rem;
    top: 0.35rem;
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 999px;
    border: 2px solid rgb(240 98 122 / 0.55);
    pointer-events: none;
    animation: sc-chat-ping 2s ease-out infinite;
}

.sc-chat.is-open .sc-chat__launcher-ping {
    display: none;
}

.sc-chat__badge {
    position: absolute;
    z-index: 2;
    inset-block-start: -0.3rem;
    inset-inline-end: 0.3rem;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--sc-coral);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 16px -6px rgb(240 98 122 / 0.7),
        0 0 0 2px var(--sc-paper);
    pointer-events: none;
}

.sc-chat__launcher-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.18);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
    flex-shrink: 0;
}

.sc-chat__launcher-icon svg {
    width: 1.7rem;
    height: 1.7rem;
}

.sc-chat__launcher-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.05rem;
    text-align: start;
    padding-inline-end: 0.2rem;
    min-width: 0;
}

.sc-chat__launcher-kicker {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.78;
    line-height: 1.2;
}

.sc-chat__launcher-label {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-chat__panel {
    position: absolute;
    inset-inline-end: 0;
    bottom: calc(100% + 0.75rem);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: var(--sc-chat-panel-w);
    height: var(--sc-chat-panel-h);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--sc-line) 80%, var(--sc-teal-bright));
    border-radius: 1.35rem;
    background:
        linear-gradient(180deg, rgb(255 255 255 / 0.92), var(--sc-paper) 28%),
        radial-gradient(120% 80% at 100% 0%, rgb(61 111 181 / 0.12), transparent 55%);
    box-shadow:
        0 28px 64px -28px rgb(8 22 44 / 0.55),
        0 0 0 1px rgb(255 255 255 / 0.4) inset;
    transform-origin: bottom right;
    animation: sc-chat-panel-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sc-chat__panel[hidden] {
    display: none !important;
    animation: none;
}

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

.sc-chat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    background:
        linear-gradient(120deg, var(--sc-teal-ink), var(--sc-teal-deep) 55%, var(--sc-teal) 120%);
    color: #fff;
}

.sc-chat__identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.sc-chat__avatar {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.9rem;
    background:
        linear-gradient(145deg, var(--sc-coral), color-mix(in srgb, var(--sc-coral) 40%, var(--sc-gold)));
    box-shadow: 0 8px 18px -10px rgb(240 98 122 / 0.8);
    flex-shrink: 0;
}

.sc-chat__avatar-mark {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
}

.sc-chat__meta {
    min-width: 0;
}

.sc-chat__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.sc-chat__status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    opacity: 0.86;
    line-height: 1.3;
}

.sc-chat__pulse {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #5ddea0;
    box-shadow: 0 0 0 0 rgb(93 222 160 / 0.7);
    animation: sc-chat-pulse 1.8s ease-out infinite;
    flex-shrink: 0;
}

.sc-chat__icon-btn {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sc-chat__icon-btn:hover {
    background: rgb(255 255 255 / 0.18);
}

.sc-chat__icon-btn svg {
    width: 1.05rem;
    height: 1.05rem;
}

.sc-chat__lead {
    display: grid;
    align-content: start;
    gap: 1rem;
    min-height: 0;
    overflow-y: auto;
    padding: 1.05rem 1rem 0.35rem;
    background:
        radial-gradient(ellipse 100% 70% at 100% -20%, rgb(61 111 181 / 0.18), transparent 60%),
        radial-gradient(ellipse 80% 55% at -10% 110%, rgb(240 98 122 / 0.1), transparent 55%),
        linear-gradient(160deg, #fbfcfe 0%, #f0f4fa 55%, #f7f9fc 100%);
}

.sc-chat__lead-intro {
    display: grid;
    gap: 0.35rem;
}

.sc-chat__lead-eyebrow {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sc-teal-bright);
}

.sc-chat__lead-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 750;
    line-height: 1.3;
    color: var(--sc-teal-ink);
}

.sc-chat__lead-text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--sc-ink-soft);
}

.sc-chat__lead-form {
    display: grid;
    gap: 0.7rem;
}

.sc-chat__lead-error {
    margin: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--sc-coral) 45%, var(--sc-line));
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--sc-coral) 12%, white);
    color: color-mix(in srgb, var(--sc-coral) 70%, #5a1020);
    font-size: 0.8rem;
    line-height: 1.4;
}

.sc-chat__field {
    display: grid;
    gap: 0.3rem;
}

.sc-chat__field-label {
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--sc-teal-deep);
}

.sc-chat__field-input {
    width: 100%;
    border: 1px solid var(--sc-line);
    border-radius: 0.85rem;
    background: var(--sc-paper);
    color: var(--sc-ink);
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.4;
    padding: 0.7rem 0.8rem;
}

.sc-chat__field-input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--sc-teal-bright) 70%, var(--sc-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-teal-bright) 18%, transparent);
}

.sc-chat__lead-submit {
    margin-top: 0.15rem;
    border: 0;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, var(--sc-teal), var(--sc-teal-deep));
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 14px 28px -18px rgb(18 44 82 / 0.7);
}

.sc-chat__lead-submit:hover {
    transform: translateY(-1px);
}

.sc-chat__conversation {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
}

.sc-chat__conversation[hidden],
.sc-chat__lead[hidden] {
    display: none !important;
}

.sc-chat__stage {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    isolation: isolate;
    background:
        radial-gradient(ellipse 90% 55% at 110% -5%, rgb(61 111 181 / 0.2), transparent 58%),
        radial-gradient(ellipse 75% 50% at -15% 105%, rgb(240 98 122 / 0.11), transparent 54%),
        radial-gradient(circle at 70% 40%, rgb(74 163 216 / 0.07), transparent 42%),
        var(--sc-chat-dots),
        linear-gradient(165deg, #fbfcfe 0%, #eef3f9 45%, #f6f8fc 100%);
    background-size: auto, auto, auto, 48px 48px, auto;
}

.sc-chat__stage::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgb(255 255 255 / 0.55), transparent 18%),
        linear-gradient(0deg, rgb(255 255 255 / 0.4), transparent 14%);
    z-index: 0;
}

.sc-chat__stage > * {
    position: relative;
    z-index: 1;
}

.sc-chat__thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 0.95rem 0.5rem;
    scroll-behavior: smooth;
}

.sc-chat__row {
    display: flex;
}

.sc-chat__row--agent {
    justify-content: flex-start;
}

.sc-chat__row--user {
    justify-content: flex-end;
}

.sc-chat__bubble {
    max-width: min(88%, 18.5rem);
    padding: 0.7rem 0.85rem 0.8rem;
    border-radius: 1rem;
    box-shadow: 0 10px 24px -18px rgb(8 22 44 / 0.35);
}

.sc-chat__bubble[data-role='agent'] {
    border: 1px solid var(--sc-line);
    border-inline-start: 3px solid var(--sc-teal-bright);
    border-start-start-radius: 0.35rem;
    background: var(--sc-paper);
    color: var(--sc-ink);
}

.sc-chat__bubble[data-role='user'] {
    border-start-end-radius: 0.35rem;
    background: linear-gradient(145deg, var(--sc-teal), var(--sc-teal-deep));
    color: #fff;
}

.sc-chat__who {
    margin: 0 0 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.7;
}

.sc-chat__text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.sc-chat__ticks {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.35rem;
    color: rgb(255 255 255 / 0.55);
}

.sc-chat__ticks.is-read {
    color: var(--sc-gold);
}

.sc-chat__ticks svg {
    width: 0.95rem;
    height: 0.7rem;
}

.sc-chat__ticks-two {
    margin-inline-start: -0.45rem;
    display: none;
}

.sc-chat__ticks.is-read .sc-chat__ticks-two {
    display: block;
}

.sc-chat__bubble--typing {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    padding-block: 0.65rem;
}

.sc-chat__dots {
    display: inline-flex;
    gap: 0.28rem;
}

.sc-chat__dots i {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 999px;
    background: var(--sc-teal-bright);
    opacity: 0.35;
    animation: sc-chat-dot 1.1s ease-in-out infinite;
}

.sc-chat__dots i:nth-child(2) { animation-delay: 0.15s; }
.sc-chat__dots i:nth-child(3) { animation-delay: 0.3s; }

.sc-chat__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.35rem 0.95rem 0.85rem;
}

.sc-chat__chip {
    border: 1px solid color-mix(in srgb, var(--sc-teal-bright) 40%, var(--sc-line));
    border-radius: var(--sc-radius-pill);
    background: var(--sc-paper);
    color: var(--sc-teal-deep);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sc-chat__chip:hover {
    background: var(--sc-mint);
    border-color: var(--sc-teal-bright);
    transform: translateY(-1px);
}

.sc-chat__composer {
    padding: 0.65rem 0.75rem 0.55rem;
    border-top: 1px solid var(--sc-line);
    background: var(--sc-paper);
}

.sc-chat__composer-shell {
    display: grid;
    gap: 0.35rem;
    padding: 0.7rem 0.75rem 0.55rem;
    border: 1px solid var(--sc-line);
    border-radius: 1.05rem;
    background: var(--fj-mist);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sc-chat__composer-shell:focus-within {
    border-color: color-mix(in srgb, var(--sc-teal-bright) 55%, var(--sc-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-teal-bright) 14%, transparent);
    background: #fff;
}

.sc-chat__input {
    width: 100%;
    min-height: 2.5rem;
    max-height: 7rem;
    resize: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--sc-ink);
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.45;
    padding: 0.15rem 0.15rem 0.25rem;
    field-sizing: content;
}

.sc-chat__input::placeholder {
    color: color-mix(in srgb, var(--sc-ink-soft) 82%, transparent);
}

.sc-chat__input:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.sc-chat__composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    min-height: 2rem;
}

.sc-chat__composer-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-inline-start: auto;
    flex-shrink: 0;
}

.sc-chat__attach {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--sc-ink-soft);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.sc-chat__attach:hover {
    color: var(--sc-ink);
    background: color-mix(in srgb, var(--sc-teal-bright) 10%, transparent);
}

.sc-chat__attach svg {
    width: 1.05rem;
    height: 1.05rem;
}

.sc-chat__send {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sc-teal) 88%, #0a1628);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.sc-chat__send:hover:not(:disabled) {
    background: var(--sc-teal-deep);
    transform: scale(1.04);
}

.sc-chat__send:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    background: color-mix(in srgb, var(--sc-ink-soft) 55%, var(--sc-line));
}

.sc-chat__send svg {
    width: 1rem;
    height: 1rem;
}

.sc-chat__file-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0;
    padding: 0.35rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid color-mix(in srgb, var(--sc-teal-bright) 22%, var(--sc-line));
    background: color-mix(in srgb, var(--sc-teal-bright) 8%, #fff);
    color: var(--sc-ink);
    font-size: 0.76rem;
    line-height: 1.3;
}

.sc-chat__file-chip[hidden] {
    display: none;
}

.sc-chat__file-clear {
    border: 0;
    background: transparent;
    color: var(--sc-ink-soft);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}

.sc-chat__attach-hint {
    margin: 0;
    min-width: 0;
    font-size: 0.68rem;
    line-height: 1.25;
    color: var(--sc-ink-soft);
    text-align: start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-chat__attachment {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.15rem;
    margin-block-start: 0.35rem;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.sc-chat__attachment-size {
    font-weight: 500;
    opacity: 0.75;
    text-decoration: none;
}

.sc-chat__bubble-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sc-chat__reply-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.55;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.15s ease;
}

.sc-chat__bubble:hover .sc-chat__reply-btn,
.sc-chat__bubble:focus-within .sc-chat__reply-btn {
    opacity: 0.9;
}

@media (hover: none) {
    .sc-chat__reply-btn {
        opacity: 0.75;
    }
}

.sc-chat__reply-btn:hover {
    opacity: 1 !important;
    text-decoration: underline;
}

.sc-chat__quote {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    margin: 0.2rem 0 0.45rem;
    padding: 0.4rem 0.55rem;
    border: 0;
    border-inline-start: 3px solid currentColor;
    border-radius: 0.45rem;
    background: rgb(0 0 0 / 0.06);
    color: inherit;
    text-align: start;
    cursor: default;
}

.sc-chat__bubble[data-role='agent'] .sc-chat__quote {
    background: rgb(255 255 255 / 0.14);
}

.sc-chat__quote-who {
    font-size: 0.68rem;
    font-weight: 700;
    opacity: 0.8;
}

.sc-chat__quote-text {
    font-size: 0.78rem;
    line-height: 1.35;
    opacity: 0.9;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sc-chat__file-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    margin-block-start: 0.45rem;
    padding: 0.45rem;
    border-radius: 0.7rem;
    background: rgb(0 0 0 / 0.06);
}

.sc-chat__bubble[data-role='agent'] .sc-chat__file-card {
    background: rgb(255 255 255 / 0.14);
}

.sc-chat__file-thumb {
    width: 3.25rem;
    height: 3.25rem;
    max-width: 3.25rem;
    max-height: 3.25rem;
    object-fit: cover;
    border-radius: 0.45rem;
    display: block;
    flex-shrink: 0;
}

.sc-chat__file-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 0.45rem;
    background: rgb(0 0 0 / 0.06);
    font-size: 1.1rem;
}

.sc-chat__file-meta {
    min-width: 0;
}

.sc-chat__file-name {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-chat__file-size {
    margin: 0.1rem 0 0;
    font-size: 0.68rem;
    opacity: 0.75;
}

.sc-chat__file-download {
    font-size: 0.68rem;
    font-weight: 700;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
    white-space: nowrap;
}

.sc-chat__reply-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem 0;
    background: var(--sc-paper);
    border-block-start: 1px solid color-mix(in srgb, var(--sc-line) 70%, transparent);
}

.sc-chat__reply-bar[hidden] {
    display: none;
}

.sc-chat__reply-bar-body {
    min-width: 0;
    flex: 1;
    padding-inline-start: 0.55rem;
    border-inline-start: 3px solid var(--sc-teal, #0d9488);
}

.sc-chat__reply-bar-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--sc-ink);
}

.sc-chat__reply-bar-snippet {
    margin: 0.1rem 0 0;
    font-size: 0.75rem;
    color: var(--sc-ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-chat__reply-bar-clear {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--sc-ink-soft);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
}

.sc-chat__row.is-swiping .sc-chat__bubble {
    will-change: transform;
}

.sc-chat__row {
    position: relative;
}

.sc-chat__compose-error {
    margin: 0;
    padding: 0.35rem 0.9rem 0;
    font-size: 0.78rem;
    color: #b42318;
    background: var(--sc-paper);
}

.sc-chat__compose-error[hidden] {
    display: none;
}

.sc-chat__note {
    margin: 0;
    padding: 0 0.95rem 0.7rem;
    font-size: 0.68rem;
    color: var(--sc-ink-soft);
    text-align: center;
    background: var(--sc-paper);
}

@keyframes sc-chat-panel-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sc-chat-pulse {
    0% { box-shadow: 0 0 0 0 rgb(93 222 160 / 0.55); }
    70% { box-shadow: 0 0 0 8px rgb(93 222 160 / 0); }
    100% { box-shadow: 0 0 0 0 rgb(93 222 160 / 0); }
}

@keyframes sc-chat-pulse-light {
    0% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0.7); }
    70% { box-shadow: 0 0 0 8px rgb(255 255 255 / 0); }
    100% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0); }
}

@keyframes sc-chat-glow {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.85; }
}

@keyframes sc-chat-dot {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

@keyframes sc-chat-beckon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes sc-chat-ping {
    0% { transform: scale(0.92); opacity: 0.7; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

@media (max-width: 520px) {
    .sc-chat {
        inset-inline-end: 0.75rem;
        bottom: 0.75rem;
    }

    .sc-chat__launcher-copy {
        display: none;
    }

    .sc-chat__launcher {
        padding: 0.4rem;
    }

    .sc-chat__beckon {
        max-width: 9rem;
        font-size: 0.82rem;
        padding: 0.5rem 0.8rem;
    }

    .sc-chat__panel {
        position: fixed;
        inset-inline: 0.75rem;
        bottom: 5.2rem;
        width: auto;
        height: min(70dvh, 34rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sc-chat__launcher-glow,
    .sc-chat__launcher-ping,
    .sc-chat__beckon,
    .sc-chat__beckon-dot,
    .sc-chat__pulse,
    .sc-chat__dots i,
    .sc-chat__panel {
        animation: none;
    }
}
