.diwali-popup[hidden] { display: none; }

.diwali-popup {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.diwali-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(19 12 19 / 78%);
  backdrop-filter: blur(5px);
  animation: diwali-fade-in .22s ease both;
}

.diwali-popup-panel {
  position: relative;
  z-index: 1;
  width: min(940px, 94vw);
  overflow: visible;
  border: 3px solid #e8c46e;
  border-radius: 18px;
  background: #241326;
  box-shadow: 0 24px 90px rgb(0 0 0 / 50%);
  animation: diwali-popup-in .35s cubic-bezier(.2,.8,.2,1) both;
}

.diwali-popup-art-link {
  display: block;
  overflow: hidden;
  border-radius: inherit;
  line-height: 0;
}

.diwali-popup-art-link img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(78vh, 660px);
  object-fit: contain;
}

.diwali-popup-close {
  position: absolute;
  z-index: 2;
  top: -13px;
  right: -13px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  background: rgb(35 18 28 / 94%);
  color: #fff;
  cursor: pointer;
  font: 400 30px / 1 Arial, sans-serif;
}

.diwali-popup-close:hover,
.diwali-popup-close:focus-visible { background: #fff; color: #351521; }

body.diwali-popup-open { overflow: hidden; }

@keyframes diwali-popup-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@media (max-width: 640px) {
  .diwali-popup { padding: 16px; }
  .diwali-popup-panel { width: min(100%, 560px); border-width: 2px; border-radius: 12px; }
  .diwali-popup-art-link img { max-height: 80vh; }
  .diwali-popup-close { top: -8px; right: -8px; width: 32px; height: 32px; font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .diwali-popup-backdrop, .diwali-popup-panel { animation: none; }
}
