/* AB#3283: the loading page wears the app's èggo typeface — Avenir (Assets/Resources/Fonts/Avenir) — and
   the light Eggo V3 tokens (Assets/UI Toolkit/UnityThemes/SkiderThemeEggoV3.uss); sizes are read off the
   card's reference (01-Loading.png, a 2x capture). */
@font-face {
    font-family: "Avenir";
    src: url("fonts/Avenir-Regular.woff") format("woff");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Avenir";
    src: url("fonts/Avenir-Medium.woff") format("woff");
    font-weight: 500;
    font-display: swap;
}
:root {
    --loader-surface: rgb(230, 229, 225);          /* --Layer1 */
    --loader-ink: rgb(44, 40, 1);                  /* --FontAndIcons */
    /* --FontAndIconsUnactive (0.55) reads 3.3:1 here, under the 4.5:1 text floor (skider-ui-guideline.md §3);
       0.7 is the same ink at 5.0:1 or better across the gradient. */
    --loader-ink-muted: rgba(44, 40, 1, 0.7);
    --loader-fill: #E75112;                        /* brand orange, the bar's fill since the first loader */
    --loader-font-size: 13px;    /* the reference's ink: 13.5 px tall, "Preparing your 3D showroom… 45%" 212 px wide */
    --loader-column-width: 278px; /* the reference's logo and bar width */
    --loader-bar-height: 4px;
    --loader-bar-inset: 1px;      /* the fill sits this far inside the track on every side (Gleb, #5379753) */
}
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}
html, body {
    height: 100%;
}
canvas {
    display: block;
}
body {
    margin: 0;
    background: #ffffff; /* Set page background to white */
}
#unity-container {
    width: 100%;
    height: 100%;
}
#unity-canvas {
    width: 100%;
    height: 100%;
    /* Force white background instead of templated color */
    background: #ffffff;
}
#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgb(240, 239, 235), var(--loader-surface));
    font-family: "Avenir", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
    font-size: var(--loader-font-size);
    line-height: 1.3;
    color: var(--loader-ink);
}
#unity-loading-bar {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 16px;
}
#unity-logo {
    width: 100%;
    max-width: var(--loader-column-width);
    margin: 0 auto 8px auto; /* center and small gap below */
    text-align: center;
}
#unity-logo img {
    width: 100%;
    height: auto;
    display: block;
}
#loading-progress {
    position: relative;
    width: 100%;
    max-width: var(--loader-column-width); /* the bar is as wide as the logo */
    margin-top: 4px;
}
#loading-message {
    font-weight: 500;
}
#loading-percent {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
#unity-progress-bar-empty {
    width: 100%;
    height: var(--loader-bar-height); /* AB#3283: thinner, as the reference */
    margin: 5px 0 0 0;
    text-align: left;
    background: var(--loader-ink); /* Dark track */
    padding: var(--loader-bar-inset);
    border-radius: calc(var(--loader-bar-height) / 2); /* semicircle ends */
}
#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    /* never narrower than tall, so just above 0% the fill is a round cap, not a sliver */
    min-width: calc(var(--loader-bar-height) - 2 * var(--loader-bar-inset));
    background: var(--loader-fill); /* Brand orange */
    border-radius: calc((var(--loader-bar-height) - 2 * var(--loader-bar-inset)) / 2); /* semicircle ends */
    transition: width 0.25s ease; /* Smooth growth */
}
/* Keep same appearance in light mode */
.light #unity-progress-bar-full { background: var(--loader-fill); }

/* The tip hangs below the bar, so a longer tip never pushes the logo, message or bar. */
#loading-tip {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    max-width: 320px; /* wraps the first tip where the reference does */
    margin: 20px auto 0 auto;
    text-align: center;
    color: var(--loader-ink-muted);
    transition: opacity 0.4s ease;
}

#unity-fullscreen-button {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    background: url('fullscreen-button.png') no-repeat center;
    background-size: contain;
}

/* Shown over the bar's slot until the loader reports its first progress. */
.spinner,
.spinner:after {
  border-radius: 50%;
  width: 1.4em;
  height: 1.4em;
}
.spinner {
  font-size: 10px;
  position: absolute;
  left: 50%;
  bottom: -5px;
  margin-left: -0.7em;
  text-indent: -9999em;
  border-top: 0.3em solid rgba(44, 40, 1, 0.15);
  border-right: 0.3em solid rgba(44, 40, 1, 0.15);
  border-bottom: 0.3em solid rgba(44, 40, 1, 0.15);
  border-left: 0.3em solid var(--loader-fill);
  transform: translateZ(0);
  animation: spinner-spin 1.1s infinite linear;
}
@keyframes spinner-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


