@import '../core/style/vendor-prefixes';
@import '../../cdk/a11y/a11y';


$mat-dialog-padding: 24px !default;
$mat-dialog-border-radius: 4px !default;
$mat-dialog-max-height: 65vh !default;
$mat-dialog-button-margin: 8px !default;

.mat-dialog-container {
  display: block;
  padding: $mat-dialog-padding;
  border-radius: $mat-dialog-border-radius;
  box-sizing: border-box;
  overflow: auto;
  outline: 0;

  // The dialog container should completely fill its parent overlay element.
  width: 100%;
  height: 100%;

  // Since the dialog won't stretch to fit the parent, if the height
  // isn't set, we have to inherit the min and max values explicitly.
  min-height: inherit;
  max-height: inherit;

  @include cdk-high-contrast {
    outline: solid 1px;
  }
}

.mat-dialog-content {
  display: block;
  margin: 0 $mat-dialog-padding * -1;
  padding: 0 $mat-dialog-padding;
  max-height: $mat-dialog-max-height;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mat-dialog-title {
  margin: 0 0 20px;
  display: block;
}

.mat-dialog-actions {
  padding: 8px 0;
  display: flex;
  flex-wrap: wrap;
  min-height: 52px;
  align-items: center;

  // Pull the actions down to avoid their padding stacking with the dialog's padding.
  margin-bottom: -$mat-dialog-padding;

  &[align='end'] {
    justify-content: flex-end;
  }

  &[align='center'] {
    justify-content: center;
  }

  .mat-button-base + .mat-button-base {
    margin-left: $mat-dialog-button-margin;

    [dir='rtl'] & {
      margin-left: 0;
      margin-right: $mat-dialog-button-margin;
    }
  }
}
