.dialog-action-area {
  margin: 6px;
  border-spacing: 6px;
}

/****************
 * Print dialog *
*****************/

window.print:not(.ssd-frame) {
  drawing {
    color: var(--window-fg-color);
    background: none;
    border: none;
    padding: 0;

    paper {
      background-color: white;
      color: RGB(0 0 6 / 80%);
      background-clip: padding-box;
      border: 1px solid $border_color;
    }
  }

  headerbar.titlebar {
    @extend .flat;
  }

  .dialog-action-box {
    @extend .view;
  }
}

/********************
 * Page setup dalog *
 ********************/

window.pagesetup:not(.ssd-frame) {
  headerbar.titlebar {
    @extend .flat;
  }
}

/******************
 * GtkAboutDialog *
 ******************/

window.aboutdialog:not(.ssd-frame) {
  headerbar.titlebar {
    @extend .flat;
  }

  image.large-icons {
    -gtk-icon-size: 128px;
  }
}

/*************************
 * GtkColorChooserDialog *
 *************************/
window.colorchooser:not(.ssd-frame) {
  headerbar.titlebar {
    @extend .flat;
  }
}

/*************
 * AdwDialog *
 *************/

floating-sheet {
  > dimming {
    background-color: RGB(from var(--shade-color) r g b / calc(alpha * 2));
  }

  > sheet {
    border-radius: $dialog_radius;
    box-shadow: 0 2px 8px 2px RGB(0 0 6 / 7%),
                0 3px 20px 10px RGB(0 0 6 / 5%),
                0 6px 32px 16px RGB(0 0 6 / 2%),
                0 0 0 1px RGB(0 0 6 / #{if($contrast == 'high', 80%, 5%)});
    outline: 1px solid $window_outline_color;
    outline-offset: -1px;
  }
}

dialog.bottom-sheet {
  &:not(.narrow) sheet {
    margin-left: 30px;
    margin-right: 30px;

    &.flush-left, &.flush-right, &.flush-left.flush-right {
      > outline {
        box-shadow: inset 1px 0 $window_outline_color,
                    inset -1px 0 $window_outline_color,
                    inset 0 1px $window_outline_color;
      }
    }
  }
}

dialog-host > dialog.background {
  background: none;

  sheet {
    background-color: var(--window-bg-color);
    color: var(--window-fg-color);
  }
}

dialog-host > dialog.view {
  background: none;

  sheet {
    @extend %view;
  }
}

dialog-host > dialog.osd:not(progressbar):not(button):not(menubutton):not(splitbutton) {
  background: none;

  sheet {
    @extend %osd;
  }
}
