/* Shared by the pre-bootstrap screen and the Angular MOL authentication screen. */
.mol-loading-screen,
html.is-mol-app #app-loader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: clamp(64px, 14vh, 148px) 16px 16px;
    overflow: auto;
    background: #f6f6f6;
    color: #00005f;
    text-align: center;
    font-family: Arial, sans-serif;
}

.mol-loading-screen::before,
html.is-mol-app #app-loader::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    width: 100%;
    height: clamp(64px, 14vh, 148px);
    background: url('./header.svg') center top / 100% 100% no-repeat;
    border-radius: 0;
    opacity: 1;
    animation: none;
    pointer-events: none;
}

html.is-mol-app #app-loader::after,
html.is-mol-app #app-loader .app-loader__logo {
    display: none;
}

.mol-loader-content {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

html:not(.is-mol-app) #app-loader .mol-loader-content {
    display: none;
}

.mol-loader-artwork {
    position: relative;
    width: min(90vw, 440px, 62vh);
    aspect-ratio: 1.14;
    overflow: hidden;
    flex: 0 0 auto;
    animation: mol-loader-pulse 3s ease-in-out infinite;
}

.mol-loader-artwork img {
    position: absolute;
    top: -26%;
    left: 0;
    width: 100%;
    height: auto;
}

.mol-loader-spinner {
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    margin-top: 20px;
    border: 3px solid #dadae8;
    border-top-color: #00005f;
    border-radius: 50%;
    animation: mol-loader-spin 0.9s linear infinite;
}

.mol-loader-spinner--stopped {
    visibility: hidden;
    animation: none;
}

.mol-loader-status {
    box-sizing: border-box;
    min-height: 72px;
    max-width: 360px;
    margin: 0;
    padding: 16px 8px 0;
    font-size: 16px;
    line-height: 24px;
    color: #00005f;
}

.mol-loader-status--error {
    color: #b42318;
}

.mol-loading-screen--error {
    justify-content: flex-start;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
}

.mol-loading-screen--error .mol-loader-content {
    min-height: 100%;
}

.mol-loading-screen--error .mol-loader-artwork {
    width: min(100vw, 440px, 62vh);
}

.mol-loader-error {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 269px;
    margin-top: -1px;
    padding: 28px 32px max(24px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: #f6f6f6;
}

.mol-loader-error__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mol-loader-error h1,
.mol-loader-error p {
    margin: 0;
}

.mol-loader-error h1 {
    color: #00005f;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.mol-loader-error p {
    max-width: 350px;
    color: #5a5f73;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.mol-loader-error button {
    width: 100%;
    min-height: 56px;
    padding: 0 24px;
    border: 0;
    border-radius: 28px;
    background: linear-gradient(180deg, #ff9a1f 0%, #f07c00 100%);
    box-shadow: 0 8px 20px rgba(240, 124, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.mol-loader-error button:active {
    transform: scale(0.98);
}

@keyframes mol-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes mol-loader-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.025);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mol-loader-artwork,
    .mol-loader-spinner {
        animation: none;
    }
}
