.cpa {
    --cpa-accent:#FF6600;
    --cpa-accent-dark: #ca2118;
    --cpa-ink: #1c2434;
    --cpa-muted: #667085;
    --cpa-line: #e4e7ec;
    --cpa-soft: #f7f8fb;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1055;
    color: var(--cpa-ink);
    font-family: inherit;
}

.cpa *, .cpa *::before, .cpa *::after { box-sizing: border-box; }

.cpa__launcher {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 18px 10px 11px;
    border: 0;
    border-radius: 999px;
    background: var(--cpa-ink);
    color: #fff;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .22);
    font-size: 14px;
    /*  font-weight: 700;*/
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cpa__launcher:hover,
.cpa__launcher:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(17, 24, 39, .28);
}

.cpa__launcher-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cpa-accent);
    font-size: 18px;
}

.cpa__panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    display: flex;
    flex-direction: column;
    width: min(410px, calc(100vw - 32px));
    height: min(690px, calc(100vh - 120px));
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius:9px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(17, 24, 39, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.cpa__panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cpa__header {
    display: flex;
    /*    align-items: flex-start;*/
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding:9px 20px;
    background: var(--cpa-ink);
    color: #fff;
}

.cpa__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #f4b8b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.cpa__header h2 {
    margin: 0;
    color: #fff;
    font-size:16px;
    line-height: 1;
    font-weight: 400;
    font-family: "Urbanist", sans-serif;
}

.cpa__close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.cpa__progress { height: 3px; background: #eef0f4; }
.cpa__progress span { display: block; width: 4%; height: 100%; background: var(--cpa-accent); transition: width .3s ease; }

.cpa__body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: var(--cpa-soft);
    overscroll-behavior: contain;
}

.cpa__messages { display: flex; flex-direction: column; gap: 12px; }

.cpa__message {
    max-width: 88%;
    padding: 11px 14px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.48;
    white-space: pre-line;
}

.cpa__message--assistant {
    align-self: flex-start;
    border: 1px solid var(--cpa-line);
    border-bottom-left-radius: 5px;
    background: #fff;
}

.cpa__message--user {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    background: var(--cpa-ink);
    color: #fff;
}

.cpa__typing {
    display: flex;
    align-items: center;
    gap: 4px;
    width: max-content;
    margin-top: 12px;
    padding: 10px 13px;
    border: 1px solid var(--cpa-line);
    border-radius: 14px 14px 14px 5px;
    background: #fff;
}

.cpa__typing[hidden] { display: none; }
.cpa__typing span { width: 6px; height: 6px; border-radius: 50%; background: #98a2b3; animation: cpa-dot 1.2s infinite; }
.cpa__typing span:nth-child(2) { animation-delay: .15s; }
.cpa__typing span:nth-child(3) { animation-delay: .3s; }
.cpa__typing em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.cpa__controls { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cpa__options { display: flex; flex-wrap: wrap; gap: 8px; }
.cpa__options--multi { display: grid; grid-template-columns: 1fr 1fr; }

.cpa__option,
.cpa__next,
.cpa__submit {
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    color: var(--cpa-ink);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    cursor: pointer;
}

.cpa__option { padding: 10px 12px; text-align: left; }
.cpa__option:hover, .cpa__option:focus-visible { border-color: var(--cpa-accent); color: var(--cpa-accent-dark); }
.cpa__next, .cpa__submit { align-self: flex-end; padding: 11px 18px; border-color: var(--cpa-accent); background: var(--cpa-accent); color: #fff; }
.cpa__next:hover, .cpa__submit:hover { border-color: var(--cpa-accent-dark); background: var(--cpa-accent-dark); }

.cpa__check { position: relative; margin: 0; cursor: pointer; }
.cpa__check input { position: absolute; opacity: 0; pointer-events: none; }
.cpa__check span { display: flex; align-items: center; min-height: 46px; padding: 9px 10px; border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; font-size: 12px; line-height: 1.3; }
.cpa__check input:checked + span { border-color: var(--cpa-accent); background: #fff1f0; color: #a91c13; box-shadow: inset 0 0 0 1px var(--cpa-accent); }
.cpa__check input:focus-visible + span { outline: 3px solid rgba(238, 49, 36, .2); }

.cpa__textarea,
.cpa__contact-grid input {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    color: var(--cpa-ink);
    font: inherit;
    font-size: 14px;
}

.cpa__textarea { min-height: 92px; padding: 11px 12px; resize: vertical; }
.cpa__textarea:focus, .cpa__contact-grid input:focus { border-color: var(--cpa-accent); outline: 3px solid rgba(238, 49, 36, .12); }

.cpa__contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cpa__contact-grid label { margin: 0; }
.cpa__contact-grid label > span { display: block; margin: 0 0 4px 2px; color: #475467; font-size: 12px; font-weight: 650; }
.cpa__contact-grid input { height: 42px; padding: 8px 10px; }
.cpa__contact-help { margin: -2px 0 0; color: var(--cpa-muted); font-size: 11px; }

.cpa__consent { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; margin: 4px 0; color: #475467; font-size: 11px; line-height: 1.45; }
.cpa__consent input { margin-top: 2px; accent-color: var(--cpa-accent); }
.cpa__consent a { color: var(--cpa-accent-dark); text-decoration: underline; }

.cpa__inline-error, .cpa__form-error { margin: 0; color: #b42318; font-size: 12px; }
.cpa__result:not(:empty) { margin-top: 8px; }
.cpa__success { padding: 25px 14px; text-align: center; }
.cpa__success-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: #e9f8ef; color: #168346; font-size: 25px; font-weight: 700; }
.cpa__success h3 { margin: 0 0 8px; color: var(--cpa-ink); font-size: 19px; }
.cpa__success p { margin: 0 0 8px; color: #475467; font-size: 13px; line-height: 1.55; }
.cpa__success small { color: var(--cpa-muted); }

.cpa__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 45px;
    padding: 8px 15px;
    border-top: 1px solid var(--cpa-line);
    background: #fff;
    color: var(--cpa-muted);
    font-size: 10px;
}

.cpa__back { padding: 5px 0; border: 0; background: transparent; color: var(--cpa-accent-dark); font-size: 12px; font-weight: 650; cursor: pointer; }
.cpa__website { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

@keyframes cpa-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-3px); opacity: 1; } }

@media (max-width: 575.98px) {
    .cpa { right: 12px; bottom: 12px; }
    .cpa__launcher { min-width: 50px; min-height: 50px; padding: 9px; }
    .cpa__launcher-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .cpa__panel { position: fixed; inset: 8px; width: auto; height: auto; max-height: none; border-radius: 16px; transform-origin: bottom center; }
    .cpa__contact-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .cpa__panel, .cpa__launcher, .cpa__progress span { transition: none; }
    .cpa__typing span { animation: none; }
}

