/* ==========================================================================
   Implant Dental · Popup de entrada (popup.css)
   <dialog> centrado; la imagen completa es un enlace a WhatsApp.
   ========================================================================== */

.popup {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100dvh;
  overflow: visible;
  margin: auto;
}
.popup::backdrop {
  background: rgba(8, 14, 20, 0.72);
  backdrop-filter: blur(3px);
}
.popup[open] { animation: popupIn 0.32s var(--ease); }
.popup[open]::backdrop { animation: popupFade 0.32s ease-out; }
@keyframes popupIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes popupFade { from { opacity: 0; } to { opacity: 1; } }

.popup__box {
  position: relative;
  display: block;
  line-height: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.popup__link {
  display: block;
  border-radius: inherit;
  transition: transform 0.3s var(--ease);
}
.popup__link:hover { transform: scale(1.01); }
.popup__link:active { transform: scale(0.995); }
.popup__link:focus-visible { outline: 3px solid var(--white); outline-offset: -6px; }

.popup__img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 860px);
  max-height: 86vh;
  max-height: 86dvh;
  object-fit: contain;
  background: var(--white);
}

.popup__close {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s;
}
.popup__close:hover { background: var(--accent); color: var(--white); transform: scale(1.06); }
.popup__close:active { transform: scale(0.96); }
.popup__close:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .popup[open], .popup[open]::backdrop { animation: none; }
  .popup__link, .popup__close { transition: none; }
  .popup__link:hover { transform: none; }
}
