/* ============ переменные ============ */
:root {
    --light-gray: #f2f2f2;
    --main-red: #e8402f;

    --b24-font-family-default: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --b24-font-family: 'PT Sans Narrow', var(--b24-font-family-default);

    --b24-text-color: #000;
    --b24-primary-color: #0f58d0;
    --b24-primary-text-color: #fff;
    --b24-primary-hover-color: rgba(0, 176, 240, .7);

    --b24-field-border-color: rgba(0, 0, 0, .04);
    --b24-field-background-color: rgba(0, 0, 0, .04);
    --b24-error-color: #f25830;

    /* акцент мини-формы */
    --mini-accent: rgba(0, 174, 239, 1);

    /* фон успешной отправки */
    --success-green: #a0be47;
}

*{box-sizing:border-box;}

body{
  margin:0;
  font-family:var(--b24-font-family);
  color:var(--b24-text-color);
  background:#fff;
}


/* ============ контейнер формы ============ */
.form-container {
    padding: 24px;
    width: 100%;
    background: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.callback-form {
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: background-color .3s ease;
}

/* --- Состояние успешной отправки основной формы --- */
.callback-form.is-success {
    background: var(--success-green);
    border-bottom: 5px solid var(--success-green);
}

.callback-form.is-success .callback-form__header,
.callback-form.is-success .callback-form__body {
    display: none;
}

/* ============ header формы ============ */
.callback-form__header {
    padding-top: 15px;
    padding-left: 31px;
    padding-right: 31px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(82, 92, 105, .11);
    text-align: center;
}

.callback-form__title {
    color: var(--b24-text-color);
    letter-spacing: .6px;
    margin-top: 0;
    margin-bottom: 9px;
    font: 24px/33px var(--b24-font-family);
    font-weight: 700;
    word-break: break-word;
}

/* ============ блок формы ============ */
.callback-form__body {
    padding-top: 15px;
    padding-bottom: 15px;
    padding-left: 31px;
    padding-right: 31px;
}

/* ============ поля ============ */
.field {
    position: relative;
    margin-bottom: 14px;
}

.field__input,
.field__select {
    display: block;
    width: 100%;
    height: 52px;
    border-radius: 4px;
    border: 1px solid var(--b24-field-border-color);
    background-color: var(--b24-field-background-color);
    background-image: linear-gradient(hsla(0, 0%, 100%, 0), hsla(0, 0%, 100%, 0));
    color: var(--b24-text-color);
    padding: 0px 35px 0 10px;
    font: 16px var(--b24-font-family);
    letter-spacing: -.3px;
    outline: none;
    transition: border-color .2s ease, background-color .2s ease;
}

.field__input::placeholder {
    color: #8d8d8d;
}

.field__input:focus,
.field__select:focus {
    border-color: #3ea9e0;
    background-color: #fff;
}

.field__select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding: 0 35px 0 10px;
    color: #8d8d8d;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%23a0a0a0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.field__select:invalid {
    color: #8d8d8d;
}

.field__select option {
    color: #000;
}

/* ============================================================
   Плавающий placeholder (label)
   Используется в поле «Телефон»: при фокусе или заполнении
   подпись плавно поднимается вверх и не исчезает.
   ============================================================ */
.field--float .field__input {
    /* освобождаем место сверху под плавающую подпись */
    padding: 18px 35px 0 10px;
}

.field--float .field__input::placeholder {
    /* скрываем нативный placeholder — вместо него используется label */
    color: transparent;
}

.field__label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #8d8d8d;
    font: 16px/1 var(--b24-font-family);
    letter-spacing: -.3px;
    pointer-events: none;
    white-space: nowrap;
    transition: top .15s ease, font-size .15s ease, transform .15s ease, color .15s ease;
}

/* Подпись поднимается при фокусе */
.field--float .field__input:focus+.field__label,
/* Подпись остаётся наверху, если поле заполнено */
.field--float .field__input:not(:placeholder-shown)+.field__label {
    top: 8px;
    transform: none;
    font-size: 11px;
    color: #8d8d8d;
}

