// Modal dialogs

.dialog {
  background-color: $bg_color;
  color: $fg_color;
  border-radius: $modal_dialog_radius;
  border: 1px solid $borders_color;
  padding: $base_padding * 3;

  .dialog-content-box {
    margin-top: $base_margin * 2;
    margin-bottom: $base_margin * 4;
    spacing: $base_margin * 8;
    max-width: 28em;
  }

  .dialog-button {
    @extend %dialog_button;

    &:default { @extend %dialog_button_default; }
    &:destructive-action { @extend %dialog_button_destructive; }
  }

  .confirm-dialog-title {
    @extend %title_2;
    text-align: center;
  }
}

// Lists in dialogs

.dialog-list {
  spacing: $base_padding * 3;

  .dialog-list-title {
    @extend %heading;
    text-align: center;
  }

  .dialog-list-scrollview { max-height: 200px; }
  .dialog-list-box {
    spacing: 1em;

    .dialog-list-item {
      spacing: 1em;

      .dialog-list-item-title { font-weight: bold; }
      .dialog-list-item-description {
        @extend %caption;
        color: darken($fg_color, 5%);
      }
    }
  }
}

// End session dialog

.end-session-dialog {
  min-width: 40em;

  .dialog-content-box { spacing: 0; }

  .dialog-list {
    spacing: 0;

    .dialog-list-title {
      color: $warning_color;
      background-color: tranparentize($warning_color, 0.9);
      padding: $base_padding * 1.5;
      border-radius: $base_border_radius;
      margin: $base_margin 0;
    }
  }
}

// message dialog

.message-dialog-content {
  spacing: $base_padding * 3;

  .message-dialog-title {
    text-align: center;
    @extend %title_2;

    &.lightweight { @extend %title_4; }
  }

  .message-dialog-description { text-align: center; }

  .message-dialog-caption {
    @extend %caption; 
    text-align: center;
  }
}

// run dialog

.run-dialog {

  .dialog-content-box {
    margin: $base_margin;
  }

  &-description {
    @extend %caption;

    text-align: center;
    color: darken($fg_color, 20%);

    &.error { color: $error_color; }
  }

  &-completion-box {
    padding-top: $base_padding;
    padding-left: $base_padding * 2;
  }

  &-entry {
    @extend %entry;

    width: 20em;
    height: 1.2em;
  }
}

// password or authentication dialog

.prompt-dialog {
  width: 26em;

  .dialog-content-box {
    spacing: $base_margin * 4;
    margin-bottom: $base_margin * 3;
  }

  &-password-entry {
    @extend %entry;
    width: 20em;
  }

  &-password-layout { spacing: $base_margin * 2;}

  &-error-label,
  &-info-label,
  &-null-label {
    text-align: center;
    @extend %caption;
  }

  &-error-label { color: $error_color; }
}

// polkit dialog

.polkit-dialog {

  &-user-layout {
    text-align: center;
    spacing: 2px;
  }

  &-user-combo {
    @extend %flat_button;
    @extend %heading;

    border-radius: $base_border_radius;
    padding: $base_padding $base_padding * 6;

    // special case the :insensitive button sinc we want
    // the label to be the normal color when there are
    // not multiple users
    &:insensitive { color: $fg_color; }
  }
}

// Audio selection dialog

.audio-device-selection-dialog {
  min-width: 24em;

  .audio-selection-box {
    spacing: $base_padding *2;

    .audio-selection-device {
      @extend %flat_button;
      border-radius: $base_border_radius;

      .audio-selection-device-box {
        padding: $base_padding * 2;
        spacing: $base_padding * 2;
      }

      .audio-selection-device-icon { icon-size: 64px;}
    }
  }
}
