/* ══════════════════════════════════════════════════════════════
   LoaderCurtain — non-interactive overlay shown while a long
   operation is in flight.

   Visual: a very faint cream wash (15%) over the canvas plus a
   small ink-bordered card at centre (spinner + label). The wash
   dims the scene but lab chrome (step bar, widget bar, time
   control, restart) stays bright and clickable so the student
   can still read the instruction or bail.

   Stacking — wash and card are split into two siblings so each
   sits at its own layer:
     .lc-wash  z-index 55  — above scene content (≤50),
                             below chrome (≥60)
     .lc-card  z-index 95  — above step-bar (90) and camera (90),
                             below loading-screen (100) and modal

   Trigger policy lives in SimulationBusyHandler, which binds
   show()/hide() to the simulate-request / simulate-response /
   simulate-fail DOM events bridged off the sealed engine in
   GalileoWrapper/js/main.js. Ref: GALILEO-225.
   ══════════════════════════════════════════════════════════════ */

.loader-curtain {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.loader-curtain[hidden] {
    display: none;
}

.lc-wash {
    position: absolute;
    inset: 0;
    z-index: 55;
    background: rgba(244, 241, 225, 0.15);
    pointer-events: auto;
    opacity: 1;
    transition: opacity 250ms ease-out;
}

.loader-curtain.is-fading .lc-wash,
.loader-curtain.is-fading .lc-card {
    opacity: 0;
    pointer-events: none;
}

.lc-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 95;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 220px;
    padding: 22px 28px 20px;
    background: var(--color-surface);
    border: 2px solid var(--color-text);
    border-radius: 6px;
    box-shadow: 4px 4px 0 rgba(26, 26, 26, 0.18);
    pointer-events: auto;
    opacity: 1;
    transition: opacity 250ms ease-out;
}

.lc-spinner {
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-text);
    border-radius: 50%;
    animation: lc-spin 0.8s linear infinite;
}

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

.lc-label {
    margin: 0;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
    text-align: center;
}

.lc-sub {
    margin: 6px 0 0;
    font-family: var(--font-family);
    font-size: 12px;
    color: var(--color-text-tertiary);
    text-align: center;
}

.lc-sub[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .lc-spinner { animation-duration: 1.6s; }
    .loader-curtain { transition: none; }
}
