/* ==========================================================================
   HIREWORX LOADER — White/Light Brand Loader
   Colors: #ffffff bg, #f97316 orange, #54585A charcoal, #f4f5f6 light grey
   ========================================================================== */

#hwx-futuristic-loader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  overflow: hidden;
  user-select: none;
}

/* ── Subtle light grid background ──────────────────────────────────────── */
.hwx-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(249, 115, 22, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.07) 1px, transparent 1px);
  background-size: 52px 52px;
  animation: hwxGridDrift 10s linear infinite;
  pointer-events: none;
}

@keyframes hwxGridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 52px 52px; }
}

/* Soft radial fade over grid so centre is clean */
.hwx-grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.92) 30%,
    rgba(255, 255, 255, 0.55) 70%,
    transparent 100%
  );
}

/* ── Soft orange glow orb ───────────────────────────────────────────────── */
.hwx-orb {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(249, 115, 22, 0.10) 0%,
    rgba(249, 115, 22, 0.04) 50%,
    transparent 72%
  );
  filter: blur(40px);
  animation: hwxOrbPulse 3.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes hwxOrbPulse {
  0%   { transform: scale(0.9);  opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1;   }
}

/* ── Core wrapper ───────────────────────────────────────────────────────── */
.hwx-loader-core {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Logo pod ───────────────────────────────────────────────────────────── */
.hwx-logo-pod {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 38px;
  border: 1.5px solid rgba(249, 115, 22, 0.25);
  box-shadow:
    0 4px 24px rgba(249, 115, 22, 0.12),
    0 1px 6px rgba(0, 0, 0, 0.06);
  animation: hwxPodAppear 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: scale(0.84) translateY(10px);
}

@keyframes hwxPodAppear {
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.hwx-logo-pod img {
  width: 260px;
  height: auto;
  display: block;
}

/* Orange underline pulse */
.hwx-logo-pod::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #f97316, transparent);
  border-radius: 0 0 16px 16px;
  animation: hwxUnderlineSweep 1.8s ease-in-out infinite;
}

@keyframes hwxUnderlineSweep {
  0%   { opacity: 0; transform: scaleX(0.2); }
  50%  { opacity: 1; transform: scaleX(1);   }
  100% { opacity: 0; transform: scaleX(0.2); }
}

/* ── Tagline ────────────────────────────────────────────────────────────── */
.hwx-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #717d8e;
  margin-top: 24px;
  animation: hwxFadeUp 0.4s 0.3s ease forwards;
  opacity: 0;
  transform: translateY(8px);
}

.hwx-tagline span {
  color: #f97316;
  font-weight: 700;
}

@keyframes hwxFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Candidate icons row ────────────────────────────────────────────────── */
.hwx-people-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  animation: hwxFadeUp 0.4s 0.45s ease forwards;
  opacity: 0;
  transform: translateY(8px);
}

.hwx-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(249, 115, 22, 0.4);
  background: linear-gradient(135deg, #fff8f4 0%, #fff0e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f97316;
  font-size: 1.95rem;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.16);
  animation: hwxAvatarPop 0.4s ease backwards;
}

.hwx-avatar:nth-child(1) { animation-delay: 0.50s; }
.hwx-avatar:nth-child(3) { animation-delay: 0.60s; }
.hwx-avatar:nth-child(5) { animation-delay: 0.70s; }
.hwx-avatar:nth-child(7) { animation-delay: 0.80s; }
.hwx-avatar:nth-child(9) { animation-delay: 0.90s; }

@keyframes hwxAvatarPop {
  0%   { opacity: 0; transform: scale(0.5); }
  70%  { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1);   }
}

.hwx-connect-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.hwx-connect-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
  animation: hwxDotFlow 1.3s ease-in-out infinite;
}
.hwx-connect-dots span:nth-child(1) { animation-delay: 0.0s; }
.hwx-connect-dots span:nth-child(2) { animation-delay: 0.2s; }
.hwx-connect-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes hwxDotFlow {
  0%, 100% { opacity: 0.18; transform: scale(0.7); }
  50%       { opacity: 1;    transform: scale(1.25); }
}

/* ── Slim progress bar ──────────────────────────────────────────────────── */
.hwx-bar-wrap {
  width: 360px;
  height: 5px;
  background: #ebeef2;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 34px;
  animation: hwxFadeUp 0.4s 0.55s ease forwards;
  opacity: 0;
  transform: translateY(5px);
}

.hwx-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e55700, #f97316, #ffb347);
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
  transition: width 0.08s linear;
  position: relative;
}

/* Bright leading-edge glow */
.hwx-bar-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -2px;
  bottom: -2px;
  width: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  filter: blur(2px);
}

/* ── Status text ────────────────────────────────────────────────────────── */
.hwx-status-text {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 500;
  color: #7b8796;
  letter-spacing: 0.07em;
  margin-top: 18px;
  animation: hwxFadeUp 0.4s 0.65s ease forwards;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease;
}

.hwx-status-text span {
  color: #f97316;
  font-weight: 700;
}

/* ── Exit animation ─────────────────────────────────────────────────────── */
#hwx-futuristic-loader.hwx-exit {
  animation: hwxLoaderExit 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes hwxLoaderExit {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .hwx-logo-pod img { width: 200px; }
  .hwx-logo-pod     { padding: 18px 30px; }
  .hwx-bar-wrap     { width: 280px; height: 4px; }
  .hwx-tagline      { font-size: 1.05rem; letter-spacing: 0.16em; }
  .hwx-people-row   { gap: 8px; }
  .hwx-avatar       { width: 40px; height: 40px; font-size: 1.55rem; }
  .hwx-status-text  { font-size: 1.05rem; }
  .hwx-orb          { width: 340px; height: 340px; }
}

/* ── Dark Mode Loader Adaptations ────────────────────────────────────────── */
[data-theme="dark"] #hwx-futuristic-loader {
  background: #080c14;
}

[data-theme="dark"] .hwx-grid-bg::after {
  background: radial-gradient(ellipse at center,
    rgba(8, 12, 20, 0.94) 30%,
    rgba(8, 12, 20, 0.65) 70%,
    transparent 100%
  );
}

[data-theme="dark"] .hwx-logo-pod {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 50%, rgba(255, 247, 237, 0.95) 100%);
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(249, 115, 22, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

[data-theme="dark"] .hwx-tagline {
  color: #94a3b8;
}

[data-theme="dark"] .hwx-avatar {
  background: linear-gradient(135deg, #161e2e 0%, #1f1a18 100%);
  border-color: rgba(249, 115, 22, 0.5);
  color: #f97316;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .hwx-bar-wrap {
  background: #1e293b;
}

[data-theme="dark"] .hwx-status-text {
  color: #94a3b8;
}

