/* Page styling */
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #f3f3f3;
  color: #333;
}

/* Wrapper for loader + text */
.wp-loader-container {
  flex-direction: column; /* stack loader + text */
}

/* Redirect text container */
.redirect-container {
  text-align: center;
  margin-top: 40px;
}

/* Main heading */
.redirect-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 30px;
}

/* Small label */
.redirect-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #7a8594;
  margin-bottom: 10px;
}

/* URL text */
.redirect-url {
  font-size: 16px;
  color: #333;
}

.redirect-manual {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #555;
}

.redirect-manual a {
  display: inline-block;
  margin-top: 5px;
  color: #0078d4;
  text-decoration: none;
  font-weight: 500;
}

.redirect-manual a:hover {
  text-decoration: underline;
}

.redirect-countdown {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  color: #888;
}

:root {
  --orbit-radius: 60px;
  --orbit-size: 32px;
  --duration: 2s;
}

/* Container */
.wp-loader-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loader */
.wp-loader {
  position: relative;
  width: 160px;
  height: 160px;
}

.wp-center-image {
  width: 80px;
  height: 80px;
  background-image: url('./assets/svg/loader-center-pawns.svg');
  background-size: cover;
  position: absolute;
  top: calc(50% + 8px);
  left: 50%;
  transform: translate(-50%, -50%);
  margin-left: 0;
  margin-top: 0;
  opacity: 1;
  z-index: 3;
}

/* Orbit container */
.wp-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ✅ FIX: ONLY positioning here (no animation!) */
.wp-orbiting-image {
  --angle: calc(var(--i) * 30deg - 90deg);
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--orbit-size);
  height: var(--orbit-size);

  /* ✅ This creates the circle */
  transform: rotate(var(--angle)) translateX(var(--orbit-radius)) rotate(calc(-1 * var(--angle)));
}

/* ✅ FIX: animation moved HERE */
.wp-content {
  width: 100%;
  height: 100%;
  background-image: url('./assets/svg/loader-pawns.svg');
  background-size: cover;
  background-position: center;

  opacity: 0;

  animation: fade var(--duration) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: calc(var(--i) * (var(--duration) / var(--elementCount)));
}

/* ✅ KEEP this animation */
@keyframes fade {
  0%, 30% {
    opacity: 0;
    transform: scale(0.5);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
  60% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
}
