.copp-support-chat {
    --copp-support-launcher-expanded-width: 206px;
    bottom: 28px;
    color: var(--copp-ink, #252525);
    font-family: inherit;
    position: fixed;
    right: 28px;
    z-index: 1080;
}

.copp-support-chat *,
.copp-support-chat *::before,
.copp-support-chat *::after {
    box-sizing: border-box;
}

.copp-support-chat__launcher {
    align-items: center;
    background: var(--copp-red);
    border: 0;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(var(--copp-ink-rgb), 0.24);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    gap: 0;
    height: 56px;
    justify-content: center;
    line-height: 1;
    min-width: 56px;
    overflow: hidden;
    padding: 0;
    transition: background-color 180ms ease, box-shadow 180ms ease, gap 180ms ease, min-width 180ms ease, padding 180ms ease, transform 180ms ease, width 180ms ease;
    width: 56px;
}

.copp-support-chat__launcher:hover,
.copp-support-chat__launcher:focus {
    background: var(--copp-red-dark);
    box-shadow: 0 22px 44px rgba(var(--copp-ink-rgb), 0.28);
    color: #ffffff;
    gap: 10px;
    min-width: var(--copp-support-launcher-expanded-width);
    outline: none;
    padding: 0 20px;
    transform: translateY(-2px);
    width: var(--copp-support-launcher-expanded-width);
}

.copp-support-chat__launcher-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 18px;
    justify-content: center;
}

.copp-support-chat__launcher-text {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 180ms ease, opacity 140ms ease;
    white-space: nowrap;
}

.copp-support-chat__launcher:hover .copp-support-chat__launcher-text,
.copp-support-chat__launcher:focus .copp-support-chat__launcher-text {
    max-width: 150px;
    opacity: 1;
}

.copp-support-chat__panel {
    background: #ffffff;
    border: 1px solid rgba(var(--copp-ink-rgb), 0.12);
    border-radius: 0;
    bottom: 0;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    max-height: min(640px, calc(100vh - 56px));
    min-height: 440px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
    transform: translateY(14px) scale(0.96);
    transform-origin: right bottom;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
    visibility: hidden;
    width: min(380px, calc(100vw - 32px));
}

.copp-support-chat.is-open .copp-support-chat__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.copp-support-chat.is-open .copp-support-chat__launcher {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.96);
}

.copp-support-chat__head {
    align-items: flex-start;
    background: var(--copp-ink);
    color: #ffffff;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 18px 18px 16px;
}

.copp-support-chat__head-copy {
    min-width: 0;
}

.copp-support-chat__eyebrow {
    color: rgba(255, 255, 255, 0.68);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.copp-support-chat__title {
    color: #ffffff;
    display: block;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

.copp-support-chat__close {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.copp-support-chat__close:hover,
.copp-support-chat__close:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    outline: none;
}

.copp-support-chat__body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.copp-support-chat__screen {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.copp-support-chat[data-stage="intro"] .copp-support-chat__screen--intro,
.copp-support-chat[data-stage="chat"] .copp-support-chat__screen--chat {
    display: flex;
}

.copp-support-chat__intro {
    flex-direction: column;
    gap: 18px;
    padding: 22px 18px 18px;
}

.copp-support-chat__text {
    color: var(--copp-muted, #626262);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

.copp-support-chat__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.copp-support-chat__field span {
    color: var(--copp-muted, #626262);
    font-size: 13px;
    font-weight: 700;
}

.copp-support-chat__input,
.copp-support-chat__textarea {
    background: #ffffff;
    border: 1px solid rgba(var(--copp-ink-rgb), 0.16);
    border-radius: 0;
    color: var(--copp-ink, #252525);
    font: inherit;
    line-height: 1.35;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    width: 100%;
}

.copp-support-chat__input {
    height: 48px;
    padding: 0 14px;
}

.copp-support-chat__textarea {
    max-height: 126px;
    min-height: 44px;
    padding: 11px 12px;
    resize: none;
}

.copp-support-chat__input:focus,
.copp-support-chat__textarea:focus {
    border-color: var(--copp-red);
    box-shadow: 0 0 0 3px rgba(var(--copp-red-rgb), 0.12);
}

.copp-support-chat__button {
    align-items: center;
    background: var(--copp-red);
    border: 0;
    border-radius: 0;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: var(--copp-fs-btn);
    font-weight: 800;
    gap: 9px;
    height: 48px;
    justify-content: center;
    line-height: 1;
    padding: 0 18px;
    transition: background-color 160ms ease, transform 160ms ease;
}

.copp-support-chat__button:hover,
.copp-support-chat__button:focus {
    background: var(--copp-red-dark);
    color: #ffffff;
    outline: none;
}

.copp-support-chat__button:disabled {
    cursor: default;
    opacity: 0.58;
}

.copp-support-chat__error {
    color: var(--copp-red-dark);
    font-size: 13px;
    line-height: 1.35;
    min-height: 18px;
}

.copp-support-chat__chat {
    flex-direction: column;
}

.copp-support-chat__messages {
    background: #f5f6f7;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px;
}

.copp-support-chat__empty {
    align-self: center;
    color: var(--copp-muted, #626262);
    font-size: 14px;
    line-height: 1.45;
    margin: auto 14px;
    max-width: 260px;
    text-align: center;
}

.copp-support-chat__message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 86%;
}

.copp-support-chat__message--visitor {
    align-self: flex-end;
}

.copp-support-chat__message--admin {
    align-self: flex-start;
}

.copp-support-chat__bubble {
    border-radius: 0;
    font-size: 14px;
    line-height: 1.45;
    padding: 10px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.copp-support-chat__message--visitor .copp-support-chat__bubble {
    background: var(--copp-red);
    color: #ffffff;
}

.copp-support-chat__message--admin .copp-support-chat__bubble {
    background: #ffffff;
    border: 1px solid rgba(var(--copp-ink-rgb), 0.1);
    color: var(--copp-ink, #252525);
}

.copp-support-chat__meta {
    color: rgba(var(--copp-ink-rgb), 0.52);
    font-size: 11px;
    line-height: 1.2;
}

.copp-support-chat__message--visitor .copp-support-chat__meta {
    align-self: flex-end;
}

.copp-support-chat__typing {
    background: #f5f6f7;
    color: var(--copp-muted, #626262);
    flex: 0 0 25px;
    font-size: 13px;
    line-height: 1;
    padding: 0 16px 12px;
}

.copp-support-chat__composer {
    align-items: flex-end;
    background: #ffffff;
    border-top: 1px solid rgba(var(--copp-ink-rgb), 0.1);
    display: flex;
    gap: 10px;
    padding: 12px;
}

.copp-support-chat__send {
    flex: 0 0 46px;
    height: 44px;
    padding: 0;
    width: 46px;
}

body #scroll-top {
    bottom: 92px;
    right: 28px;
}

@media (max-width: 560px) {
    .copp-support-chat {
        bottom: 16px;
        left: auto;
        right: 16px;
    }

    .copp-support-chat__launcher {
        min-width: 56px;
        width: 56px;
    }

    .copp-support-chat__launcher:hover,
    .copp-support-chat__launcher:focus {
        min-width: min(var(--copp-support-launcher-expanded-width), calc(100vw - 32px));
        width: min(var(--copp-support-launcher-expanded-width), calc(100vw - 32px));
    }

    .copp-support-chat__panel {
        max-height: calc(100vh - 32px);
        min-height: min(520px, calc(100vh - 32px));
        width: 100%;
    }

    body #scroll-top {
        bottom: 84px;
        right: 16px;
    }
}
