/* HTML styles for the splash screen */
.device-warning {
    position: fixed;
    z-index: 2147483646;
    inset: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(5, 20, 38, .92);
    color: white;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.device-warning[hidden] { display: none; }

.device-warning-card {
    width: min(34rem, 100%);
    box-sizing: border-box;
    padding: 1.4rem;
    border: 1px solid #76b9e6;
    border-radius: .75rem;
    background: #102d4d;
    box-shadow: 0 .6rem 2rem rgba(0, 0, 0, .45);
}

.device-warning-card h1 {
    margin: 0 0 .9rem;
    font-size: 1.45rem;
    line-height: 1.2;
}

.device-warning-card p {
    margin: .65rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.device-warning-card button {
    display: block;
    width: 100%;
    margin-top: 1.2rem;
    padding: .75rem 1rem;
    border: 0;
    border-radius: .4rem;
    background: #2387bd;
    color: white;
    font: 600 1rem system-ui, sans-serif;
    cursor: pointer;
}

.device-warning-card button:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}

.avalonia-splash {
    position: absolute;
    height: 100%;
    width: 100%;
    background: white;
    font-family: 'Outfit', sans-serif;
    justify-content: center;
    align-items: center;
    display: flex;
    pointer-events: none;
}

.splash-content {
    width: min(32rem, 80vw);
    text-align: center;
}

.progress-track {
    height: .45rem;
    overflow: hidden;
    border-radius: 1rem;
    background: #ccd3df;
}

.progress-bar {
    width: 35%;
    height: 100%;
    border-radius: inherit;
    background: #2387bd;
    animation: loading 1.2s ease-in-out infinite;
}

#loading-status { margin: 1rem 0 .25rem; }
#loading-detail { margin: 0; opacity: .75; font-size: .9rem; }

@keyframes loading {
    from { transform: translateX(-110%); }
    to { transform: translateX(320%); }
}

/* Light theme styles */
@media (prefers-color-scheme: light) {
    .avalonia-splash {
        background: white;
    }

    .avalonia-splash h2 {
        color: #1b2a4e;
    }

    .avalonia-splash p { color: #1b2a4e; }

    .avalonia-splash a {
        color: #0D6EFD;
    }
}

@media (prefers-color-scheme: dark) {
    .avalonia-splash {
        background: #1b2a4e;
    }

    .avalonia-splash h2 {
        color: white;
    }

    .avalonia-splash p { color: white; }

    .avalonia-splash a {
        color: white;
    }
}

.avalonia-splash h2 {
    font-weight: 400;
    font-size: 1.5rem;
}

.avalonia-splash a {
    text-decoration: none;
    font-size: 2.5rem;
    display: block;   
}

.avalonia-splash.splash-close {
    transition: opacity 200ms, display 200ms;
    display: none;
    opacity: 0;
}

#runtime-error-banner {
    position: fixed;
    z-index: 2147483647;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    box-sizing: border-box;
    padding: .8rem 1rem;
    border: 2px solid #b3261e;
    border-radius: .4rem;
    background: #fff4f2;
    color: #5f1410;
    font: 16px/1.35 system-ui, sans-serif;
    box-shadow: 0 .2rem 1rem rgba(0, 0, 0, .28);
}

#runtime-error-banner button {
    float: right;
    margin-left: 1rem;
    border: 1px solid #7d1b15;
    border-radius: .25rem;
    padding: .25rem .65rem;
    background: white;
    color: #5f1410;
    cursor: pointer;
}
