.conference-photo {
  width: 80%;
  margin: 2rem auto;
  text-align: center;
}

.photo-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo-trigger img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

/* The browser centers the dialog in the viewport */
#photo-dialog {
  width: 90%;
  height: 90%;
  margin: auto;
  padding: 1rem;
  border: 0;
  border-radius: 1rem;
  background: #111;
  overflow: hidden;
}

/* Only apply grid after the dialog is opened */
#photo-dialog[open] {
  display: grid;
  place-items: center;
}

#photo-dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}

#photo-dialog img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
}

.photo-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  width: 2.75rem;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: white;
  color: black;
  cursor: pointer;
  font-size: 1.5rem;
}

@media (max-width: 700px) {
  .conference-photo {
    width: 100%;
  }

  #photo-dialog {
    width: 95%;
    height: 85%;
  }
}
