/* css/loader.css - Minimalist Light Theme Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #ffffff; /* Pristine White */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: var(--font-main, 'Outfit', 'Cairo', sans-serif);
}

/* Elegant Thin Progress Bar at Top */
.loader__progress-bar-thin {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: var(--accent-primary, #0ea5e9);
  z-index: 10;
  transition: width 0.1s linear;
}

html[dir="rtl"] .loader__progress-bar-thin {
  left: auto;
  right: 0;
}

/* Main Content Container */
.loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Typography Focus */
.loader__counter-wrap {
  display: flex;
  align-items: flex-start;
  color: #0f172a;
  margin-bottom: 1rem;
}

.loader__percentage {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}

.loader__percentage-sign {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: var(--accent-primary, #0ea5e9);
}

.loader__words {
  position: relative;
  height: 30px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader__word {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  white-space: nowrap;
}

.loader__word.active {
  opacity: 1;
  transform: translateY(0);
  color: #0f172a;
}

/* The Logo Reveal */
.loader__logo-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0; /* Hidden initially */
  pointer-events: none;
  z-index: 6;
  transform: scale(0.95);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.loader__logo-final {
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* Completion States triggered via JS */
.loader.is-complete .loader__content {
  opacity: 0;
  transform: translateY(-30px);
}

.loader.is-complete .loader__logo-reveal {
  opacity: 1;
  transform: scale(1);
}
