.app-dialog__backdrop {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
}

.app-dialog__backdrop[hidden] {
  display: none;
}

.app-dialog__backdrop--modal {
  pointer-events: auto;
  background-color: rgb(0 0 0 / 0.8);
  animation: app-dialog-backdrop-enter 180ms ease-out both;
}

.app-dialog__surface {
  display: flex;
  width: min(100%, 34rem);
  max-height: calc(100dvh - 3rem);
  flex-direction: column;
  overflow: hidden;
  padding: 1rem 1.25rem;
  background: #ffffff;
  box-shadow: 0 1.25rem 3.75rem rgb(0 0 0 / 28%);
  color: #1f2937;
  outline: none;
  pointer-events: auto;
  animation: app-dialog-enter 180ms ease-out both;
}

.app-dialog__header {
  display: flex;
  min-height: 1.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-dialog__header--close-only {
  justify-content: flex-end;
}

.app-dialog__title {
  min-width: 0;
  color: #111111;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5rem;
}

.app-dialog__close {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: #111111;
  font-size: 1.5rem;
  line-height: 1;
}

.app-dialog__close svg{
  width: 1.25rem;
  height: 1.25rem;
}

.app-dialog__close:hover {
  background: #f1f1f1;
}

.app-dialog__close:focus-visible {
  outline: 2px solid #005eb1;
  outline-offset: 4px;
}

.app-dialog__content {
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem 1.5rem 1.5rem;
}

.app-dialog__header+.app-dialog__content {
  padding-top: 0.5rem;
}

.app-dialog__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
}

.app-dialog__content+.app-dialog__footer {
  padding-top: 0;
}

@keyframes app-dialog-backdrop-enter {
  from {
    background-color: rgb(0 0 0 / 0);
  }

  to {
    background-color: rgb(0 0 0 / 0.8);
  }
}

@keyframes app-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 37.5rem) {
  .app-dialog__backdrop {
    padding: 0;
  }

  .app-dialog__surface {
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-dialog__backdrop--modal,
  .app-dialog__surface {
    animation: none;
  }
}