/* Popup Modal Styles - Compact Design */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

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

.popup-content {
  position: relative;
  max-width: 380px;
  width: 100%;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 85vh;
}

.popup-overlay.show .popup-content {
  transform: scale(1) translateY(0);
}

.popup-image {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border-radius: 16px;
}

.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #E9491F 0%, #C73D19 100%);
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: white;
  font-weight: bold;
  transition: all 0.2s ease;
  z-index: 10001;
  box-shadow: 0 4px 12px rgba(233, 73, 31, 0.4);
}

.popup-close:hover {
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 6px 16px rgba(233, 73, 31, 0.6);
}

.popup-close:active {
  transform: scale(0.95) rotate(90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .popup-overlay {
    padding: 15px;
  }

  .popup-content {
    max-width: 340px;
  }

  .popup-close {
    width: 32px;
    height: 32px;
    font-size: 18px;
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 480px) {
  .popup-overlay {
    padding: 10px;
  }

  .popup-content {
    max-width: 320px;
    border-radius: 12px;
  }

  .popup-image {
    border-radius: 12px;
  }

  .popup-close {
    width: 30px;
    height: 30px;
    font-size: 16px;
    top: 6px;
    right: 6px;
    border-width: 2px;
  }
}

/* Animation for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .popup-overlay,
  .popup-content,
  .popup-close {
    transition: none;
  }

  .popup-overlay.show .popup-content {
    transform: scale(1) translateY(0);
  }

  .popup-close:hover {
    transform: none;
  }
}
