/* Bosco-Fruit — pauzespelletje in een popup.
   Bewust een apart bestand: raakt style.css niet en kan in één keer weg. */

/* ---------- Discrete ingang ---------- */
.game-teaser {
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.78;
}

.game-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

.game-link:hover,
.game-link:focus-visible {
  text-decoration-thickness: 2px;
}

.game-link svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* ---------- Popup ---------- */
.game-modal {
  --gm-green: #0f6f3d;
  --gm-green-dark: #0a4a29;
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  animation: gm-fade 0.18s ease-out;
}

.game-modal[hidden] {
  display: none !important;
}

.game-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 28, 18, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  touch-action: none;
}

.game-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  height: min(660px, 100%);
  background: #0a4a29;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: gm-pop 0.22s ease-out;
}

.game-modal__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 6px 0 16px;
  background: var(--gm-green);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  touch-action: none;
}

.game-modal__close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.game-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.game-modal__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.game-modal__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #cfe6f2;
}

.game-modal__stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.game-modal__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gm-green-dark);
  font-weight: 700;
  background: #e6f2ea;
}

.game-modal__loading[hidden] {
  display: none;
}

/* Telefoon (staand of liggend): volledig scherm, geen afgeronde hoeken */
@media (max-width: 720px), (max-height: 520px) {
  .game-modal {
    padding: 0;
  }

  .game-modal__dialog {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .game-modal__bar {
    min-height: 44px;
    padding-top: env(safe-area-inset-top, 0);
    padding-left: max(16px, env(safe-area-inset-left, 0));
    padding-right: max(6px, env(safe-area-inset-right, 0));
  }
}

/* Achtergrond niet laten scrollen terwijl de popup open is */
html.game-lock,
html.game-lock body {
  overflow: hidden;
  overscroll-behavior: none;
}

@keyframes gm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gm-pop {
  from { transform: translateY(12px) scale(0.98); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .game-modal,
  .game-modal__dialog {
    animation: none;
  }
}
