/*!
  *  Copyright (C) 2019 Robert Bosch GmbH Copyright (C) 2019 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

@import '@bci-web-core/common-styles/sass/bci/bci-variables';

.dialog-title-icon {
  display: flex;
}

.mdc-dialog__title::before {
  display: none;
}
.mdc-dialog__title {
  padding: 0;
  flex-shrink: unset;
}

// For the styling with additionalTitle
.dialog-additional-header {
  .header-container {
    position: absolute;
    display: flex;
    align-items: center;
    top: 0;
    width: calc(100% - 32px);
    height: 6 * $grid-size;
  }
  .dialog-title-icon {
    overflow: hidden;
    align-items: center;
  }

  .dialog-title {
    padding: 24px 0 16px 0;
  }

  .dialog-additional-title {
    font-size: 16px;
    line-height: 24px;
    height: 24px;
    font-weight: $font-weight-strong;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 0px;
  }
  .divider {
    height: 1px;
    padding: 0px;
    background-color: $boschGray50;
    border: 0;
    overflow: visible;
    box-sizing: initial;
    margin-bottom: 0;
  }
}

//VP1
@media screen and (max-width: $screen-xs-min) {
  :host ::ng-deep button:not(.mat-mdc-icon-button) {
    margin-top: 2 * $grid-size;
  }
  :host ::ng-deep mat-dialog-actions div {
    width: 100%;
  }

  :host {
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .mat-dialog-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: inherit;
  }
  .mat-dialogs-actions {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .dialog-title-icon {
    min-height: 24px;
  }
  .dialog-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: $font-weight-strong;
  }
  .dialog-additional-header {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
    .dialog-title {
      padding-top: 24px;
      font-size: 16px;
      line-height: 24px;
      min-height: 24px;
      font-weight: $font-weight-strong;
    }
    .close-button {
      margin-right: -18px;
    }
    .icon {
      height: 24px;
    }
  }
  .divider {
    position: absolute;
    width: 100%;
    margin-left: -16px;
    margin-top: auto;
  }
}

//VP2
@media screen and (min-width: ($screen-xs-min + 1)) {
  :host ::ng-deep .mat-mdc-dialog-actions button:not(.mat-mdc-icon-button) {
    margin: $grid-size 0 0 2 * $grid-size;
  }
  .divider {
    margin: 24px 0 24px -32px;
    width: calc(100% + 64px);
  }
  .dialog-title {
    font-size: $font-size-large;
    font-weight: $font-weight-strong;
    line-height: 30px;
    padding-right: 2 * $grid-size;
  }
  .dialog-header {
    .dialog-title-icon {
      min-height: 30px;
    }
    .icon {
      padding-top: 3px;
    }
  }
  .dialog-additional-header {
    .dialog-title-icon {
      height: 24px;
    }
    .icon {
      height: 24px;
    }
  }
  .optionalButton {
    justify-self: flex-start;
    margin-right: auto !important;
    margin-left: 0 !important;
  }
}

//VP3
@media screen and (min-width: ($screen-sm-min + 1)) {
  .dialog-title-icon {
    min-height: 30px;
  }
  .dialog-title {
    font-weight: $font-weight-strong;
    font-size: 24px;
    line-height: 30px;
  }
  .dialog-header {
    .dialog-title-icon {
      min-height: 30px;
    }
    .icon {
      padding-top: 3px;
    }
  }
  .dialog-additional-header {
    .dialog-title-icon {
      height: 24px;
    }
    .icon {
      height: 24px;
    }
  }
}
