/* Kontener popupa */
#klikgry-popup {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  height: 180px;
  background: #fff;
  border-radius: 12px; /* lekko zaokrąglone rogi */
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 9999;
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
#klikgry-popup .popup-content {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Wideo jako klikalna kotwica wypełniająca całość sekcji */
#klikgry-popup .popup-video {
  position: absolute;
  inset: 0 0 0 0; /* pełny obszar */
  z-index: 1;     /* pod przyciskiem i X */
}
#klikgry-popup .popup-video .video-link {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
}
#klikgry-popup .popup-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none; /* klik przejmie <a>, nie video */
  border: 0;
  outline: 0;
  background: #000;
  cursor: pointer;
}

/* Malutki X – minimalny hitbox, brak obramowania */
#klikgry-popup #popup-close {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  margin: 0;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  outline: none;
  color: #333;
  cursor: pointer;
  z-index: 3; /* nad wszystkim */
}
#klikgry-popup #popup-close:focus { outline: none; }

/* Przycisk CTA – pulsowanie */
#klikgry-popup .popup-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) scale(1);
  background: #f1c40f;
  color: #000;
  font-weight: 800;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 12px;
  z-index: 2;
  transition: transform .2s ease;
  animation: kg-pulse 1.4s ease-in-out infinite;
}
#klikgry-popup .popup-btn:hover {
  transform: translateX(-50%) scale(1.05);
}

@keyframes kg-pulse {
  0%   { transform: translateX(-50%) scale(1); }
  50%  { transform: translateX(-50%) scale(1.06); }
  100% { transform: translateX(-50%) scale(1); }
}

/* Poszanowanie preferencji dostępności */
@media (prefers-reduced-motion: reduce) {
  #klikgry-popup .popup-btn { animation: none; }
}
