.document-access-modal[hidden],
.document-access-modal__error[hidden] {
  display: none !important;
}

.document-access-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.document-access-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
}

.document-access-modal__title {
  margin: 0 32px 8px 0;
  color: #1f2937;
  font-size: 24px;
  line-height: 1.25;
}

.document-access-modal__text {
  margin: 0 0 20px;
  color: #4b5563;
  line-height: 1.5;
}

.document-access-modal__label {
  display: block;
  margin-bottom: 7px;
  color: #1f2937;
  font-weight: 600;
}

.document-access-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #aeb6c2;
  border-radius: 5px;
  color: #111827;
  font: inherit;
}

.document-access-modal__input:focus {
  border-color: #1e6091;
  outline: 2px solid rgba(30, 96, 145, 0.2);
}

.document-access-modal__error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 5px;
  background: #fee2e2;
  color: #991b1b;
}

.document-access-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.document-access-modal__button {
  padding: 10px 18px;
  border: 1px solid #1e6091;
  border-radius: 5px;
  background: #1e6091;
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.document-access-modal__button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.document-access-modal__button--secondary {
  border-color: #c8ced6;
  background: #fff;
  color: #374151;
}

.document-access-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.document-access-link__lock {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.85em;
  vertical-align: middle;
}

@media (max-width: 520px) {
  .document-access-modal__dialog {
    padding: 24px 20px;
  }

  .document-access-modal__actions {
    flex-direction: column-reverse;
  }

  .document-access-modal__button {
    width: 100%;
  }
}