/* spot (биржа заявок B2, 22.10.2026, K-152): чат «Подбор с автоэкспертом» (templates/expert.tpl) и кнопка в него в блоке
   «Связаться с экспертом» (объявление, калькулятор) и в AI подборе. Токены — spot_ui.css. Мобильный вид первичен, без hover-зависимостей. */

/* ---------- кнопка в чат (объявление, калькулятор, AI подбор) ---------- */

.spot-leadf-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: var(--spot-control-h);
    padding: 0 16px;
    border: 0;
    border-radius: var(--spot-radius);
    background: var(--spot-red);
    color: #fff !important;
    font-family: var(--spot-font);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
}

.spot-leadf-cta:active {
    background: var(--spot-red-dark);
}

.spot-leadf-cta:focus-visible {
    outline: 2px solid var(--spot-focus);
    outline-offset: 2px;
}

.spot-leadf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 40px;
    border-radius: var(--spot-radius-s);
    background: var(--spot-red-soft);
    color: var(--spot-red-dark-fg);
}

.share_expert-links.spot-leadf-links,
.spot-ad-page .spot-ad-calc .share_expert-links.spot-leadf-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

/* ---------- страница чата ---------- */

.spot-ex {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 32px;
    font-family: var(--spot-font);
    color: var(--spot-ink);
}

.spot-ex-h1 {
    margin: 16px 0 6px;
}

.spot-ex-lead {
    margin: 0 0 16px;
    color: var(--spot-ink-2, var(--spot-ink));
    font-size: 15px;
    line-height: 21px;
}

.spot-ex-chat {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-radius: var(--spot-radius-l);
    background: var(--spot-surface);
}

.spot-ex-chat[aria-busy="true"] .spot-ex-panel {
    opacity: .6;
    pointer-events: none;
}

.spot-ex-msgs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.spot-ex-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.spot-ex-msg.is-me {
    align-items: flex-end;
}

.spot-ex-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px 16px 4px 16px;
    background: var(--spot-raise);
    font-size: 15px;
    line-height: 21px;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.spot-ex-msg.is-me .spot-ex-bubble {
    border-radius: 16px 16px 16px 4px;
    background: var(--spot-inv);
    color: var(--spot-on-inv);
    font-weight: 600;
}

.spot-ex-pre {
    color: var(--spot-mut);
    font-size: 12px;
}

.spot-ex-msg.is-note {
    align-items: stretch;
}

.spot-ex-dis {
    padding: 8px 12px;
    border-radius: var(--spot-radius-s);
    border: 1px dashed var(--spot-line);
    color: var(--spot-mut);
    font-size: 12px;
    line-height: 17px;
}

.spot-ex-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--spot-line);
}

.spot-ex-panel:empty {
    display: none;
}

.spot-ex-back {
    align-self: flex-start;
    min-height: 36px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--spot-focus);
    font-family: var(--spot-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.spot-ex-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spot-ex-opts.is-row {
    flex-direction: row;
    flex-wrap: wrap;
}

.spot-ex-opt {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--spot-control-h-l);
    padding: 10px 16px;
    border: 1px solid var(--spot-line);
    border-radius: var(--spot-radius);
    background: var(--spot-surface);
    color: var(--spot-ink);
    font-family: var(--spot-font);
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

.spot-ex-opts.is-row .spot-ex-opt {
    width: auto;
    flex: 1 1 200px;
    justify-content: center;
}

.spot-ex-opt:active {
    border-color: var(--spot-inv);
    background: var(--spot-raise);
}

.spot-ex-input {
    display: flex;
    gap: 8px;
}

.spot-ex-in {
    width: 100%;
    min-width: 0;
    height: var(--spot-control-h);
    padding: 0 12px;
    border: 1px solid var(--spot-field-border);
    border-radius: var(--spot-radius);
    background: var(--spot-surface);
    color: var(--spot-ink);
    font-family: var(--spot-font);
    font-size: 16px;
}

.spot-ex-code {
    max-width: 200px;
    font-size: 22px;
    letter-spacing: 4px;
    text-align: center;
}

.spot-ex-send {
    flex: 0 0 auto;
    min-height: var(--spot-control-h);
    padding: 0 18px;
    border: 0;
    border-radius: var(--spot-radius);
    background: var(--spot-red);
    color: #fff;
    font-family: var(--spot-font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.spot-ex-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spot-ex-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.spot-ex-field[hidden] {
    display: none;
}

.spot-ex-label {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 18px;
    font-weight: 700;
}

.spot-ex-hint {
    color: var(--spot-mut);
    font-size: 12px;
    line-height: 16px;
}

.spot-ex-choice {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spot-ex-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: var(--spot-control-h);
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--spot-line);
    border-radius: var(--spot-radius);
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    cursor: pointer;
}

.spot-ex-radio input {
    /* общие стили сайта прячут стандартные переключатели — здесь кружок нужен */
    display: inline-block !important;
    position: static !important;
    opacity: 1 !important;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    -webkit-appearance: radio;
    appearance: auto;
    accent-color: var(--spot-red);
}

.spot-ex-radio.is-on {
    border-color: var(--spot-red);
    box-shadow: inset 0 0 0 1px var(--spot-red);
}

.spot-ex-radio small {
    color: var(--spot-green-fg);
    font-weight: 500;
}

.spot-ex-chip {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.spot-ex-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.spot-ex-chip span {
    display: inline-flex;
    align-items: center;
    min-height: var(--spot-control-h);
    padding: 0 16px;
    border-radius: 22px;
    background: var(--spot-raise);
    font-size: 15px;
    font-weight: 500;
}

.spot-ex-chip input:checked + span {
    background: var(--spot-inv);
    color: var(--spot-on-inv);
    font-weight: 700;
}

.spot-ex-go {
    min-height: var(--spot-control-h-l);
    border: 0;
    border-radius: var(--spot-radius);
    background: var(--spot-red);
    color: #fff;
    font-family: var(--spot-font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.spot-ex-link {
    align-self: center;
    min-height: var(--spot-control-h);
    border: 0;
    background: none;
    color: var(--spot-focus);
    font-family: var(--spot-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.spot-ex-err {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--spot-radius-s);
    background: var(--spot-red-soft);
    color: var(--spot-red-dark-fg);
    font-size: 14px;
    line-height: 18px;
}

.spot-ex-dis-end {
    margin: 0;
    color: var(--spot-mut);
    font-size: 12px;
    line-height: 17px;
}

.spot-ex-note {
    margin: 0;
    color: var(--spot-mut);
}

.spot-ex-in:focus-visible,
.spot-ex-opt:focus-visible,
.spot-ex-send:focus-visible,
.spot-ex-go:focus-visible,
.spot-ex-back:focus-visible,
.spot-ex-link:focus-visible,
.spot-ex-chip input:focus-visible + span,
.spot-ex-radio input:focus-visible {
    outline: 2px solid var(--spot-focus);
    outline-offset: 2px;
}

/* блок «Подобрать с автоэкспертом» в AI подборе */
.spot-pbc-expert {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 14px 16px;
    border-radius: var(--spot-radius-l);
    background: var(--spot-red-soft);
}

.spot-pbc-expert b {
    font-size: 15px;
    line-height: 20px;
}

.spot-pbc-expert p {
    margin: 0;
    color: var(--spot-ink-2, var(--spot-ink));
    font-size: 14px;
    line-height: 19px;
}
