body:has(dialog[data-dialog-target="dialog"][open]) {
  overflow: hidden;
}

dialog {
  border: none;
  padding: 0;
  background: transparent;
  margin: 0;
  max-width: 90vw;
  width: 32rem;
  max-height: 85vh;
}

dialog[open] {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  background-color: white;
  border-radius: 0.75rem;
  border: none;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  overflow-y: auto;

  animation: dialog-appear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  display: flex;
  flex-direction: column;
  gap: 1rem;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  animation: backdrop-appear 0.2s ease-out;
}

dialog[closing] {
  animation: dialog-disappear 0.2s ease-out forwards;
}

dialog[closing]::backdrop {
  animation: backdrop-disappear 0.2s ease-out forwards;
}
