/* "Support us" popup (direct visitors) and the ad loader. Markup: rewardPopup() in
   src/render.js. Behaviour: /assets/game-ads.js. From all-game-master-static RewardPopup.astro. */

.app-ad-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-ad-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.app-ad-close {
  position: absolute;
  top: -42px;
  right: 0;
  width: 45px;
  height: 45px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 24px;
  line-height: 34px;
  cursor: pointer;
}

.direct-reward-box {
  position: relative;
  width: min(320px, 100%);
  padding: 22px 18px;
  border-radius: 8px;
  background: #fff;
  color: #24242a;
  text-align: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.direct-reward-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
  color: #24242a;
}

.direct-reward-text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: #5c5c66;
}

.direct-reward-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #20243a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.direct-reward-button:disabled {
  opacity: 0.72;
  cursor: default;
}

.direct-reward-skip {
  margin-top: 10px;
  padding: 4px;
  background: none;
  border: 0;
  color: #5c5c66;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.flow-loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.flow-loader-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: flow-loader-spin 0.8s linear infinite;
}

@keyframes flow-loader-spin {
  to { transform: rotate(360deg); }
}

.flow-loader-text {
  margin: 0;
  color: #fff;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .flow-loader-spinner { animation-duration: 2.4s; }
}
