/**
 * Hub boot + tab loader — shared by P0004 Tool Hub and P0020 Data-Box.
 * Boot: link from index.html (/hub-boot.css in public). App: import in main.tsx.
 */

:root {
  --hub-sidebar-width: 15rem;
}

/* --- index.html boot overlay (before React) --- */
#hub-boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #0b1020;
}

#hub-boot-loader.hub-boot-loader--pane {
  left: var(--hub-sidebar-width);
  width: auto;
  right: 0;
}

.hub-boot-orb {
  position: relative;
  width: 6rem;
  height: 6rem;
}

.hub-boot-orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.hub-boot-orb__ring--dash {
  inset: 0.25rem;
  border-style: dashed;
  border-color: rgba(34, 211, 238, 0.3);
  animation: hub-boot-spin 12s linear infinite;
}

.hub-boot-orb__ring--inner {
  inset: 0.75rem;
  border-color: rgba(99, 102, 241, 0.35);
  animation: hub-boot-spin 6s linear infinite reverse;
}

.hub-boot-orb__core {
  position: absolute;
  inset: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(15, 18, 32, 0.95);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.hub-boot-orb__core svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #a5b4fc;
}

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

/* --- React portaled loader (center of main pane = center of viewport horizontally in pane) --- */
.hub-tab-loader-fill {
  position: fixed;
  z-index: 35;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--hub-sidebar-width, 15rem);
  display: grid;
  place-items: center;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

.hub-tab-loader-fill--dim {
  background: color-mix(in srgb, var(--bg, #0b1020) 45%, transparent);
  backdrop-filter: blur(2px);
}

.hub-loader-orb {
  position: relative;
  width: 6rem;
  height: 6rem;
  margin: 0;
}

.hub-loader-orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1px solid rgba(129, 140, 248, 0.2);
}

.hub-loader-orb__ring--dash {
  inset: 0.25rem;
  border-style: dashed;
  border-color: rgba(34, 211, 238, 0.25);
  animation: hub-boot-spin 12s linear infinite;
}

.hub-loader-orb__ring--inner {
  inset: 0.75rem;
  border-color: rgba(99, 102, 241, 0.3);
  animation: hub-boot-spin 6s linear infinite reverse;
}

.hub-loader-orb__glow {
  position: absolute;
  inset: 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(to bottom right, rgba(99, 102, 241, 0.2), rgba(34, 211, 238, 0.1));
  filter: blur(8px);
}

.hub-loader-orb__icon-box {
  position: absolute;
  inset: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: var(--panel, rgba(15, 18, 32, 0.95));
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.hub-loader-orb__icon-box svg {
  display: block;
}

.hub-loader-orb__gauge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  color: rgba(34, 211, 238, 0.9);
  animation: hub-boot-spin 3s linear infinite;
}
