﻿:root {
    --txpcr-accent: #005CB9;
    --txpcr-accent-hover: #004A96;
    --txpcr-accent-soft: #E9F2FC;
    --txpcr-accent-ink: #FFFFFF;
    --txpcr-ink: #15202B;
    --txpcr-muted: #5F6C7B;
    --txpcr-surface: #FFFFFF;
    --txpcr-canvas: #FFFFFF;
    --txpcr-bot-bubble: #F0F3F7;
    --txpcr-line: #E3E8EE;
    --txpcr-warn-ink: #6B4500;
    --txpcr-warn-bg: #FFF4DB;
    --txpcr-radius: 18px;
    --txpcr-font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --txpcr-head-font: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --txpcr-font-size: 15px;
    --txpcr-shadow: 0 24px 60px rgba(16, 38, 64, .22), 0 4px 14px rgba(16, 38, 64, .10);
    --txpcr-panel-w: 392px;
    --txpcr-panel-h: 680px;
    --txpcr-edge: 24px;
    --txpcr-launch: 56px;
    --txpcr-lift: 0px;
}

.txpcr, .txpcr *, .txpcr *::before, .txpcr *::after {
    box-sizing: border-box;
}

.txpcr {
    color-scheme: light;
    font-family: var(--txpcr-font);
    -webkit-font-smoothing: antialiased;
}

    .txpcr [hidden] {
        display: none !important;
    }

    .txpcr button, .txpcr textarea {
        margin: 0;
        font-family: inherit;
    }

.txpcr-launcher {
    position: fixed;
    right: var(--txpcr-edge);
    bottom: calc(var(--txpcr-edge) + var(--txpcr-lift) + env(safe-area-inset-bottom, 0px));
    z-index: 2147483000;
    min-width: var(--txpcr-launch);
    height: var(--txpcr-launch);
    padding: 0 22px 0 16px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--txpcr-accent);
    color: var(--txpcr-accent-ink);
    font: 600 16px/1 var(--txpcr-font);
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0, 92, 185, .34), 0 2px 6px rgba(16, 38, 64, .16);
    transition: background-color .15s ease, transform .18s ease, box-shadow .18s ease, bottom .2s ease;
    -webkit-tap-highlight-color: transparent;
}

    .txpcr-launcher:hover {
        background: var(--txpcr-accent-hover);
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(0, 92, 185, .38), 0 3px 8px rgba(16, 38, 64, .16);
    }

    .txpcr-launcher:active {
        transform: scale(.97);
    }

.txpcr-launcher__icon {
    display: grid;
    place-items: center;
}

    .txpcr-launcher__icon svg {
        grid-area: 1 / 1;
        width: 26px;
        height: 26px;
        transition: opacity .18s ease, transform .22s ease;
    }

.txpcr-launcher__close {
    opacity: 0;
    transform: rotate(-90deg) scale(.6);
}

.txpcr.is-open .txpcr-launcher, .txpcr.is-human-open .txpcr-launcher {
    padding: 0;
    width: var(--txpcr-launch);
}

.txpcr.is-open .txpcr-launcher__label, .txpcr.is-human-open .txpcr-launcher__label {
    display: none;
}

.txpcr.is-open .txpcr-launcher__chat, .txpcr.is-human-open .txpcr-launcher__chat {
    opacity: 0;
    transform: rotate(90deg) scale(.6);
}

.txpcr.is-open .txpcr-launcher__close, .txpcr.is-human-open .txpcr-launcher__close {
    opacity: 1;
    transform: none;
}

html.txpcr-nice #be-frame.be-frame-minimized, html.txpcr-nice #be-frame.be-frame-minimized > iframe {
    visibility: hidden !important;
    pointer-events: none !important;
}

.txpcr-launcher__dot {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #E5484D;
    border: 2.5px solid #fff;
}

.txpcr-panel {
    position: fixed;
    right: var(--txpcr-edge);
    bottom: calc(var(--txpcr-edge) + var(--txpcr-lift) + var(--txpcr-launch) + 14px + env(safe-area-inset-bottom, 0px));
    z-index: 2147483001;
    width: var(--txpcr-panel-w);
    height: min(var(--txpcr-panel-h), calc(100vh - var(--txpcr-edge) - var(--txpcr-lift) - var(--txpcr-launch) - 40px));
    height: min(var(--txpcr-panel-h), calc(100dvh - var(--txpcr-edge) - var(--txpcr-lift) - var(--txpcr-launch) - 40px));
    min-height: 360px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--txpcr-surface);
    color: var(--txpcr-ink);
    border: 1px solid rgba(16, 38, 64, .07);
    border-radius: 20px;
    box-shadow: var(--txpcr-shadow);
    font-size: var(--txpcr-font-size);
    transform-origin: bottom right;
    animation: txpcr-open .24s cubic-bezier(.2, .8, .2, 1);
}

@keyframes txpcr-open {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.96);
    }
}

.txpcr-header {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 10px 14px 16px;
    background: var(--txpcr-surface);
    border-bottom: 1px solid var(--txpcr-line);
}

