/* REUSABLE POPUP SYSTEM (WITH FLYER SUPPORT) */

.popup-overlay {
  display: flex;
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  padding: 1.6rem;
}

.popup-overlay.popup-active {
  visibility: visible;
  opacity: 1;
}

.popup-container {
  background-color: #ffffff;
  width: 100%;
  max-width: 580px;
  /* border-radius: 6px; */
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

/* Specific modifier for image flyer popups */
.popup-container.popup-container-flyer {
  max-width: 650px;
  background-color: transparent;
  box-shadow: none;
}

.popup-overlay.popup-active .popup-container {
  transform: translateY(0);
}

.popup-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  font-size: 2.4rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  z-index: 10;
  transition:
    background 0.2s,
    color 0.2s;
}

.popup-close:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}

.popup-flyer-wrapper {
  width: 100%;
  line-height: 0;
}

.popup-flyer-link {
  display: block;
  width: 100%;
}

.popup-flyer-img {
  width: 100%;
  height: auto;
  display: block;
  /* border-radius: 6px; */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s;
}

.popup-flyer-img:hover {
  opacity: 0.96;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .popup-overlay {
    padding: 1rem;
  }
  .popup-close {
    top: 0.8rem;
    right: 0.8rem;
    width: 3.2rem;
    height: 3.2rem;
    font-size: 2rem;
  }
}
