/**
 * Блок «Форма консультации» — главная (редизайн)
 */
:root {
    --consult-container: 1500px;
    --consult-gap-section: 80px;
    --consult-gap-inner: 24px;
    --consult-color-text: #111827;
    --consult-color-muted: #5a616c;
    --consult-color-white: #ffffff;
    --consult-color-brand: #b04481;
    --consult-color-bg: #f5f6fb;
    --consult-color-border: #e9ebef;
    --consult-color-placeholder: #9299a5;
    --consult-font: 'Vela Sans', 'Onest', system-ui, -apple-system, sans-serif;
    --consult-card-height: 568px;
}

.consult-form {
    padding: var(--consult-gap-section) 16px;
    font-family: var(--consult-font);
    color: var(--consult-color-text);
}

@media (min-width: 1533px) {
    .consult-form {
        padding-left: 0;
        padding-right: 0;
    }
}

.consult-form__inner {
    display: flex;
    align-items: stretch;
    gap: var(--consult-gap-inner);
    max-width: var(--consult-container);
    margin: 0 auto;
}

.consult-form__promo,
.consult-form__panel {
    flex: 1 1 0;
    min-width: 0;
    min-height: var(--consult-card-height);
    border-radius: 32px;
}

.consult-form__promo {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
    background: var(--consult-color-brand);
    overflow: hidden;
    isolation: isolate;
}

.consult-form__promo-picture {
    position: absolute;
    top: -81px;
    right: -43px;
    width: 577px;
    height: 577px;
    max-width: none;
    pointer-events: none;
    z-index: 0;
}

.consult-form__promo-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: scale-down;
    pointer-events: none;
}

.consult-form__promo-gradient {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 156px;
    background: linear-gradient(180deg, rgba(176, 68, 129, 0) 0%, #b04481 89.68%);
    z-index: 1;
    pointer-events: none;
}

.consult-form__promo-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 464px;
    padding-right: 80px;
}

.consult-form__promo-title {
    margin: 0;
    font-size: 52px;
    font-weight: 600;
    line-height: 64px;
    color: var(--consult-color-white);
}

.consult-form__promo-text {
    margin: 0;
    max-width: 340px;
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    color: var(--consult-color-white);
}

.consult-form__panel {
    display: flex;
    flex-direction: column;
    background: var(--consult-color-bg);
    padding: 48px;
    overflow: hidden;
}

.consult-form__form {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    flex: 1;
}

.consult-form__form form {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    min-height: 472px;
    margin: 0;
    gap: 0;
}

.consult-form__form--success {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 472px;
}

.consult-form__lead {
    margin: 0 0 auto;
    max-width: 642px;
    font-size: 28px;
    font-weight: 500;
    line-height: 38px;
    color: var(--consult-color-text);
}

.consult-form__fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.consult-form__field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
}