.txpcr-avatar {
    position: relative;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--txpcr-accent);
    color: var(--txpcr-accent-ink);
}

    .txpcr-avatar svg {
        width: 23px;
        height: 19px;
    }

.txpcr-title {
    flex: 1;
    min-width: 0;
}

    .txpcr-title strong {
        display: block;
        font: 600 16px/1.25 var(--txpcr-head-font);
        color: var(--txpcr-ink);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .txpcr-title span {
        display: block;
        margin-top: 2px;
        font-size: 12.5px;
        line-height: 1.3;
        color: var(--txpcr-muted);
    }

.txpcr-icon-btn {
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--txpcr-muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

    .txpcr-icon-btn:hover {
        background: var(--txpcr-bot-bubble);
        color: var(--txpcr-ink);
    }

    .txpcr-icon-btn svg {
        width: 21px;
        height: 21px;
    }

.txpcr-human {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px 10px 16px;
    border: 0;
    border-bottom: 1px solid var(--txpcr-line);
    background: #F6F9FC;
    color: var(--txpcr-ink);
    font: 400 13.5px/1.3 var(--txpcr-font);
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease;
}

    .txpcr-human:hover {
        background: var(--txpcr-accent-soft);
    }

    .txpcr-human strong {
        font-weight: 600;
        color: var(--txpcr-accent);
    }

    .txpcr-human span {
        flex: 1;
        min-width: 0;
    }

.txpcr-human__icon {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--txpcr-accent);
}

.txpcr-human__arrow {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--txpcr-muted);
}

.txpcr.has-human .txpcr-human__new, .txpcr:not(.has-human) .txpcr-human__back {
    display: none;
}

.txpcr-confirm {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    padding: 12px 16px;
    background: #F7F9FB;
    border-bottom: 1px solid var(--txpcr-line);
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--txpcr-ink);
}

.txpcr-confirm__actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.txpcr-btn {
    padding: 8px 16px;
    border: 1px solid var(--txpcr-accent);
    border-radius: 999px;
    background: var(--txpcr-accent);
    color: var(--txpcr-accent-ink);
    font: 600 13.5px/1.2 var(--txpcr-font);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

    .txpcr-btn:hover {
        background: var(--txpcr-accent-hover);
        border-color: var(--txpcr-accent-hover);
    }

.txpcr-btn--ghost {
    background: var(--txpcr-surface);
    border-color: var(--txpcr-line);
    color: var(--txpcr-ink);
}

    .txpcr-btn--ghost:hover {
        background: var(--txpcr-bot-bubble);
        border-color: var(--txpcr-line);
    }

.txpcr-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--txpcr-canvas);
}

.txpcr-transcript-slot {
    flex: 1;
    min-height: 0;
    position: relative;
}

    .txpcr-transcript-slot > div:not(.txpcr-notice) {
        height: 100%;
    }

.txpcr-notice {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    padding: 32px;
    text-align: center;
    color: var(--txpcr-muted);
    line-height: 1.5;
    font-size: 14px;
    background: var(--txpcr-canvas);
}

    .txpcr-notice strong {
        color: var(--txpcr-ink);
        font-size: 15px;
        font-weight: 600;
    }

    .txpcr-notice[data-kind="connecting"]::before {
        content: "";
        width: 26px;
        height: 26px;
        margin-bottom: 4px;
        border-radius: 50%;
        border: 3px solid var(--txpcr-accent-soft);
        border-top-color: var(--txpcr-accent);
        animation: txpcr-spin .8s linear infinite;
    }

    .txpcr-notice button {
        margin-top: 6px;
    }

@keyframes txpcr-spin {
    to {
        transform: rotate(360deg);
    }
}

.txpcr-thinking {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 16px 12px 52px;
    color: var(--txpcr-muted);
    font-size: 13px;
}

.txpcr-thinking__dots {
    display: inline-flex;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--txpcr-radius);
    background: var(--txpcr-bot-bubble);
}

    .txpcr-thinking__dots i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #8A97A6;
        animation: txpcr-bounce 1.2s ease-in-out infinite;
    }

        .txpcr-thinking__dots i:nth-child(2) {
            animation-delay: .15s;
        }

        .txpcr-thinking__dots i:nth-child(3) {
            animation-delay: .3s;
        }

