dialog > article {
  padding: 0;
  margin: 0;
  border-radius: 0;
}

dialog > article > form {
  margin: 0;
  padding: 0;
}

dialog > article > header.app-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  border-radius: 0;
  background-color: var(--pico-card-sectioning-background-color);
}

dialog > article > header.app-dialog__header h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

dialog > article > header.app-dialog__header .app-dialog__close {
  flex-shrink: 0;
  width: var(--app-control-height, 2.625rem);
  height: var(--app-control-height, 2.625rem);
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: none;
  background-image: none;
  opacity: 1;
}

dialog > article > header.app-dialog__header .app-dialog__close i {
  font-size: 1rem;
  line-height: 1;
}

dialog.modal-fs>article {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

dialog.modal-fs > article > form,
dialog.modal-fs > article > .app-dialog__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

dialog > article > form > article,
dialog > article > .app-dialog__body > article {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
}

dialog > article > .app-dialog__body--media-release > article {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-dialog__body--media-release .app-dialog__media-search {
  flex-shrink: 0;
}

.app-dialog__body--media-release .app-dialog__media-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

dialog > article > article > form {
  margin: 0;
  padding: 0;
}

dialog > article > form > footer,
dialog > article > .app-dialog__body > footer,
dialog > article > footer,
dialog.modal-fs > article > form > footer,
dialog.modal-fs > article > .app-dialog__body > footer,
dialog.modal-fs > article > footer {
  flex-shrink: 0;
  margin: 0;
  margin-top: auto;
  padding: 1rem 1.25rem;
  width: 100%;
  border-top: 1px solid var(--pico-muted-border-color);
  border-radius: 0;
  background-color: var(--pico-card-sectioning-background-color);
}

dialog > article > form > footer.grid,
dialog > article > .app-dialog__body > footer.grid,
dialog > article > footer.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

dialog > article > form > footer.grid > button,
dialog > article > form > footer.grid > input[type="submit"],
dialog > article > form > footer.grid > .button_to,
dialog > article > .app-dialog__body > footer.grid > button,
dialog > article > .app-dialog__body > footer.grid > input[type="submit"],
dialog > article > .app-dialog__body > footer.grid > .button_to,
dialog > article > footer.grid > button,
dialog > article > footer.grid > input[type="submit"],
dialog > article > footer.grid > .button_to {
  width: 100%;
  margin: 0;
}

dialog > article > form > footer.grid > .button_to > button,
dialog > article > .app-dialog__body > footer.grid > .button_to > button,
dialog > article > footer.grid > .button_to > button {
  width: 100%;
  margin: 0;
}

@media (max-width: 576px) {
  dialog:not(.modal-fs) > article {
    width: 90vw;
    margin: 0 auto;
  }
}
