.document-dialog {
  width: min(1040px, calc(100% - 32px));
  max-height: 92svh;
  padding: 0;
  border: 3px double #b3ac7c;
  border-radius: 14px;
  background: #1d1c19;
  color: #e5dfc7;
  box-shadow: 0 30px 100px #000b;
}

.document-dialog::backdrop {
  background: #090908d9;
  backdrop-filter: blur(7px);
}

.document-dialog[open] {
  display: flex;
  flex-direction: column;
}

.document-dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 21px 24px;
  background: linear-gradient(135deg, #4a463f77, #24221f);
  border-bottom: 1px solid #96956366;
}

.document-dialog .eyebrow {
  font-size: 9px;
  margin-bottom: 7px;
}

.document-dialog h2 {
  color: #e7d6b0;
  font: 600 20px/1.4 Georgia, serif;
}

.document-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid #a49a69;
  border-radius: 50%;
  background: #2b2824;
  color: #e4cea0;
  font-size: 23px;
}

.document-dialog__body {
  min-height: 200px;
  overflow: auto;
  background: #141311;
}

.document-dialog__body iframe {
  display: block;
  width: 100%;
  height: 62svh;
  border: 0;
  background: #f3f2f0;
}

.document-dialog__body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
  padding: 15px;
}

.document-error {
  padding: 40px;
  text-align: center;
  font-size: 14px;
  color: #d4c296;
}

.document-dialog__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #96956366;
}

body.document-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .document-dialog {
    width: calc(100% - 16px);
  }
  .document-dialog__header {
    padding: 17px;
  }
  .document-dialog h2 {
    font-size: 17px;
  }
  .document-dialog__footer {
    padding: 14px;
  }
}
