body:has(dialog[open]) {
  overflow: hidden;
}

dialog {
  align-items: center;
  justify-content: center;
  position: fixed;
  text-align: left;
  border: none;
  background: var(--color-body);
  box-shadow:
    1px 3px 3px 0 var(--color-shadow),
    1px 3px 15px 2px var(--color-shadow);
  border-radius: 0.28571429rem;
  outline: none;
  padding: 0;
  max-width: min(800px, 90vw);
  width: fit-content;
  z-index: 1001;

  pointer-events: auto;
  touch-action: auto;
}

dialog[open],
dialog:target {
  display: flex;
}

dialog::backdrop {
  background-color: var(--color-overlay-backdrop);
  will-change: opacity;
  opacity: 0;
  animation-name: fadein;
  animation-duration: 100ms;
  animation-timing-function: ease-in-out;
}

dialog[open]::backdrop {
  opacity: 1;
}

dialog header {
  font-size: 1.42857143rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--fonts-regular);
  color: var(--color-text-dark);
  margin: 0;
  padding: 1.25rem 1.5rem;
  box-shadow: none;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  border-bottom: 1px solid var(--color-secondary);
}

dialog article {
  display: block;
  width: 100%;
  font-size: 1em;
  line-height: 1.4;
}

dialog .content {
  padding: 1.5em;
  background: var(--color-body);
  color: var(--color-text);
}

dialog .actions {
  background: var(--color-secondary-bg);
  border-color: var(--color-secondary);
  display: flex;
  gap: 1em;
  justify-content: flex-end;
  padding: 1rem;
}

/* positive/negative action buttons */
dialog .actions .ui.button {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  margin-right: 0;
}

dialog .actions .ui.button.danger {
  display: block;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

dialog .actions .ui.button .svg {
  margin-right: 5px;
}
