@import '../core/style/variables';
@import '../../cdk/a11y/a11y';

$mat-toolbar-height-desktop: 64px !default;
$mat-toolbar-height-mobile: 56px !default;
$mat-toolbar-row-padding: 16px !default;

/** @deprecated @breaking-change 8.0.0 */
$mat-toolbar-height-mobile-portrait: 56px !default;
/** @deprecated @breaking-change 8.0.0 */
$mat-toolbar-height-mobile-landscape: 48px !default;



@mixin mat-toolbar-height($height) {
  .mat-toolbar-multiple-rows {
    min-height: $height;
  }
  .mat-toolbar-row, .mat-toolbar-single-row {
    height: $height;
  }
}

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

.mat-toolbar-row, .mat-toolbar-single-row {
  display: flex;
  box-sizing: border-box;

  padding: 0 $mat-toolbar-row-padding;
  width: 100%;

  // Flexbox Vertical Alignment
  flex-direction: row;
  align-items: center;

  // Per Material specs a toolbar cannot have multiple lines inside of a single row.
  // Disable text wrapping inside of the toolbar. Developers are still able to overwrite it.
  white-space: nowrap;
}

.mat-toolbar-multiple-rows {
  display: flex;
  box-sizing: border-box;
  flex-direction: column;
  width: 100%;
}

// Set the default height for the toolbar.
@include mat-toolbar-height($mat-toolbar-height-desktop);

// As per specs, toolbars should have a different height in mobile devices. This has been
// specified in the old guidelines and is still observable in the new specifications by looking at
// the spec images. See: https://material.io/design/components/app-bars-top.html#anatomy
@media ($mat-xsmall) {
  @include mat-toolbar-height($mat-toolbar-height-mobile);
}
