/* Stats2Pitch v1.10.1 — keep refresh internals private and show only the pitch loader. */
#s2p-refresh-progress,
#s2p-rating-note {
  display: none !important;
}

body.s2p-refresh-active {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.s2p-refresh-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: block;
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  background: #010807;
}

.s2p-refresh-overlay[hidden] {
  display: none !important;
}

.s2p-refresh-overlay .s2p-loader {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  height: 100%;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  box-sizing: border-box;
}

/* Real football asset replaces the old CSS-drawn ball on both startup and refresh loaders. */
.s2p-loader-ball-real {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 7px 7px rgba(0,0,0,.45));
  animation: s2pBallSpin .68s linear infinite;
}

.s2p-refresh-overlay .s2p-loader-text {
  margin-top: 2px;
}

.s2p-refresh-overlay .s2p-loader-sub {
  margin-top: -8px;
}

.s2p-refresh-error-toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 2147482000;
  width: min(520px, calc(100vw - 28px));
  padding: 12px 16px;
  border: 1px solid rgba(126,255,31,.24);
  border-radius: 12px;
  background: rgba(3,16,13,.96);
  color: #eef5f0;
  box-shadow: 0 14px 36px rgba(0,0,0,.38);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 600px) {
  .s2p-refresh-overlay .s2p-loader-scene {
    width: 94vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s2p-loader-ball-real {
    animation: none;
  }
}