@keyframes txpcr-bounce {
    0%, 60%, 100% {
        transform: none;
        opacity: .55;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.txpcr-suggestions {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px 16px 12px;
}

.txpcr-chip {
    padding: 8px 14px;
    border: 1px solid #C9DCF2;
    border-radius: 999px;
    background: var(--txpcr-surface);
    color: var(--txpcr-accent);
    font: 600 13.5px/1.25 var(--txpcr-font);
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

    .txpcr-chip:hover {
        background: var(--txpcr-accent-soft);
        border-color: var(--txpcr-accent);
    }

.txpcr-alert {
    flex: none;
    margin: 0 16px 10px;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--txpcr-warn-bg);
    color: var(--txpcr-warn-ink);
    font-size: 13px;
    line-height: 1.4;
}

.txpcr-dock {
    flex: none;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--txpcr-surface);
}

.txpcr-composer {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin: 0;
    padding: 5px 5px 5px 16px;
    border: 1px solid #D5DCE4;
    border-radius: 24px;
    background: var(--txpcr-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .txpcr-composer:focus-within {
        border-color: var(--txpcr-accent);
        box-shadow: 0 0 0 3px rgba(0, 92, 185, .14);
    }

    .txpcr-composer textarea {
        flex: 1;
        display: block;
        min-width: 0;
        min-height: 38px;
        max-height: 128px;
        margin: 0;
        padding: 8px 0;
        border: 0;
        outline: 0;
        resize: none;
        overflow-y: hidden;
        background: transparent;
        color: var(--txpcr-ink);
        font: 400 var(--txpcr-font-size)/1.45 var(--txpcr-font);
        box-shadow: none;
    }

        .txpcr-composer textarea::placeholder {
            color: #8792A0;
            opacity: 1;
        }

        .txpcr-composer textarea:disabled {
            background: transparent;
            cursor: default;
        }

.txpcr-send {
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--txpcr-accent);
    color: var(--txpcr-accent-ink);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, transform .12s ease;
}

    .txpcr-send:hover:not(:disabled) {
        background: var(--txpcr-accent-hover);
    }

    .txpcr-send:active:not(:disabled) {
        transform: scale(.94);
    }

    .txpcr-send:disabled {
        background: #E6EBF0;
        color: #9AA6B2;
        cursor: default;
    }

    .txpcr-send svg {
        width: 19px;
        height: 19px;
    }

.txpcr-ended {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 4px 0 2px;
    color: var(--txpcr-muted);
    font-size: 14px;
    text-align: center;
}

.txpcr-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 6px 0;
    font-size: 12px;
    line-height: 1.3;
    color: var(--txpcr-muted);
}

.txpcr-meta {
    margin-left: auto;
    text-align: right;
    font-weight: 600;
    color: var(--txpcr-ink);
}

    .txpcr-meta:empty {
        display: none;
    }

.txpcr button:focus:not(:focus-visible), .txpcr a:focus:not(:focus-visible) {
    outline: none;
}

.txpcr-launcher:focus-visible, .txpcr-icon-btn:focus-visible, .txpcr-chip:focus-visible, .txpcr-send:focus-visible,
.txpcr-btn:focus-visible, .txpcr-human:focus-visible {
    outline: 3px solid rgba(0, 92, 185, .45);
    outline-offset: 2px;
}

.txpcr-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;
}

.txpcr-panel .webchat__bubble__content {
    font-size: var(--txpcr-font-size);
    line-height: 1.5;
}

.txpcr-panel .webchat__bubble:not(.webchat__bubble--from-user) a {
    color: var(--txpcr-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.txpcr-panel .webchat__bubble--from-user a {
    color: inherit;
    text-decoration: underline;
}

.txpcr-panel .webchat__render-markdown ul, .txpcr-panel .webchat__render-markdown ol {
    margin: 6px 0;
    padding-left: 20px;
}

.txpcr-panel .webchat__render-markdown li + li {
    margin-top: 4px;
}

.txpcr-panel .webchat__render-markdown table {
    border-collapse: collapse;
    margin: 8px 0;
    font-size: .9em;
    background: var(--txpcr-surface);
}

.txpcr-panel .webchat__render-markdown th, .txpcr-panel .webchat__render-markdown td {
    border: 1px solid var(--txpcr-line);
    padding: 5px 9px;
    text-align: left;
}

.txpcr-panel .webchat__render-markdown p {
    margin: 0 0 8px;
}

    .txpcr-panel .webchat__render-markdown p:last-child {
        margin-bottom: 0;
    }

.txpcr-panel .webchat__stacked-layout__status, .txpcr-panel .webchat__activity-status {
    font-size: 11.5px;
}

.txpcr-panel .webchat__basic-transcript:not(:focus-visible) .webchat__basic-transcript__activity-indicator--focus,
.txpcr-panel .webchat__basic-transcript__terminator {
    display: none;
}

.txpcr-panel .webchat__basic-transcript__scrollable {
    scrollbar-width: thin;
    scrollbar-color: #CDD5DE transparent;
}

@media (max-width: 520px) {
    :root {
        --txpcr-edge: 16px;
    }

    .txpcr-panel {
        inset: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        animation-name: txpcr-open-phone;
    }

    .txpcr-header {
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
        padding-bottom: 12px;
    }

    .txpcr-launcher {
        padding: 0;
        width: var(--txpcr-launch);
    }

    .txpcr-launcher__label {
        display: none;
    }

    .txpcr.is-open .txpcr-launcher, html.txpcr-nice-open .txpcr-launcher {
        display: none;
    }

    .txpcr-composer textarea {
        font-size: 16px;
    }

    html.txpcr-lock, html.txpcr-lock body {
        overflow: hidden !important;
    }
}

@keyframes txpcr-open-phone {
    from {
        transform: translateY(24px);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .txpcr-panel, .txpcr-notice::before, .txpcr-thinking__dots i {
        animation: none !important;
    }

    .txpcr-launcher, .txpcr-launcher svg {
        transition: none;
    }
}
