.academy-consent-switch.checkbox {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    gap: 14px;
    justify-content: center;
    line-height: 1.35;
    margin-inline: auto;
    max-width: 100%;
    padding: 0;
    position: relative;
    width: fit-content;
}

.academy-consent-switch .checkbox__field {
    height: 28px;
    left: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    z-index: 2;
}

.academy-consent-switch .checkbox__rect,
.academy-consent-switch.checkbox--outlined .checkbox__rect {
    background: #dbe6f2;
    border: 1px solid #8ca7c8;
    border-radius: 999px;
    box-sizing: border-box;
    flex: 0 0 50px;
    height: 28px;
    left: auto;
    position: relative;
    top: auto;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    width: 50px;
}

.academy-consent-switch .checkbox__rect::before {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(25, 49, 81, .22);
    height: 20px;
    left: 3px;
    opacity: 1;
    top: 3px;
    transform: none;
    transition: transform .2s ease;
    width: 20px;
}

.academy-consent-switch .checkbox__text {
    display: block;
    font-size: 15px;
    line-height: 1.4;
    padding: 0;
}

.academy-consent-switch .checkbox__field:hover:not(:disabled) ~ .checkbox__rect,
.academy-consent-switch.checkbox--outlined .checkbox__field:hover:not(:disabled) ~ .checkbox__rect {
    background: #cfddeb;
    border-color: #6f91ba;
}

.academy-consent-switch .checkbox__field:focus-visible ~ .checkbox__rect {
    box-shadow: 0 0 0 3px rgba(71, 109, 168, .2);
}

.academy-consent-switch .checkbox__field:checked ~ .checkbox__rect,
.academy-consent-switch.checkbox--outlined .checkbox__field:checked ~ .checkbox__rect {
    background: #476da8;
    border-color: #476da8;
}

.academy-consent-switch .checkbox__field:checked ~ .checkbox__rect::before {
    transform: translateX(22px);
}

.academy-consent-switch .checkbox__field.invalid ~ .checkbox__rect,
.academy-consent-switch .checkbox__field.academy-field-invalid ~ .checkbox__rect {
    border-color: #8ca7c8 !important;
    box-shadow: none !important;
}

.academy-consent-switch .checkbox__field.invalid ~ .checkbox__text,
.academy-consent-switch .checkbox__field.invalid ~ .checkbox__text a,
.academy-consent-switch .checkbox__field.is-invalid ~ .checkbox__text,
.academy-consent-switch .checkbox__field.is-invalid ~ .checkbox__text a,
.academy-consent-switch .checkbox__field.academy-field-invalid ~ .checkbox__text,
.academy-consent-switch .checkbox__field.academy-field-invalid ~ .checkbox__text a {
    color: inherit !important;
    text-decoration-color: #d04a59 !important;
    text-decoration-line: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 4px;
}

.academy-consent-switch:not(.checkbox) {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    gap: 14px;
    justify-content: center;
    line-height: 1.4;
    margin-inline: auto;
    max-width: 100%;
    position: relative;
    width: fit-content;
}

.academy-consent-switch {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
}

.academy-consent-switch:not(.checkbox) > input[type="checkbox"] {
    height: 28px;
    left: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    z-index: 2;
}

.academy-consent-switch:not(.checkbox) > .academy-consent-switch__control {
    background: #dbe6f2;
    border: 1px solid #8ca7c8;
    border-radius: 999px;
    box-sizing: border-box;
    flex: 0 0 50px;
    height: 28px;
    position: relative;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    width: 50px;
}

.academy-consent-switch:not(.checkbox) > .academy-consent-switch__control::before {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(25, 49, 81, .22);
    content: '';
    height: 20px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform .2s ease;
    width: 20px;
}

.academy-consent-switch:not(.checkbox) > input[type="checkbox"]:hover:not(:disabled) + .academy-consent-switch__control {
    background: #cfddeb;
    border-color: #6f91ba;
}

.academy-consent-switch:not(.checkbox) > input[type="checkbox"]:focus-visible + .academy-consent-switch__control {
    box-shadow: 0 0 0 3px rgba(71, 109, 168, .2);
}

.academy-consent-switch:not(.checkbox) > input[type="checkbox"]:checked + .academy-consent-switch__control {
    background: #476da8 !important;
    border-color: #476da8 !important;
}

.academy-consent-switch:not(.checkbox) > input[type="checkbox"]:checked + .academy-consent-switch__control::before {
    transform: translateX(22px);
}

.academy-consent-switch:not(.checkbox) > input[type="checkbox"].invalid + .academy-consent-switch__control,
.academy-consent-switch:not(.checkbox) > input[type="checkbox"].is-invalid + .academy-consent-switch__control,
.academy-consent-switch:not(.checkbox) > input[type="checkbox"].academy-field-invalid + .academy-consent-switch__control {
    border-color: #8ca7c8 !important;
    box-shadow: none !important;
}

.academy-consent-switch:not(.checkbox) > input[type="checkbox"].invalid ~ span:not(.academy-consent-switch__control),
.academy-consent-switch:not(.checkbox) > input[type="checkbox"].invalid ~ span a,
.academy-consent-switch:not(.checkbox) > input[type="checkbox"].is-invalid ~ span:not(.academy-consent-switch__control),
.academy-consent-switch:not(.checkbox) > input[type="checkbox"].is-invalid ~ span a,
.academy-consent-switch:not(.checkbox) > input[type="checkbox"].academy-field-invalid ~ span:not(.academy-consent-switch__control),
.academy-consent-switch:not(.checkbox) > input[type="checkbox"].academy-field-invalid ~ span a {
    color: inherit !important;
    text-decoration-color: #d04a59 !important;
    text-decoration-line: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 4px;
}

.academy-field-invalid:not([type="checkbox"]),
form input.is-invalid:not([type="checkbox"]),
form select.is-invalid,
form textarea.is-invalid,
.js-validate .academy-field-invalid:not([type="checkbox"]),
.js-validate-custom .academy-field-invalid:not([type="checkbox"]),
.footer-appointment-standard .bitrix-appointment .academy-field-invalid:not([type="checkbox"]),
.footer-appointment-standard .bitrix-appointment .input.is-invalid {
    border: 1px solid #d04a59 !important;
    box-shadow: inset 0 0 0 1px #d04a59 !important;
}

.academy-consent-switch,
.academy-consent-switch.is-invalid,
.academy-consent-switch > input[type="checkbox"] {
    border: 0 !important;
    box-shadow: none !important;
    outline: 0;
}

.academy-field-invalid::placeholder,
.footer-appointment-standard .bitrix-appointment .academy-field-invalid::placeholder {
    color: #ffe2e5 !important;
    opacity: 1;
}

@media (max-width: 767px) {
    .academy-consent-switch.checkbox {
        align-items: flex-start;
        gap: 12px;
    }

    .academy-consent-switch:not(.checkbox) {
        align-items: flex-start;
        gap: 12px;
    }

    .academy-consent-switch .checkbox__field {
        top: 14px;
    }

    .academy-consent-switch .checkbox__text {
        font-size: 14px;
    }

    .academy-consent-switch:not(.checkbox) > input[type="checkbox"] {
        top: 14px;
    }
}
