/********************
 * GtkMessageDialog *
 ********************/

window.dialog.message {
  .titlebar {
    min-height: 20px;
    background: none;
    box-shadow: none;
    border-style: none;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
  }

  box.dialog-vbox.vertical {
    margin-top: 6px;
    border-spacing: 24px;

    > box > box > box > label.title {
      font-weight: 800;
      font-size: 15pt;
    }
  }

  &.csd {
    // bigger radius for better antialiasing
    border-bottom-left-radius: $window_radius+1;
    border-bottom-right-radius: $window_radius+1;

    .dialog-action-area {
      border-top: 1px solid $border_color;
      margin: 0;
      border-spacing: 0;

      > button {
        @extend %button_basic_flat;
        padding: 10px 14px; // labels are not vertically centered on message dialog, this is a workaround
        border-radius: 0;
        border: none;
        background-clip: padding-box;
        border-left: 1px solid $border_color;

        &:first-child {
          border-bottom-left-radius: $window_radius+1;
          border-left: none;
        }

        &:last-child {
          border-bottom-right-radius: $window_radius+1;
        }

        &.suggested-action {
          color: $accent_color;
        }

        &.destructive-action {
          color: $destructive_color;
        }
      }
    }
  }
}

/********************
 * AdapMessageDialog *
 ********************/

window.messagedialog,
dialog-host > dialog.alert sheet,
window.dialog-window.alert {
  background-color: $dialog_bg_color;
  color: $dialog_fg_color;
}

window.messagedialog {
  @if $contrast != 'high' {
    outline: none;
  }
}

dialog-host > dialog.alert.floating sheet,
window.dialog-window.alert {
  border-radius: $window_radius+1;
  outline: none;
}

window.messagedialog,
dialog.alert {
  .message-area {
    padding: 24px 30px;
    border-spacing: 24px;

    &.has-heading.has-body {
      border-spacing: 10px;
    }
  }

  .response-area > button {
    padding: 10px 14px;
    border-radius: 0;

    @if $contrast == 'high' {
      &:hover,
      &.keyboard-activating,
      &:active,
      &:checked {
        box-shadow: none;
      }
    }

    &.suggested {
      color: $accent_color;
    }

    &.destructive {
      color: $destructive_color;
    }
  }

 .response-area {
    &:not(.compact) > button {
      margin-top: -1px;
      margin-right: -1px;
      margin-left: -1px;

      &:first-child:dir(ltr),
      &:last-child:dir(rtl) {
        margin-left: 0;
      }

      &:last-child:dir(ltr),
      &:first-child:dir(rtl) {
        margin-right: 0;
      }
    }

    &.compact > button {
      margin-top: -1px;
      margin-bottom: -1px;

      &:first-child {
        margin-bottom: 0;
      }
    }
  }
}

window.messagedialog,
dialog.alert.floating {
 .response-area {
    &:not(.compact) > button {
      &:first-child:dir(ltr),
      &:last-child:dir(rtl) {
        border-bottom-left-radius: $window_radius+1;
      }

      &:last-child:dir(ltr),
      &:first-child:dir(rtl) {
        border-bottom-right-radius: $window_radius+1;
      }
    }

    &.compact > button {
      &:first-child {
        border-bottom-left-radius: $window_radius+1;
        border-bottom-right-radius: $window_radius+1;
      }
    }
  }
}
