.access-restricted-message {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    max-width: 1076px;
    margin: 24px auto 38px;
    gap: 24px;
}

.access-restricted-message > div {
    flex: 1 1 calc(50% - 12px);
    min-width: 0;
    background: #e1ecf6;
}

.mobile-login-card {
    display: none;
}

.login-forms-placeholder {
    display: none !important;
}

body:has(.access-restricted-message).node-ru .modal,
body:has(.access-restricted-message).node-kk .modal {
    background-color: transparent;
}

body:has(.access-restricted-message) h1.page-header {
    margin: 0;
    padding: 0;
    color: #00c8f0 !important;
    font-family: 'OpenSans-Bold', sans-serif;
    font-size: 40px;
    line-height: 1.4;
    font-weight: 700;
}

body:has(.access-restricted-message) .field.field--type-text-with-summary.field--label-hidden.field--item > p:has(> a[href*="oficialnoe-uvedomlenie"]),
body:has(.access-restricted-message) .field.field--type-text-with-summary.field--label-hidden.field--item > p:has(> a[href*="resmi-khabarlama"]),
body:has(.access-restricted-message) #block-webform {
    display: none;
}

.access-restricted-message .restrict-register {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 21px;
    padding: 40px;
}

.access-restricted-message .restrict-register > div:first-child {
    width: 84px;
    height: 84px;
    flex: 0 0 auto;
}

.access-restricted-message .restrict-register img {
    display: block;
    width: 84px;
    height: 84px;
}

.access-restricted-message .restrict-register p.title {
    margin: 0;
    color: #004d98;
    font-family: 'OpenSans-Bold', sans-serif;
    font-size: 20px;
    line-height: 1.4;
}

.access-restricted-message .restrict-register .description {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 17px 0 0;
}

.access-restricted-message .restrict-register .description p {
    margin: 0;
    color: #004d98;
    font-family: 'OpenSans-Regular', sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

.access-restricted-message .login-forms-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 16px 55px;
}

.access-restricted-message .login-forms-intro,
.restricted-login-modal .login-forms-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 353px;
    margin: 0 0 20px;
    text-align: center;
}

.access-restricted-message .login-forms-title,
body.node-ru .restricted-login-modal .modal-body p.login-forms-title,
body.node-kk .restricted-login-modal .modal-body p.login-forms-title {
    max-width: none;
    margin: 0 0 20px;
    color: #004d98;
    font-family: 'OpenSans-Bold', sans-serif;
    font-size: 18px;
    line-height: 1.4;
}

.access-restricted-message .login-forms-intro img,
.restricted-login-modal .login-forms-intro img {
    display: block;
    width: 60px;
    height: 58px;
    margin: 0 0 13px;
}

.access-restricted-message .login-forms-brand,
body.node-ru .restricted-login-modal .modal-body p.login-forms-brand,
body.node-kk .restricted-login-modal .modal-body p.login-forms-brand {
    max-width: none;
    margin: 0 0 20px;
    color: #004d98;
    font-family: 'OpenSans-Regular', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    text-transform: uppercase;
}

.access-restricted-message .login-forms-subtitle,
body.node-ru .restricted-login-modal .modal-body p.login-forms-subtitle,
body.node-kk .restricted-login-modal .modal-body p.login-forms-subtitle {
    max-width: 237px;
    margin: 0;
    color: #00c8f0;
    font-family: 'OpenSans-Regular', sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.login-forms-body .user-login-form,
.login-forms-body .openid-connect-login-form {
    width: 100%;
    max-width: 320px;
    margin: 0;
}

.login-forms-body .user-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-forms-body .openid-connect-login-form {
    margin-top: 20px;
}

.login-forms-body .form-item,
.login-forms-body .form-group,
.login-forms-body .form-actions,
.login-forms-body .openid-connect-login-form > div {
    margin: 0;
}

.login-forms-body label.control-label.js-form-required.form-required {
    display: block;
    margin: 0 0 8px;
    color: #004d98;
    font-family: 'OpenSans-Bold', sans-serif !important;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
}

.access-restricted-message .login-forms-body label.control-label.js-form-required.form-required::after,
.restricted-login-modal .login-forms-body label.control-label.js-form-required.form-required::after {
    display: inline-block;
    content: "*";
    margin-left: 4px;
    color: #f5333f;
    font-size: 14px;
    line-height: 1;
    vertical-align: top;
    background: none;
}

.login-forms-body input.form-control {
    width: 100%;
    height: 44px !important;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff !important;
    box-shadow: none;
    color: #004d98;
    font-family: 'OpenSans-Regular', sans-serif !important;
    font-size: 16px;
    line-height: 1.4;
}

.login-forms-body input.form-control:focus {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: #cbd5e1;
    box-shadow: none;
}

.login-forms-body input.form-control:active {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.login-forms-body input.form-control:-webkit-autofill,
.login-forms-body input.form-control:-webkit-autofill:hover,
.login-forms-body input.form-control:-webkit-autofill:focus,
.login-forms-body input.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #004d98;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    box-shadow: 0 0 0 1000px #ffffff inset;
    background-color: #ffffff !important;
    transition: background-color 9999s ease-out 0s;
}

.login-forms-body button#edit-submit,
.login-forms-body button#edit-openid-connect-client-azure-ad-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px !important;
    margin: 0 !important;
    padding: 13px 20px;
    border: 0;
    border-radius: 0;
    background: #f5333f;
    box-shadow: none;
    color: #ffffff;
    font-family: 'OpenSans-Bold', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    text-transform: uppercase;
}

