.d365-form-modal__dialog:not([open]) {
  display: none;
}

.d365-form-modal [hidden] {
  display: none;
}


.d365-form-modal__dialog {
  box-sizing: border-box;
  width: min(800px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: #252525;
  border: 0;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 25%);
}

.d365-form-modal__dialog::backdrop {
  background: rgb(0 0 0 / 65%);
}

.d365-form-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #ddd;
}

.d365-form-modal__title {
  margin: 0;
  font-size: 1.5rem;
}

.d365-form-modal__event-details {
  margin: 0.5rem 0 0;
  overflow-wrap: anywhere;
}

.d365-form-modal__event-details[hidden] {
  display: none;
}

.d365-form-modal__close {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  cursor: pointer;
  color: inherit;
  border: 0;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
}

.d365-form-modal__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.d365-form-modal__body {
  padding: 1.5rem;
}

.d365-form-modal__form {
  min-width: 0;
  overflow-wrap: anywhere;
}

.d365-form-modal__form * {
  box-sizing: border-box;
}

.d365-form-modal__form form {
  max-width: 100%;
}

.d365-form-modal__status--error {
  color: #a51b00;
}

@media (max-width: 480px) {
  .d365-form-modal__header,
  .d365-form-modal__body {
    padding: 1rem;
  }
}



.d365-form-modal .notes[hidden],
.d365-form-modal .d365-form-modal__form[hidden],
.d365-form-modal .d365-form-modal__header[hidden] {
  display: none !important;
}