.registration-loading-overlay[hidden],
.registration-loading-messages[hidden] {
    display: none;
}

.myfirm-registration-page,
.myfirm-auth-page,
.public-main__inner > .panel,
.registration-loading-card {
    --myfirm-font-family: Heebo, "Segoe UI", Arial, sans-serif;
    font-family: var(--myfirm-font-family);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.myfirm-registration-page :where(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    label,
    small,
    a,
    button,
    input,
    .btn
),
.myfirm-auth-page :where(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    label,
    small,
    a,
    button,
    input,
    .btn
),
.public-main__inner > .panel :where(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    label,
    small,
    a,
    button,
    input,
    .btn
),
.registration-loading-card :where(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    button
) {
    font-family: var(--myfirm-font-family);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.public-main__inner > .panel .registration-form .btn[type="submit"],
.myfirm-auth-page .btn {
    font-family: var(--myfirm-font-family);
}

body.registration-loading-active {
    overflow: hidden;
}

.registration-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(17, 24, 39, 0.78);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.registration-loading-card {
    width: min(100%, 460px);
    border: 1px solid rgba(201, 162, 39, 0.38);
    border-radius: 14px;
    padding: 32px;
    background: var(--surface, #fff);
    color: var(--text, #111827);
    box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.72);
    text-align: center;
    outline: none;
}

.registration-loading-card:focus-visible {
    outline: 3px solid rgba(201, 162, 39, 0.58);
    outline-offset: 4px;
}

.registration-loading-indicator {
    display: block;
    width: 52px;
    height: 52px;
    margin: 0 auto 20px;
    border: 5px solid rgba(30, 42, 58, 0.16);
    border-top-color: var(--gold, #c9a227);
    border-radius: 50%;
    animation: registration-loading-spin 0.9s linear infinite;
}

.registration-loading-card h2 {
    margin: 0;
    color: var(--navy, #1e2a3a);
    font-size: 1.45rem;
    line-height: 1.35;
}

.registration-loading-description {
    margin: 10px 0 0;
    color: var(--muted, #4b5563);
    font-size: 0.95rem;
}

.registration-loading-status {
    min-height: 1.6em;
    margin: 24px 0 12px;
    color: var(--navy, #1e2a3a);
    font-size: 1.05rem;
    font-weight: 700;
}

.registration-loading-progress {
    direction: ltr;
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.16);
    overflow: hidden;
}

.registration-loading-progress__value {
    display: block;
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold, #c9a227), #e1bd48);
    transition: width 450ms ease-out;
}

.registration-loading-percentage {
    margin: 10px 0 0;
    color: var(--navy, #1e2a3a);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.registration-loading-percentage__label {
    color: var(--muted, #4b5563);
    font-size: 0.86rem;
    font-weight: 600;
}

@keyframes registration-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .registration-loading-overlay {
        padding: 16px;
    }

    .registration-loading-card {
        padding: 26px 20px;
    }

    .registration-loading-card h2 {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .registration-loading-indicator {
        animation: none;
        border-color: rgba(30, 42, 58, 0.16);
        border-top-color: var(--gold, #c9a227);
    }

    .registration-loading-progress__value {
        transition: none;
    }
}
