body.edition-modal-open {
  position: fixed;
  top: var(--edition-modal-scroll-position, 0);
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  padding-right: var(--edition-modal-scrollbar-gap, 0);
}

.edition-modal[hidden] { display: none !important; }

.edition-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #2d2d2d;
  color: #fff;
}

.edition-modal:fullscreen,
.edition-modal:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: #2d2d2d;
}

.edition-modal-dialog {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #2d2d2d;
}

.edition-modal-frame,
.edition-modal-frame iframe {
  width: 100%;
  height: 100%;
}

.edition-modal-frame {
  overflow: hidden;
  background: #2d2d2d;
}

.edition-modal-frame iframe {
  display: block;
  border: 0;
  background: #2d2d2d;
}

.edition-modal-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 3px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .28);
}

.edition-modal-close strong {
  font: 400 28px/1 Arial, sans-serif;
}

.edition-modal-close:hover { background: #000; }

.edition-modal-close:focus-visible,
[data-edition-modal-open]:focus-visible {
  outline: 3px solid #ff3557;
  outline-offset: 3px;
}

[data-edition-modal-open] { cursor: pointer; }

.current-edition-preview[data-edition-modal-open] {
  width: 100%;
  color: inherit;
  text-align: left;
}

.archive-home .edicao-cover [data-edition-modal-open] {
  width: 100%;
  height: 100%;
  display: block;
}

.archive-home .edicao-cover .edicao-cover-placeholder[data-edition-modal-open] {
  display: grid;
}

.archive-home .edicao-label[data-edition-modal-open] {
  width: fit-content;
  color: inherit;
  text-align: left;
}

.edition-reader-unavailable {
  cursor: default;
  opacity: .68;
}

@media (max-width: 760px) {
  .edition-modal-close {
    top: max(7px, env(safe-area-inset-top));
    right: max(7px, env(safe-area-inset-right));
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edition-modal *,
  .edition-modal *::before,
  .edition-modal *::after { scroll-behavior: auto !important; }
}
