/* =====================================================================
   URGENT CAUSE POPUP  (templates/website/festival_popup.html)
   The "Support This Urgent Cause" popup that opens on most pages.
   Current cause: Educational Kit for homeless children (links to /support_educational_kit/).
   Poster image: static/website/images/education_kit/education_kit_popup.webp (1080x1080;
   the popup shows any poster shape in full, up to 535px wide).
   Keep every selector starting with .popup- so it can't affect other parts of the site.
   ===================================================================== */

/* Everything here must stay scoped to .popup-* -- this include renders on
   every page, so an unscoped selector would leak site wide. */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.popup-overlay.active {
  display: flex;
}

.popup-box {
  position: relative;
  max-width: 535px;
  max-height: 95vh;
}

.popup-box img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  cursor: pointer;
}

.popup-close {
  position: absolute;
  top: -61px;
  right: -35px;
  background: #00000007;
  color: #fff;
  border: 2px solid #ffffff00;
  width: 30px;
  height: 60px;
  border-radius: 50%;
  font-size: 50px;
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-click-badge {
  position: absolute;
  top: -75px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10000;
  pointer-events: none;
}

.popup-click-badge .click-label {
  background: #2196F3;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.popup-click-badge .click-arrow {
  font-size: 22px;
  color: #fbfafa;
  line-height: 1;
  margin-top: 2px;
  animation: arrow-bounce 1s infinite;
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media only screen and (max-width: 767px) {
  .popup-close {
    top: -41px;
    right: -12px;
    width: 28px;
    height: 28px;
    font-size: 32px;
  }

  .popup-click-badge {
    top: -75px;
    left: 50%;
  }

  .popup-click-badge .click-label {
    font-size: 11px;
    padding: 4px 10px;
  }

  .popup-click-badge .click-arrow {
    font-size: 30px;
  }
}
