dialog {
  background-color: var(--pos-background-color);
  color: var(--pos-normal-text-color);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-width: var(--width-xs);
  animation: slideIn 0.2s ease-out;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--blur-sm);
  animation: fadeIn 0.2s ease-out;
}

@media (prefers-color-scheme: dark) {
  dialog::backdrop {
    background: rgb(100, 100, 100, 0.5);
  }
}

dialog header > :first-child {
  /* This is the title slot*/
  flex-grow: 1;
  font-weight: var(--weight-light);
  font-size: var(--scale-2);
  font-family: var(--font-sans);
  margin: 0;
}

dialog header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: var(--scale-0);
  border-bottom-style: inset;
  padding: 0 0 var(--scale-0) 0;
}

dialog > :last-child {
  /* This is the content slot*/
  display: block;
  margin-top: var(--scale-3);
}

button#close {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: var(--scale-3);
  color: var(--color-grey-500);
}

button#close:hover {
  color: var(--pos-secondary-border-color);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
