html, body {
    font-family: 'Poppins','Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIg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Y2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ── Splash branding ─────────────────────────────────────── */

:root {
    --splash-logo: url('../RytmiskCenterLogo.png');
    --splash-logo-ratio: 608 / 77;
    --splash-logo-filter: invert(1);
    --splash-logo-width: min(62vw, 42rem);
}

body.brand-generic {
    --splash-logo: url('../iQi_logo.png');
    --splash-logo-ratio: 290 / 116;
    --splash-logo-filter: brightness(0.9);
    --splash-logo-width: min(26vw, 17rem);
}

.loading-splash {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #17171d 0%, #0a0a0d 75%);
    transition: opacity 0.6s ease;
}

    .loading-splash.splash-hide {
        opacity: 0;
        pointer-events: none;
    }

    /* background glow that echoes in sync with the ripple rings */
    .loading-splash::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.32), transparent 72%);
        opacity: 0;
        will-change: opacity;
        animation: loading-echo 1.8s ease-out 0s 1;
        pointer-events: none;
    }

.loading-ripples {
    position: absolute;
    inset: 0;
}

    /* rings are kept small and GPU-scaled up (cheap compositor-only work,
       small texture) instead of pre-sizing a huge 160vmax layer.
       Centered with left/top:50% + translate(-50%,-50%): this stays centered
       even when the ring (60vmax) is larger than the shorter viewport side
       (e.g. a portrait-mounted screen), which the old inset+margin:auto trick
       did not — there the over-constrained margins pinned the ring to one edge
       and pushed its center off. The translate is baked into every keyframe so
       the animated scale doesn't disturb the centering. */
    .loading-ripples span {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 60vmax;
        height: 60vmax;
        border-radius: 50%;
        border: 4px solid rgba(255, 255, 255, 0.55);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.35), inset 0 0 30px rgba(255, 255, 255, 0.25);
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
        will-change: transform, opacity;
        /* Two rings rather than three, so each can still expand slowly inside
           the 2s splash floor in index.html: the second starts at 0.4s and
           runs 1.6s, landing exactly on 2s so nothing is still expanding when
           the fade-out begins. Fitting a third would force all of them below
           ~1.2s, which reads as frantic at this length. */
        animation: loading-ripple 1.6s cubic-bezier(0.16, 0.6, 0.4, 1) 0s forwards;
    }

        .loading-ripples span:nth-child(2) {
            border-color: rgba(255, 255, 255, 0.4);
            animation-delay: 0.4s;
        }

.loading-logo {
    position: relative;
    z-index: 1;
    width: var(--splash-logo-width);
    aspect-ratio: var(--splash-logo-ratio);
    will-change: transform, opacity;
    animation: loading-fade 0.5s ease-out both, loading-breathe 2.6s ease-in-out 0.6s infinite;
}

    .loading-logo-base,
    .loading-logo-fill {
        position: absolute;
        inset: 0;
    }

    .loading-logo-base {
        background: var(--splash-logo) center / contain no-repeat;
        filter: var(--splash-logo-filter);
        opacity: 0.15;
    }

    /* Progress wipe done with two opposing transforms instead of clip-path:
       the outer "window" slides right while the inner logo counter-slides,
       so the logo appears fixed and only the revealed area grows.
       transform animates on the compositor thread, so the wipe stays smooth
       even while the main thread is busy downloading/booting the app. */
    .loading-logo-fill {
        overflow: hidden;
        transform: translateX(calc(var(--blazor-load-percentage, 0%) - 100%));
        transition: transform 0.3s ease-out;
        will-change: transform;
    }

    .loading-logo-fill-img {
        position: absolute;
        inset: 0;
        background: var(--splash-logo) center / contain no-repeat;
        filter: var(--splash-logo-filter);
        transform: translateX(calc(100% - var(--blazor-load-percentage, 0%)));
        transition: transform 0.3s ease-out;
        will-change: transform;
    }

@keyframes loading-breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.035);
        opacity: 0.9;
    }
}

/* gentle fade-in with a slight grow as the logo materializes */
@keyframes loading-fade {
    0% {
        opacity: 0;
        transform: scale(0.94);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes loading-ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.9;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.8);
        opacity: 0;
    }
}

/* two decaying pulses, one per ripple ring */
@keyframes loading-echo {
    0% {
        opacity: 0;
    }

    11% {
        opacity: 1;
    }

    38% {
        opacity: 0.15;
    }

    57% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-logo {
        animation: none;
    }

    .loading-ripples span,
    .loading-splash::after {
        animation: none;
    }
}

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}