/* ============================================================
   Unified site-wide loader ("Rose Three")
   One animation for every box / chart / product card.
   Colour: day (light mode) = blue, night (dark mode) = green.
   ============================================================ */

/* Overlay placed inside any box container while it loads. */
.uloader-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  border-radius: inherit;
  background: var(--ul-overlay-bg, rgba(255, 255, 255, 0.72));
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}
html[data-mode="light"] .uloader-overlay,
body.light .uloader-overlay { --ul-overlay-bg: rgba(255, 255, 255, 0.72); }
html[data-mode="dark"] .uloader-overlay,
body.dark  .uloader-overlay { --ul-overlay-bg: rgba(18, 20, 24, 0.74); }

/* The animated mark itself. */
.uloader {
  width: clamp(60px, 26%, 120px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #2d4f8a;            /* day = blue  */
}
html[data-mode="dark"] .uloader,
body.dark .uloader { color: #4caf50; }   /* night = green */

.uloader svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* When injected inline (innerHTML) rather than as an overlay, center it. */
.uloader-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

/* ── Reusable skeleton (first load / hard refresh) ── */
.uskel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(127, 127, 127, 0.12);
}
.uskel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(127, 127, 127, 0.18), transparent);
  animation: uskel-shine 1.4s infinite;
}
@keyframes uskel-shine { 100% { transform: translateX(100%); } }
.uskel-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  width: 100%;
  height: 100%;
  min-height: 240px;
  box-sizing: border-box;
}
.uskel-chart .uskel { flex: 1 1 auto; min-height: 80px; }
