/* Styles for the entry page (wasm/shell/index.html.in), in a file of its own so
   that the page needs neither a <style> block nor a style attribute and the
   deployment can serve style-src 'self' with no 'unsafe-inline'. */

/* The window colour of the client, so the page does not flash white before the
   first frame is painted. */
html,
body {
    padding: 0;
    margin: 0;
    overflow: hidden;
    height: 100%;
    background: #050208;
}

#screen {
    width: 100%;
    height: 100%;
}

#screen.hidden {
    display: none;
}

#boot {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    font: 400 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #cbb7d8;
    text-align: center;
}

#boot.hidden {
    display: none;
}

#boot .panel {
    width: min(360px, 78vw);
}

#boot img {
    width: 100%;
    height: auto;
    margin-bottom: 28px;
}

#track {
    height: 3px;
    border-radius: 2px;
    background: #241430;
    overflow: hidden;
}

#bar {
    height: 100%;
    width: 30%;
    border-radius: 2px;
    background: #d33a5e;
    animation: slide 1.4s ease-in-out infinite;
}

@keyframes slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(333%);
    }
}

#boot p {
    margin: 18px 0 0;
}

#boot button {
    margin-top: 20px;
    padding: 10px 26px;
    border: 0;
    border-radius: 6px;
    background: #236b31;
    color: #fff6dc;
    font: 700 14px system-ui, sans-serif;
    cursor: pointer;
}

.failed #bar {
    animation: none;
    width: 100%;
    background: #b03030;
}

/* Both explanations are in the markup and neither is shown until boot.js says
   which one is true, so the panel can never flash the wrong reason. */
