.wesp-logo-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #f6f6f4;
  transition: opacity 0.48s ease, visibility 0.48s;
  overflow: hidden;
}

.wesp-logo-loader--exiting {
  opacity: 0;
}

.wesp-logo-loader--exiting .wesp-logo-loader__canvas {
  transform: scale(1.03);
  opacity: 0.92;
}

.wesp-logo-loader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.wesp-logo-loader--embedded {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  background: #fff;
  overflow: hidden;
}

.wesp-logo-loader--embedded.wesp-logo-loader--transparent,
.wesp-logo-loader--plain.wesp-logo-loader--transparent {
  background: transparent !important;
}

.wesp-logo-loader--embedded .wesp-logo-loader__canvas {
  position: absolute;
  inset: 0;
}

.wesp-logo-loader--embedded:not(.wesp-logo-loader--no-chrome) {
  display: flex;
  flex-direction: column;
}

.wesp-logo-loader--embedded:not(.wesp-logo-loader--no-chrome) .wesp-logo-loader__canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  inset: auto;
}

.wesp-logo-loader--embedded:not(.wesp-logo-loader--no-chrome) .wesp-logo-loader__footer {
  flex: 0 0 auto;
  padding: 0 12px 10px;
}

.wesp-logo-loader--embedded:not(.wesp-logo-loader--no-chrome) .wesp-logo-loader__footer-row {
  margin-bottom: 8px;
}

.wesp-logo-loader--plain {
  background: #fff;
}

.wesp-logo-loader--no-chrome .wesp-logo-loader__footer {
  display: none;
}

.wesp-logo-loader__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transition: transform 0.52s ease, opacity 0.52s ease;
  transform-origin: 50% 44%;
}

.wesp-logo-loader__footer {
  position: relative;
  z-index: 2;
  padding: 0 12px 12px;
  pointer-events: none;
}

.wesp-logo-loader__footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.wesp-logo-loader__label,
.wesp-logo-loader__percent {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26, 30, 28, 0.72);
}

.wesp-logo-loader__percent {
  font-variant-numeric: tabular-nums;
}

.wesp-logo-loader__bar {
  position: relative;
  height: 4px;
  width: 100%;
  background: rgba(26, 30, 28, 0.08);
}

.wesp-logo-loader__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgb(148, 152, 158);
  transition: width 0.08s linear, background 0.18s ease;
}

.wesp-logo-loader__tagline {
  margin: 14px 0 0;
  padding: 0 8px;
  text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(26, 30, 28, 0.52);
  min-height: 1.45em;
  transition: opacity 0.35s ease;
}

.wesp-logo-loader__tagline:empty {
  display: none;
}

.wesp-logo-loader__tagline--fade {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .wesp-logo-loader__bar-fill {
    transition: none;
  }
}

/* Demo page helpers */
.wesp-logo-loader-demo {
  min-height: 100vh;
  background: #f6f6f4;
  color: rgba(26, 30, 28, 0.72);
  font-family: system-ui, -apple-system, sans-serif;
}

.wesp-logo-loader-demo__panel {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(26, 30, 28, 0.08);
  box-shadow: 0 8px 24px rgba(26, 30, 28, 0.06);
}

.wesp-logo-loader-demo__btn {
  appearance: none;
  border: 1px solid rgba(26, 30, 28, 0.12);
  background: rgba(72, 129, 109, 0.12);
  color: #1a1e1c;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}

.wesp-logo-loader-demo__btn:hover {
  background: rgba(72, 129, 109, 0.22);
}

.wesp-logo-loader-demo__hint {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 14px;
  text-align: center;
  opacity: 0.65;
}
