body:has(.website-popup[open]) {
  overflow: hidden;
}

dialog.website-popup {
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  width: fit-content;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  background: #151515;
  color: #fff;
  box-shadow: 0 24px 80px #0008;
}

.website-popup::backdrop {
  background: #000b;
}

.website-popup__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 8px 4px 16px;
  font: 14px/1.4 system-ui, sans-serif;
}

.website-popup__toolbar a {
  color: inherit;
  text-decoration: underline;
}

.website-popup__toolbar button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.website-popup :focus-visible {
  outline: 2px solid white;
  outline-offset: -2px;
}

.website-popup__image {
  display: block;
  max-width: min(960px, calc(100vw - 24px));
  max-height: calc(100dvh - 76px);
  margin: auto;
}