.consult-form__field label.error {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 4px 0 0;
    padding: 0;
    font-size: 12px;
    line-height: 16px;
    color: #ef4444;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.in_index .consult-form__field input.consult-form__input,
body.in_index .consult-form__field .form-control {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    padding: 14px 20px 14px 16px;
    border: 2px solid var(--consult-color-border);
    border-radius: 10px;
    background: var(--consult-color-white);
    font-family: var(--consult-font);
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: var(--consult-color-text);
    box-shadow: none;
    appearance: none;
}

.consult-form__input {
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    padding: 14px 20px 14px 16px;
    border: 2px solid var(--consult-color-border);
    border-radius: 10px;
    background: var(--consult-color-white);
    font-family: var(--consult-font);
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: var(--consult-color-text);
}

.consult-form__input::placeholder,
body.in_index .consult-form__field .form-control::placeholder {
    color: var(--consult-color-placeholder);
}

.consult-form__input:focus,
body.in_index .consult-form__field .form-control:focus {
    outline: none;
    border-color: #b04481;
}

.consult-form__actions {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.consult-form__submit-wrap {
    width: 100%;
    height: 52px;
}

.consult-form__submit,
button.consult-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 14px 24px;
    border: 0;
    border-radius: 10px;
    background: var(--consult-color-brand);
    font-family: var(--consult-font);
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    color: var(--consult-color-white);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.consult-form__submit:hover,
button.consult-form__submit:hover {
    background: var(--redesign-color-brand-hover);
}

.consult-form__consent {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.consult-form__consent-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

.consult-form__consent-checkbox {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin: 1px 0 0;
}

.consult-form .onoffswitch,
.consult-form label.onoffswitch-label {
    display: none !important;
}

.consult-form__checkbox {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.consult-form__checkbox-box {
    display: flex;
    box-sizing: border-box;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 4px;
    border: 2px solid #d2d6dc;
    border-radius: 4px;
    background: transparent;
    pointer-events: none;
}

.consult-form__checkbox-box svg {
    display: block;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.consult-form__checkbox:checked + .consult-form__checkbox-box,
.consult-form__consent-checkbox.is-checked .consult-form__checkbox-box {
    border-color: var(--consult-color-brand);
    background: var(--consult-color-brand);
}

.consult-form__checkbox:checked + .consult-form__checkbox-box svg,
.consult-form__consent-checkbox.is-checked .consult-form__checkbox-box svg {
    opacity: 1;
}

.consult-form__checkbox:focus-visible + .consult-form__checkbox-box {
    outline: 2px solid var(--consult-color-brand);
    outline-offset: 2px;
}

.consult-form__consent-checkbox.error .consult-form__checkbox-box {
    border-color: #ef4444;
}

.consult-form__consent label.error {
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding-left: 0;
    font-size: 12px;
    line-height: 16px;
    color: #ef4444;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.consult-form__consent-error {
    width: 100%;
    min-width: 0;
}

.consult-form__consent-error:empty {
    display: none;
}

.consult-form__consent-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    color: var(--consult-color-text);
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.consult-form__consent-text,
.consult-form__consent-text * {
    white-space: normal !important;
}

.consult-form__consent-text a {
    color: var(--consult-color-brand);
    text-decoration: none;
    white-space: normal !important;
}

.consult-form__consent-text a:hover {
    text-decoration: underline;
}

.consult-form__error {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fee2e2;
    font-size: 15px;
    line-height: 22px;
    color: #b91c1c;
}

.consult-form__success {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    flex: 1;
    width: 100%;
    min-height: 472px;
    gap: 40px;
}

.consult-form__success-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 100px;
    background: var(--consult-color-white);
}

.consult-form__success-icon svg {
    display: block;
    width: 56px;
    height: 56px;
}

.consult-form__success-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    max-width: 580px;
}

.consult-form__success-title {
    margin: 0;
    font-size: 48px;
    font-weight: 500;
    line-height: 52px;
    color: var(--consult-color-text);
}

.consult-form__success-desc {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    color: var(--consult-color-muted);
}

.consult-form__form .form-group,
.consult-form__form .input {
    margin: 0;
    padding: 0;
}

.consult-form__form form label:not(.consult-form__checkbox-box):not(.error) {
    display: none;
}

.drag-block.container.CONSULT_FORM_MAIN_drag {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
}

@media (max-width: 991px) {
    :root {
        --consult-gap-section: 60px;
    }
}

@media (max-width: 1199px) {
    .consult-form__promo-title {
        font-size: 40px;
        line-height: 48px;
    }

    .consult-form__promo-picture {
        width: 420px;
        height: 420px;
        top: -60px;
        right: -40px;
    }
}

@media (max-width: 767px) {
    .consult-form {
        padding: var(--consult-gap-section) 20px;
    }

    .consult-form__inner {
        flex-direction: column;
        gap: 8px;
    }

    .consult-form__promo,
    .consult-form__panel {
        border-radius: 20px;
    }

    .consult-form__promo {
        min-height: 362px;
        padding: 20px;
    }

    .consult-form__panel {
        flex: 0 0 auto;
        min-height: auto;
    }

    .consult-form__promo-picture {
        top: -48px;
        right: -20px;
        left: auto;
        width: 255px;
        height: 255px;
    }

    .consult-form__promo-content {
        gap: 16px;
        max-width: none;
    }

    .consult-form__promo-title {
        font-size: 28px;
        line-height: 34px;
    }

    .consult-form__promo-text {
        max-width: none;
        font-size: 16px;
        line-height: 24px;
    }

    .consult-form__panel {
        padding: 32px 20px;
    }

    .consult-form__form form {
        min-height: 0;
        gap: 0;
    }

    .consult-form__lead {
        margin-bottom: 24px;
        font-size: 18px;
        line-height: 24px;
    }

    .consult-form__fields {
        flex-direction: column;
        gap: 9px;
        margin-bottom: 16px;
    }

    .consult-form__field {
        flex-basis: auto;
        width: 100%;
    }

    body.in_index .consult-form__field input.consult-form__input,
    body.in_index .consult-form__field .form-control {
        height: 48px;
        padding: 12px 20px 12px 16px;
        border-width: 1.5px;
        border-radius: 8px;
        font-size: 16px;
    }

    .consult-form__input {
        height: 48px;
        padding: 12px 20px 12px 16px;
        border-width: 1.5px;
        border-radius: 8px;
        font-size: 16px;
    }

    .consult-form__actions {
        gap: 24px;
    }

    .consult-form__submit,
    button.consult-form__submit {
        height: 48px;
        padding: 12px 24px;
        border-radius: 8px;
        font-size: 16px;
    }

    .consult-form__consent-row {
        gap: 12px;
    }

    .consult-form__consent label.error {
        padding-left: 32px;
    }

    .consult-form__consent-text {
        font-size: 11px;
        font-weight: 400;
        line-height: 16px;
        white-space: normal !important;
    }

    .consult-form__promo-content {
        padding-right: 0;
    }

    .consult-form__form--success,
    .consult-form__success {
        min-height: 0;
    }

    .consult-form__success-icon {
        width: 80px;
        height: 80px;
    }

    .consult-form__success-icon svg {
        width: 40px;
        height: 40px;
    }

    .consult-form__success-title {
        font-size: 28px;
        line-height: 34px;
    }

    .consult-form__success-desc {
        font-size: 16px;
        line-height: 24px;
    }
}