/* При фокусе делаем подпись чуть темнее */
.field--float .field__input:focus+.field__label {
    color: #3ea9e0;
}

/* ============ состояние ошибки ============ */
.field.has-error .field__input,
.field.has-error .field__select {
    background-color: rgba(242, 88, 48, .08);
    border-color: rgba(242, 88, 48, .25);
}

.field__error,
.checkbox-field__error {
    display: none;
    position: absolute;
    left: 12px;
    top: calc(100% - 6px);
    background: var(--b24-error-color);
    z-index: 10;
    border-radius: 0 2px 2px 2px;
    padding: 2px 8px 2px 22px;
    font: 13px var(--b24-font-family);
    color: #fff;
    max-width: 90%;
    animation-duration: .2s;
    animation-name: b24ShowFieldMessage;
    animation-fill-mode: forwards;
    animation-timing-function: ease;
}

.field__error::before,
.checkbox-field__error::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 1 23 21H1z' fill='%23fff'/%3E%3Cpath d='M12 8v6' stroke='%23f25830' stroke-width='2.6' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17.6' r='1.5' fill='%23f25830'/%3E%3C/svg%3E") no-repeat center/contain;
}

.field.has-error .field__error,
.checkbox-field.has-error .checkbox-field__error {
    display: block;
}

@keyframes b24ShowFieldMessage {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ checkbox ============ */
.checkbox-field {
    position: relative;
    margin-bottom: 14px;
}

.checkbox-field__label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.checkbox-field__input {
    flex: none;
    width: 14px;
    height: 14px;
    margin: 0;
    position: relative;
    top: -1px;
    accent-color: var(--b24-primary-color);
    cursor: pointer;
}

.checkbox-field__req {
    color: var(--b24-error-color);
}

/* ============ кнопка «Отправить» ============ */
.submit-btn {
    position: relative;
    display: inline-block;
    padding: 15px 20px;
    margin: 0;
    min-height: 52px;
    width: 100%;
    border: none;
    border-radius: 4px;
    background-color: var(--main-red);
    font: 600 15px/22px var(--b24-font-family);
    box-sizing: border-box;
    box-shadow: -1px -1px 1px rgba(0, 0, 0, .09);
    outline: none;
    cursor: pointer;
    color: #fff;
    transition: all .2s ease;
}

.submit-btn:hover {
    filter: brightness(1.07);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* ============ «Сообщить о нарушении» ============ */
.report-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 12px;
    color: #a0a0a0;
    text-decoration: none;
    cursor: pointer;
}

.report-link:hover {
    color: #7c7c7c;
}

.report-link__icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d8d8d8;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   Кнопка открытия мини-формы обратного звонка
   ============================================================ */
.mini-call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    margin-left: 12px;
    padding: 12px 20px;
    min-height: 44px;
    border: none;
    border-radius: 4px;
    background-color: var(--mini-accent);
    color: #fff;
    font: 600 14px/20px var(--b24-font-family);
    cursor: pointer;
    box-shadow: -1px -1px 1px rgba(0, 0, 0, .09);
    transition: filter .2s ease, transform .2s ease;
}

.mini-call-btn:hover {
    filter: brightness(1.07);
}

.mini-call-btn:active {
    transform: translateY(1px);
}

/* ============================================================
   ЭКРАН УСПЕХА для ОСНОВНОЙ формы
   Показывается при добавлении класса .is-success
   на контейнер .callback-form.
   ============================================================ */
.callback-form__success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 70px 40px 80px;
}

.callback-form.is-success .callback-form__success {
    display: flex;
}

