dialog.wp-block-fluxit-dialog {
  position: fixed;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background-color: var(--wp--preset--color--light);
  color: var(--wp--preset--color--dark);
}

dialog.wp-block-fluxit-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: fluxit-dialog-open 0.45s ease-in-out;
}

dialog.wp-block-fluxit-dialog.is-closing {
  height: 0dvh;
  animation: none;
  transition: height 0.45s ease-in-out;
}

@keyframes fluxit-dialog-open {
  from {
    height: 0dvh;
  }
  to {
    height: 100dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.wp-block-fluxit-dialog[open] {
    animation: none;
  }

  dialog.wp-block-fluxit-dialog {
    transition: none;
  }

  dialog.wp-block-fluxit-dialog.is-closing {
    transition: none;
  }
}

dialog.wp-block-fluxit-dialog::backdrop {
  background-color: transparent;
}

.wp-block-fluxit-dialog__content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--wp--custom--spacing--outer);
}

.wp-block-fluxit-dialog__content > :where(:not(.alignleft):not(.alignright)) {
  max-width: var(--wp--style--global--content-size);
  margin-left: auto;
  margin-right: auto;
}

.wp-block-fluxit-dialog__close {
  position: absolute;
  top: 1rem;
  right: var(--wp--custom--spacing--outer);
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background-color: transparent;
  color: currentColor;
  cursor: pointer;
}

.wp-block-fluxit-dialog__close span {
  position: absolute;
  inset: 0;
  display: block;
  background-color: currentColor;
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>');
  mask-repeat: no-repeat;
  mask-position: center;
}

.wp-block-fluxit-dialog__close:focus-visible {
  outline: 2px solid var(--wp--preset--color--brand);
  outline-offset: 3px;
}

html.dialog-open {
  height: auto;
  overflow: hidden;
}

html.dialog-open body {
  overflow: hidden;
}

div.wp-block-fluxit-dialog {
  position: relative;
  border: 1px dashed var(--wp--preset--color--brand);
  padding: var(--wp--custom--spacing--outer);
  background-color: var(--wp--preset--color--light);
  color: var(--wp--preset--color--dark);
}

.wp-block-fluxit-dialog__editor-cross {
  position: absolute;
  top: 1rem;
  right: var(--wp--custom--spacing--outer);
  width: 2.5rem;
  height: 2.5rem;
  background-color: currentColor;
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>');
  mask-repeat: no-repeat;
  mask-position: center;
}
