.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 0 14px 2px RGB(0 0 6 / 3%),
                0 0 5px 2px RGB(0 0 6 / 10%),
                0 0 0 1px RGB(0 0 0 / 5%);
    outline: 1px solid $window_outline_color;
    outline-offset: -1px;

    @media (prefers-contrast: more) {
      outline-color: $window_outline_color_hc;
      box-shadow: 0 0 14px 2px RGB(0 0 6 / 3%),
                  0 0 5px 2px RGB(0 0 6 / 10%),
                  0 0 0 1px RGB(0 0 0 / 80%);
    }
  }
}

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;

        @media (prefers-contrast: more) {
          box-shadow: inset 1px 0 $window_outline_color_hc,
                      inset -1px 0 $window_outline_color_hc,
                      inset 0 1px $window_outline_color_hc;
        }
      }
    }
  }
}

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;
  }
}