.callback-form__success-icon {
    display: inline-block;
    margin: 0 0 26px;
    width: 169px;
    height: 169px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20viewBox%3D%220%200%20169%20169%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%3E%3Cdefs%3E%3Ccircle%20id%3D%22a%22%20cx%3D%2284.5%22%20cy%3D%2284.5%22%20r%3D%2265.5%22/%3E%3Cfilter%20x%3D%22-.8%25%22%20y%3D%22-.8%25%22%20width%3D%22101.5%25%22%20height%3D%22101.5%25%22%20filterUnits%3D%22objectBoundingBox%22%20id%3D%22b%22%3E%3CfeGaussianBlur%20stdDeviation%3D%22.5%22%20in%3D%22SourceAlpha%22%20result%3D%22shadowBlurInner1%22/%3E%3CfeOffset%20dx%3D%22-1%22%20dy%3D%22-1%22%20in%3D%22shadowBlurInner1%22%20result%3D%22shadowOffsetInner1%22/%3E%3CfeComposite%20in%3D%22shadowOffsetInner1%22%20in2%3D%22SourceAlpha%22%20operator%3D%22arithmetic%22%20k2%3D%22-1%22%20k3%3D%221%22%20result%3D%22shadowInnerInner1%22/%3E%3CfeColorMatrix%20values%3D%220%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.0886691434%200%22%20in%3D%22shadowInnerInner1%22%20result%3D%22shadowMatrixInner1%22/%3E%3CfeGaussianBlur%20stdDeviation%3D%22.5%22%20in%3D%22SourceAlpha%22%20result%3D%22shadowBlurInner2%22/%3E%3CfeOffset%20dx%3D%221%22%20dy%3D%221%22%20in%3D%22shadowBlurInner2%22%20result%3D%22shadowOffsetInner2%22/%3E%3CfeComposite%20in%3D%22shadowOffsetInner2%22%20in2%3D%22SourceAlpha%22%20operator%3D%22arithmetic%22%20k2%3D%22-1%22%20k3%3D%221%22%20result%3D%22shadowInnerInner2%22/%3E%3CfeColorMatrix%20values%3D%220%200%200%200%201%200%200%200%200%201%200%200%200%200%201%200%200%200%200.292285839%200%22%20in%3D%22shadowInnerInner2%22%20result%3D%22shadowMatrixInner2%22/%3E%3CfeMerge%3E%3CfeMergeNode%20in%3D%22shadowMatrixInner1%22/%3E%3CfeMergeNode%20in%3D%22shadowMatrixInner2%22/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Ccircle%20stroke-opacity%3D%22.05%22%20stroke%3D%22%23000%22%20fill-opacity%3D%22.07%22%20fill%3D%22%23000%22%20cx%3D%2284.5%22%20cy%3D%2284.5%22%20r%3D%2284%22/%3E%3Cuse%20fill%3D%22%23FFF%22%20xlink%3Ahref%3D%22%23a%22/%3E%3Cuse%20fill%3D%22%23000%22%20filter%3D%22url%28%23b%29%22%20xlink%3Ahref%3D%22%23a%22/%3E%3Cpath%20fill%3D%22%23A0BE47%22%20d%3D%22M76.853%20107L57%2087.651l6.949-6.771%2012.904%2012.576L106.051%2065%20113%2071.772z%22/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.callback-form__success-text {
    color: #fff;
    font: 18px/26px var(--b24-font-family);
    max-width: 360px;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО с мини-формой обратного звонка
   ============================================================ */
.mini-callback-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mini-callback-overlay[hidden] {
    display: none;
}

.mini-callback-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 6px;
    border-bottom: 5px solid rgba(0, 174, 239, 1);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    transition: background-color .3s ease;
}

/* --- Состояние успешной отправки --- */
.mini-callback-modal.is-success {
    background: var(--success-green);
    border-bottom-color: var(--success-green);
}

.mini-callback-modal.is-success .mini-callback-modal__header,
.mini-callback-modal.is-success .mini-callback-modal__body {
    display: none;
}

/* Крестик закрытия мини-формы */
.mini-callback-modal__close {
    position: absolute;
    top: 12px;
    right: 23px;
    width: 28px;
    height: 28px;
    border-radius: 100%;
    border: none;
    transition: opacity .3s;
    opacity: .5;
    cursor: pointer;
    outline: none;
    z-index: 25;
    background-color: rgba(0, 174, 239, 1);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-callback-modal__close:hover {
    opacity: 1;
}

.mini-callback-modal__header {
    padding: 22px 28px 8px;
    text-align: center;
}

.mini-callback-modal__title {
    margin: 0;
    font: 22px/30px var(--b24-font-family);
    font-weight: 700;
    color: var(--b24-text-color);
    letter-spacing: .6px;
    word-break: break-word;
}

.mini-callback-modal__body {
    padding: 14px 28px 26px;
}

/* Кнопка «Отправить» в мини-форме — синий акцент */
.mini-callback-modal .submit-btn {
    background-color: rgba(0, 174, 239, 1);
}

/* Ссылка «Сообщить о нарушении» внутри мини-формы */
.mini-callback-modal .report-link {
    display: inline-flex;
    margin-top: 14px;
}

/* ============================================================
   Блок «Спасибо! Ваша заявка принята» внутри мини-формы
   ============================================================ */
.mini-callback-modal__success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 70px 40px 80px;
    min-height: 420px;
}

.mini-callback-modal.is-success .mini-callback-modal__success {
    display: flex;
}

.mini-callback-modal__success-icon {
    display: inline-block;
    margin: 0 0 26px;
    width: 169px;
    height: 169px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20viewBox%3D%220%200%20169%20169%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%3E%3Cdefs%3E%3Ccircle%20id%3D%22a%22%20cx%3D%2284.5%22%20cy%3D%2284.5%22%20r%3D%2265.5%22/%3E%3Cfilter%20x%3D%22-.8%25%22%20y%3D%22-.8%25%22%20width%3D%22101.5%25%22%20height%3D%22101.5%25%22%20filterUnits%3D%22objectBoundingBox%22%20id%3D%22b%22%3E%3CfeGaussianBlur%20stdDeviation%3D%22.5%22%20in%3D%22SourceAlpha%22%20result%3D%22shadowBlurInner1%22/%3E%3CfeOffset%20dx%3D%22-1%22%20dy%3D%22-1%22%20in%3D%22shadowBlurInner1%22%20result%3D%22shadowOffsetInner1%22/%3E%3CfeComposite%20in%3D%22shadowOffsetInner1%22%20in2%3D%22SourceAlpha%22%20operator%3D%22arithmetic%22%20k2%3D%22-1%22%20k3%3D%221%22%20result%3D%22shadowInnerInner1%22/%3E%3CfeColorMatrix%20values%3D%220%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.0886691434%200%22%20in%3D%22shadowInnerInner1%22%20result%3D%22shadowMatrixInner1%22/%3E%3CfeGaussianBlur%20stdDeviation%3D%22.5%22%20in%3D%22SourceAlpha%22%20result%3D%22shadowBlurInner2%22/%3E%3CfeOffset%20dx%3D%221%22%20dy%3D%221%22%20in%3D%22shadowBlurInner2%22%20result%3D%22shadowOffsetInner2%22/%3E%3CfeComposite%20in%3D%22shadowOffsetInner2%22%20in2%3D%22SourceAlpha%22%20operator%3D%22arithmetic%22%20k2%3D%22-1%22%20k3%3D%221%22%20result%3D%22shadowInnerInner2%22/%3E%3CfeColorMatrix%20values%3D%220%200%200%200%201%200%200%200%200%201%200%200%200%200%201%200%200%200%200.292285839%200%22%20in%3D%22shadowInnerInner2%22%20result%3D%22shadowMatrixInner2%22/%3E%3CfeMerge%3E%3CfeMergeNode%20in%3D%22shadowMatrixInner1%22/%3E%3CfeMergeNode%20in%3D%22shadowMatrixInner2%22/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Ccircle%20stroke-opacity%3D%22.05%22%20stroke%3D%22%23000%22%20fill-opacity%3D%22.07%22%20fill%3D%22%23000%22%20cx%3D%2284.5%22%20cy%3D%2284.5%22%20r%3D%2284%22/%3E%3Cuse%20fill%3D%22%23FFF%22%20xlink%3Ahref%3D%22%23a%22/%3E%3Cuse%20fill%3D%22%23000%22%20filter%3D%22url%28%23b%29%22%20xlink%3Ahref%3D%22%23a%22/%3E%3Cpath%20fill%3D%22%23A0BE47%22%20d%3D%22M76.853%20107L57%2087.651l6.949-6.771%2012.904%2012.576L106.051%2065%20113%2071.772z%22/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.mini-callback-modal__success-text {
    color: #fff;
    font: 18px/26px var(--b24-font-family);
    max-width: 320px;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО с текстом соглашения
   ============================================================ */
.policy-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.policy-overlay[hidden] {
    display: none;
}

.policy-modal {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    background: #fff;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

.policy-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #4dc3f0;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s ease;
}

.policy-modal__close:hover {
    background: #2eb4e8;
}

/* прокручиваемая область с текстом */
.policy-modal__scroll {
    flex: 1;
    overflow-y: auto;
    padding: 28px 28px 8px;
    font: 14px/19px var(--b24-font-family);
    color: var(--b24-text-color);
    overscroll-behavior: contain;
}

.policy-text p {
    margin: 0 0 10px;
}

.policy-text .h {
    font-weight: 700;
    margin: 16px 0 6px;
}

.policy-text .h:first-child {
    margin-top: 0;
}

/* низ модалки */
.policy-modal__footer {
    padding: 12px 28px 20px;
    background: #fff;
}

/* кнопка «Прочитайте до конца» */
.policy-modal__read-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px 20px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 4px;
    background: #fff;
    font: 600 15px/22px var(--b24-font-family);
    color: var(--b24-text-color);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.policy-modal__read-end[hidden] {
    display: none;
}

.policy-modal__read-end:hover {
    background: #f7f7f7;
    border-color: rgba(0, 0, 0, .2);
}

/* кнопки «Принимаю» / «Не принимаю» */
.policy-modal__actions {
    display: none;
    gap: 12px;
}

.policy-modal__actions.is-visible {
    display: flex;
}

.policy-btn {
    flex: 1;
    min-height: 52px;
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    font: 600 15px/22px var(--b24-font-family);
    cursor: pointer;
    box-sizing: border-box;
    transition: all .2s ease;
}

.policy-btn--accept {
    background-color: var(--b24-primary-hover-color);
    color: #fff;
    box-shadow: -1px -1px 1px rgba(0, 0, 0, .09);
}

.policy-btn--accept:hover {
    background-color: rgba(0, 176, 240, .88);
}

.policy-btn--decline {
    background-color: transparent;
    box-shadow: none;
    color: var(--b24-text-color);
    border: 1px solid rgba(0, 0, 0, .15);
}

.policy-btn--decline:hover {
    background-color: rgba(0, 0, 0, .04);
}

@media (max-width:560px) {
    .form-container {
        padding: 12px;
    }

    .callback-form__header,
    .callback-form__body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .callback-form__success {
        padding: 50px 24px 60px;
        min-height: 360px;
    }

    .callback-form__success-icon {
        width: 120px;
        height: 120px;
    }

    .mini-callback-modal__header {
        padding: 20px 18px 6px;
    }

    .mini-callback-modal__body {
        padding: 12px 18px 22px;
    }

    .mini-callback-modal__success {
        padding: 50px 24px 60px;
        min-height: 360px;
    }

    .mini-callback-modal__success-icon {
        width: 120px;
        height: 120px;
    }

    .policy-modal__scroll {
        padding: 22px 18px 8px;
    }

    .policy-modal__footer {
        padding: 10px 18px 16px;
    }

    .policy-modal__actions {
        flex-direction: column;
    }

    .mini-call-btn {
        margin-left: 0;
        width: 100%;
    }
}
