/* 508 Ministry Universal Brand Loader (Luminous Circuit-Trace, matching #wo-analytics) v20261125ul1 */
.m508-vload,
.m508-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 34px 24px 30px;
  margin: 14px auto;
  width: 100%;
  max-width: 560px;
  box-sizing: border-box;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(242, 248, 254, 0.96) 62%, rgba(232, 243, 252, 0.96) 100%);
  border: 1.5px solid #c8ddf2;
  box-shadow: 0 18px 42px -22px rgba(30, 64, 135, 0.24), 0 0 0 4px rgba(254, 243, 199, 0.38);
  text-align: center;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  position: relative;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.24s ease, transform 0.24s ease;
}
.m508-vload.is-leaving,
.m508-loader.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}
.m508-vload.is-compact,
.m508-loader.is-compact {
  padding: 18px 18px 16px;
  gap: 10px;
  max-width: 440px;
  border-radius: 18px;
}
.m508-vload.is-mini,
.m508-loader.is-mini {
  padding: 14px 16px 12px;
  gap: 8px;
  max-width: 360px;
  border-radius: 16px;
  margin: 8px auto;
}
.m508-vload::before,
.m508-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 18%, rgba(253, 230, 138, 0.28) 0%, rgba(255, 255, 255, 0) 58%);
}
.m508-vload-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}
.m508-vload.is-compact .m508-vload-svg {
  max-width: 240px;
}
.m508-vload.is-mini .m508-vload-svg {
  max-width: 196px;
}
.m508-vload-trace-bg {
  fill: none;
  stroke: #d7e6f9;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.m508-vload-flow {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 42 220;
  stroke-dashoffset: 262;
  animation: m508CircuitFlow 2.1s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
.m508-vload-flow.is-blue {
  stroke: #2563eb;
  filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.55));
}
.m508-vload-flow.is-sky {
  stroke: #38bdf8;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.6));
  animation-delay: -0.55s;
}
.m508-vload-flow.is-gold {
  stroke: #e5a91f;
  filter: drop-shadow(0 0 6px rgba(234, 179, 8, 0.72));
  animation-delay: -1.1s;
}
.m508-vload-flow.is-emerald {
  stroke: #10b981;
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.55));
  animation-delay: -1.65s;
}
.m508-vload-chip {
  stroke: #d9a536;
  stroke-width: 1.8;
  filter: drop-shadow(0 8px 18px rgba(37, 99, 235, 0.18));
}
.m508-vload-chip-glow {
  fill: none;
  stroke: #f5d061;
  stroke-width: 2;
  opacity: 0.65;
  transform-box: fill-box;
  transform-origin: center;
  animation: m508ChipPulse 2.2s ease-in-out infinite;
}
.m508-vload-node {
  fill: #ffffff;
  stroke: #93c5fd;
  stroke-width: 1.8;
}
.m508-vload-node-dot {
  fill: #2563eb;
  animation: m508NodeBlink 1.8s ease-in-out infinite;
}
.m508-vload-node-dot.d2 { fill: #e5a91f; animation-delay: 0.45s; }
.m508-vload-node-dot.d3 { fill: #10b981; animation-delay: 0.9s; }
.m508-vload-node-dot.d4 { fill: #38bdf8; animation-delay: 1.35s; }

.m508-vload-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #0f1d3a;
  line-height: 1.15;
}
.m508-vload.is-compact .m508-vload-title {
  font-size: 18px;
}
.m508-vload.is-mini .m508-vload-title {
  font-size: 16px;
}
.m508-vload-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px -6px rgba(37, 99, 235, 0.25);
}
.m508-vload-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.26);
  animation: m508DotPulse 1.4s ease-in-out infinite;
  flex: 0 0 auto;
}

/* Section / iframe / view overlay host */
.m508-loader-host {
  position: relative !important;
}
.m508-loader-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 9vh, 96px) 18px 28px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.94) 0%, rgba(235, 244, 254, 0.90) 100%);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: auto;
  box-sizing: border-box;
}
.m508-loader-overlay.is-visible {
  opacity: 1;
}
.m508-loader-overlay.is-leaving {
  opacity: 0;
  pointer-events: none;
}
.m508-loader-overlay.is-centered {
  align-items: center;
  padding-top: 24px;
}

/* Compact Slow-Connection Floating Status Pill (top-center: zero overlap with corner widgets) */
.m508-net-pill {
  position: fixed;
  left: 50%;
  top: 74px;
  z-index: 99980;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px 8px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(240, 247, 255, 0.96) 100%);
  border: 1.5px solid #bfdbfe;
  box-shadow: 0 12px 28px -12px rgba(15, 29, 58, 0.34), 0 0 0 3px rgba(254, 243, 199, 0.45);
  color: #0f1d3a;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: calc(100vw - 32px);
}
.m508-net-pill.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.m508-net-pill-ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #e5a91f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.18);
  flex: 0 0 auto;
  overflow: hidden;
  animation: m508ChipPulse 1.9s ease-in-out infinite;
}
.m508-net-pill-ic img {
  width: 15px;
  height: 15px;
  display: block;
}
.m508-net-pill-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1e3a8a;
}

/* Slow-loading media shimmer badge (non-cropping, preserves aspect ratio) */
.m508-media-wait {
  position: relative;
  min-height: 140px;
  background: linear-gradient(100deg, #e8f1fb 28%, #f7fbff 50%, #e8f1fb 72%) 0 0 / 280% 100%;
  animation: m508MediaShimmer 1.5s ease-in-out infinite;
}
.m508-media-wait-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #bfdbfe;
  box-shadow: 0 8px 20px -10px rgba(15, 29, 58, 0.3);
  color: #1d4ed8;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.m508-media-wait-badge.is-leaving {
  opacity: 0;
}

@media (max-width: 720px) {
  .m508-vload,
  .m508-loader {
    padding: 24px 16px 22px;
    gap: 11px;
    border-radius: 18px;
  }
  .m508-vload-title {
    font-size: 19px;
  }
  .m508-vload-svg {
    max-width: 280px;
  }
  .m508-net-pill {
    top: 64px;
    font-size: 12px;
    padding: 7px 13px 7px 9px;
  }
}

@keyframes m508CircuitFlow {
  0%   { stroke-dashoffset: 262; }
  100% { stroke-dashoffset: 0; }
}
@keyframes m508ChipPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.98); }
  50%      { opacity: 0.98; transform: scale(1.03); }
}
@keyframes m508NodeBlink {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}
@keyframes m508DotPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.65; }
  50%      { transform: scale(1.2); opacity: 1; }
}
@keyframes m508MediaShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .m508-vload-flow,
  .m508-vload-chip-glow,
  .m508-vload-node-dot,
  .m508-vload-dot,
  .m508-net-pill-ic,
  .m508-media-wait {
    animation: none !important;
  }
}
