/* The CUBES waiting cube in 3D, one animation per thing CUBES waits on (PDT 2026-11-16, mock WL83APD7ALa4C5d86cLdvB).
   js/cubes-waiting.js builds the cubes inside each waiting picture (page loader, popup loader, saving card, sign-in card,
   Iris's working line and widgets) and moves them every frame; until it does, the picture's own background (the
   cubes-waiting.svg cube) shows, as before. Colours come from the logo; the stars and rings follow the theme's accent. */
html[data-nav-design="new"] body > .main-loader-wrapper > .loader {
    position: absolute;
    inset: 0;
    margin: auto;
}

/* Grid setup and older ready handlers may hide/fade the overlay independently. */
html.grid-page-opening body > .main-loader-wrapper {
    display: flex !important;
    opacity: 1 !important;
}

html.grid-page-opening .dx-loadpanel-wrapper {
    visibility: hidden !important;
}

.cw-scn {
    --cw-star: var(--app-accent, #2b7bf0);
    --cw-floor: rgba(20, 40, 80, .16);
    position: absolute;
    left: 50%;
    top: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    perspective: 640px;
    perspective-origin: 50% 40%;
    transform-origin: 50% 50%;
    pointer-events: none;
}
html[data-theme="dark"] .cw-scn { --cw-floor: rgba(0, 0, 0, .45); }
.cw-wld { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; }
.cw-wld * { transform-style: preserve-3d; box-sizing: border-box; }
.cw-wld i { font: inherit; }
.cw-o { position: absolute; left: 0; top: 0; will-change: transform; }
.cw-cb > i { position: absolute; inset: 0; backface-visibility: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.cw-cb > i.f { background: linear-gradient(160deg, var(--m) 0%, var(--l) 100%); }
.cw-cb > i.t { background: linear-gradient(135deg, var(--h) 0%, var(--m) 90%); }
.cw-cb > i.r { background: linear-gradient(170deg, var(--l) 0%, var(--d) 100%); }
.cw-cb > i.l { background: linear-gradient(190deg, var(--m) 0%, var(--l) 100%); }
.cw-cb > i.b, .cw-cb > i.u { background: var(--d); }
.cw-cb.cw-uni > i { background: linear-gradient(150deg, var(--h) 0%, var(--m) 35%, var(--l) 100%); }
.cw-cb.cw-glass > i { background: rgba(140, 220, 255, var(--gf, .10)); box-shadow: inset 0 0 0 1.5px rgba(80, 200, 255, .8), inset 0 0 var(--gb, 18px) rgba(80, 200, 255, .3); backface-visibility: visible; }
/* A CSS filter would flatten the cube, so "greyed" swaps its colours instead. */
.cw-cb.cw-grey { --h: #e6eaf0 !important; --m: #a3adbb !important; --l: #667284 !important; --d: #3d4553 !important; }
.cw-cb .cw-mark { position: absolute; inset: 14%; display: grid; place-items: center; opacity: 0; }
.cw-cb .cw-mark svg { width: 100%; height: 100%; }
.cw-star { width: 0; height: 0; }
.cw-star::before { content: ""; position: absolute; width: var(--z, 14px); height: var(--z, 14px); left: calc(var(--z, 14px) / -2); top: calc(var(--z, 14px) / -2); border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, var(--cw-star) 40%, transparent 70%); opacity: var(--a, 1); }
.cw-flat { backface-visibility: visible; }
.cw-shadow { border-radius: 50%; background: radial-gradient(closest-side, var(--cw-floor), transparent); }
.cw-ring { border-radius: 50%; border: 2px solid var(--cw-star); }
.cw-plate { border: 1px solid rgba(120, 170, 230, .6); border-radius: 6px; background-color: rgba(90, 140, 210, .3); background-image: linear-gradient(rgba(120, 170, 230, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 170, 230, .5) 1px, transparent 1px); background-size: 33.3% 33.3%; }
.cw-pn { position: absolute; width: 70px; height: 70px; }
.cw-pn > .cw-in, .cw-pn > .cw-out { position: absolute; inset: 0; backface-visibility: hidden; }
.cw-pn > .cw-in { background: #fbfdff; box-shadow: inset 0 0 0 1px #c8d6ea; padding: 9px 8px; display: grid; gap: 5px; align-content: start; }
.cw-pn > .cw-in i { display: block; height: 4px; border-radius: 2px; background: #9fb6d6; transform-origin: left; }
.cw-pn > .cw-in i:nth-child(1) { background: #1cc4f7; width: 60%; }
.cw-pn > .cw-out { transform: rotateY(180deg); background: linear-gradient(160deg, #1cc4f7, #262261); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.cw-sheet { width: 54px; height: 70px; margin: -35px 0 0 -27px; background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px #c8d6ea; padding: 8px 7px; display: grid; gap: 5px; align-content: start; backface-visibility: visible; }
.cw-sheet i { display: block; height: 4px; border-radius: 2px; background: #9fb6d6; }
.cw-sheet i:first-child { background: #262261; width: 70%; }
.cw-file { width: 60px; height: 74px; margin: -37px 0 0 -30px; background: linear-gradient(160deg, #ffffff, #dfe9f6); border-radius: 4px; box-shadow: 0 0 0 1px #9fb6d6; display: grid; place-items: center; font: 700 12px/1 Inter, "Segoe UI", system-ui, sans-serif; color: #1d7a43; }

/* The sign-in card shows only the 3D cube: never the flat picture, also not for the moment before it is drawn
   (PDT 2026-11-17: the old cube showed before Iris built herself). */
html.cw-3d .sign-in-loader-orbit {
    background-image: none !important;
}

/* The other waiting pictures never show the flat picture either while the 3D cube can be drawn (PDT 2026-11-17: the
   old cube flashed before the 3D one). The picture stays set, so js/cubes-waiting.js still knows it is a waiting cube;
   it is only drawn at no size. :not(#cw) outweighs the skins' own !important rules. */
html.cw-3d:not(#cw) :is(.loader-wrapper .loader, .save-card-orbit, .analyst-cube) {
    background-size: 0 0 !important;
}
