[data-nha-flow] .switch-links {
    display: inline-flex;
    background: var(--primary-color);
    border-radius: 7.6rem;
    padding: 4px;
    gap: 4px;
}

[data-nha-flow] .switch-links__item {
    padding: 8px 16px;
    border-radius: 7.6rem;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #e5e7eb;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

[data-nha-flow] .switch-links__item:hover {
    background: #353535;
}

[data-nha-flow] .switch-links__item.is-active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

[data-nha-flow] .nha-panel,
.login [data-nha-step],
.nha-binding-modal [data-nha-step] {
    display: none;
}

[data-nha-flow] .nha-panel.is-active,
.login [data-nha-step].is-active,
.nha-binding-modal [data-nha-step].is-active {
    display: block;
}

[data-nha-flow] .nha-form-error {
    min-height: 18px;
    margin: 6px 0 10px;
    color: #b42318;
    font-size: 13px;
    line-height: 1.35;
}

[data-nha-flow] .input.is-invalid {
    border-color: #b42318;
}

[data-nha-flow] .nha-link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

[data-nha-flow].login.is-loading {
    pointer-events: none;
}

[data-nha-flow].login .login-form__button .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

[data-nha-flow].login .popup-form__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: nha-auth-spin .8s linear infinite;
}

[data-nha-flow].login.is-loading [data-nha-panel].is-active [data-nha-step].is-active .login-form__button .button {
    opacity: .76;
}

[data-nha-flow].login.is-loading [data-nha-panel].is-active [data-nha-step].is-active .popup-form__spinner {
    display: inline-block;
}

html.nha-binding-lock,
body.nha-binding-lock {
    overflow: hidden;
}

.nha-binding-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.nha-binding-modal.is-hidden {
    display: none;
}

.nha-binding-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .68);
}

.nha-binding-modal__content {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.nha-binding-modal .popup-form {
    padding: 32px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .22);
}

.nha-binding-modal .popup-form__header {
    margin-bottom: 22px;
}

.nha-binding-modal .popup-form__title {
    margin: 0;
    color: #111827;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 600;
}

.nha-binding-modal .popup-form .switch-links {
    margin-bottom: 20px;
    background: #111827;
}

.nha-binding-modal .popup-form__form {
    margin: 0;
}

.nha-binding-modal .popup-form__field {
    margin-bottom: 12px;
}

.nha-binding-modal .popup-form__field input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.nha-binding-modal .popup-form__field input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 125, 50, .14);
}

.nha-binding-modal .popup-form__submit {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
}

.nha-binding-modal .popup-form__submit:hover {
    background: #353535;
}

.nha-binding-modal .popup-form__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: nha-auth-spin .8s linear infinite;
}

.nha-binding-modal.is-loading .popup-form__submit {
    pointer-events: none;
    opacity: .76;
}

.nha-binding-modal.is-loading .popup-form__spinner {
    display: inline-block;
}

.nha-binding-modal .popup-form__success {
    text-align: center;
}

.nha-binding-modal .popup-form__success-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #e8f5e9;
    color: var(--primary-color);
}

.nha-binding-modal .popup-form__success-icon svg {
    width: 30px;
    height: 30px;
    fill: none !important;
}

.nha-binding-modal .popup-form__success-text {
    margin: 0;
    color: #111827;
    font-size: 17px;
    line-height: 1.45;
}

.nha-binding-modal .popup-form__success-close {
    margin-top: 22px;
}

@keyframes nha-auth-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 560px) {
    .nha-binding-modal {
        padding: 12px;
    }

    .nha-binding-modal .popup-form {
        padding: 24px 18px;
    }

    .nha-binding-modal .popup-form__title {
        font-size: 20px;
    }

    .nha-binding-modal .switch-links {
        width: 100%;
    }

    .nha-binding-modal .switch-links__item {
        flex: 1 1 0;
        padding: 8px 10px;
        text-align: center;
    }
}