.login-forms-body button#edit-submit .glyphicon,
.login-forms-body button#edit-openid-connect-client-azure-ad-login .glyphicon {
    display: none;
}

@media all and (max-width: 768px) {
    body:has(.access-restricted-message).node-ru.hcp-article .region.region-content,
    body:has(.access-restricted-message).node-kk.hcp-article .region.region-content {
        margin-top: 30px;
    }

    body:has(.access-restricted-message) h1.page-header {
        font-family: 'OpenSans-Bold', sans-serif;
        font-size: 28px;
        line-height: 38px;
        letter-spacing: 0;
        text-align: center;
    }

    body:has(.access-restricted-message) .main-container.container.js-quickedit-main-content > .row {
        margin-right: 20px;
        margin-left: 20px;
    }

    .mobile-login-card {
        display: flex;
        align-items: center;
        width: 100%;
        max-width: 100%;
        min-height: 120px;
        margin: 30px auto 20px;
        padding: 31px 20px;
        gap: 20px;
        border: 0;
        background: #e1ecf6;
        color: #004d98;
        text-align: left;
        cursor: pointer;
    }

    .mobile-login-card img {
        display: block;
        width: 58px;
        height: 58px;
        flex: 0 0 auto;
    }

    .mobile-login-card span {
        display: block;
        max-width: 204px;
        color: #004d98;
        font-family: 'OpenSans-Bold', sans-serif;
        font-size: 18px;
        line-height: 1.4;
    }

    .access-restricted-message {
        flex-direction: column;
        gap: 20px;
    }

    .access-restricted-message > div {
        flex-basis: auto;
    }

    .access-restricted-message .login-forms-wrapper {
        display: none;
    }

    .access-restricted-message .restrict-register {
        gap: 24px;
        padding: 32px 24px;
    }

    .access-restricted-message .restrict-register p.title {
        font-size: 18px;
    }

    .restricted-login-modal .modal-dialog.restricted-login-modal-dialog {
        width: min(340px, calc(100% - 40px));
        max-width: 400px;
        margin: 24px auto;
        transform: none !important;
    }

    .restricted-login-modal .restricted-login-modal-content.modal-content {
        overflow: hidden;
        border: 0;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .restricted-login-modal-backdrop {
        background: transparent;
        opacity: 0;
    }

    .restricted-login-modal .modal-header {
        position: absolute;
        z-index: 2;
        top: 0;
        right: 0;
        width: 100%;
        height: 0;
        padding: 0;
        border: 0;
        min-height: 0;
    }

    .restricted-login-modal .close {
        position: absolute;
        z-index: 99999;
        top: 18px;
        right: 18px;
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 9px;
        border: 1px solid #d7d7d7;
        border-radius: 50%;
        background: transparent;
        color: transparent;
        opacity: 1;
        font-size: 0;
        line-height: 0;
        text-shadow: none;
    }

    .restricted-login-modal .close span {
        display: none;
    }

    .restricted-login-modal .close::before,
    .restricted-login-modal .close::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 1px;
        height: 23px;
        background: #f5333f;
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .restricted-login-modal .close::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    .restricted-login-modal .restricted-login-modal-body.modal-body {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 70px 20px 35px;
        background: #ffffff;
        text-align: left;
    }

    body.node-ru .restricted-login-modal .modal-body p,
    body.node-kk .restricted-login-modal .modal-body p {
        max-width: none;
    }

    .restricted-login-modal .restricted-login-modal-intro {
        order: 1;
        margin: 0 0 20px;
    }

    .restricted-login-modal .restricted-login-modal-form-slot {
        order: 2;
        width: 100%;
    }

    .restricted-login-modal .login-forms-body {
        width: 100%;
    }

    .restricted-login-modal .login-forms-body .user-login-form,
    .restricted-login-modal .login-forms-body .openid-connect-login-form {
        max-width: none;
    }
}

@media all and (min-width: 769px) and (max-width: 991px) {
    .access-restricted-message {
        flex-direction: column;
        gap: 20px;
    }

    .access-restricted-message > div {
        flex-basis: auto;
    }

    .access-restricted-message .restrict-register {
        gap: 24px;
        padding: 40px 20px;
    }

    .access-restricted-message .login-forms-wrapper {
        padding: 40px 20px;
    }
}

@media all and (min-width: 992px) and (max-width: 1200px) {
    .access-restricted-message {
        gap: 16px;
    }

    .access-restricted-message .restrict-register {
        padding: 40px 20px;
    }

    .access-restricted-message .login-forms-wrapper {
        padding: 40px 20px;
    }
}

@media screen and (min-width: 1400px) {
    body.hcp-article:has(.access-restricted-message) .main-container.container.js-quickedit-main-content {
        max-width: 1076px;
    }
}
