/*
*
*  Responsive attributes
*
*  References:
*  1) https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties#flex
*  2) https://css-tricks.com/almanac/properties/f/flex/
*  3) https://css-tricks.com/snippets/css/a-guide-to-flexbox/
*  4) https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
*  5) http://godban.com.ua/projects/flexgrid
*
*/

// Layout
// ------------------------------

$baseline-grid: 8px !default;
$layout-gutter-width: ($baseline-grid * 2) !default;

@mixin layout-padding-margin() {

  [layout-padding] > [flex-sm],
  [layout-padding] > [flex-lt-md] {
    padding: $layout-gutter-width / 4;
  }
  [layout-padding],
  [layout-padding] > [flex],
  [layout-padding] > [flex-gt-sm],
  [layout-padding] > [flex-md],
  [layout-padding] > [flex-lt-lg] {
    padding: $layout-gutter-width / 2;
  }
  [layout-padding] > [flex-gt-md],
  [layout-padding] > [flex-lg] {
    padding: $layout-gutter-width / 1;
  }

  [layout-margin] > [flex-sm],
  [layout-margin] > [flex-lt-md] {
    margin: $layout-gutter-width / 4;
  }

  [layout-margin],
  [layout-margin] > [flex],
  [layout-margin] > [flex-gt-sm],
  [layout-margin] > [flex-md],
  [layout-margin] > [flex-lt-lg] {
    margin: $layout-gutter-width / 2;
  }

  [layout-margin] > [flex-gt-md],
  [layout-margin] > [flex-lg] {
    margin: $layout-gutter-width / 1;
  }

  [layout-wrap] {
    flex-wrap: wrap;
  }

  [layout-nowrap] {
    flex-wrap: nowrap;
  }
}

@include layout-padding-margin();

@import 'node_modules/@angular/material/theming';
$display-1-font-size-base: rem(3.400) !default;
$display-4-font-size-base: rem(11.20) !default;
$display-3-font-size-base: rem(5.600) !default;
$display-2-font-size-base: rem(4.500) !default;

$headline-font-size-base: rem(2.400) !default;
$title-font-size-base: rem(2.000) !default;
$subhead-font-size-base: rem(1.600) !default;

// $body-font-size-base: rem(1.400) !default;
$caption-font-size-base: rem(1.200) !default;

// Layout
// $baseline-grid: 8px !default;
$layout-breakpoint-xs: 600px !default;
$layout-breakpoint-sm: 600px !default;
$layout-breakpoint-md: 960px !default;
$layout-breakpoint-lg: 1280px !default;
// $layout-gutter-width: ($baseline-grid * 2) !default;

// Typography
// $md-body-font-size-base: rem(1.400) !default;

// App bar variables
// $app-bar-height: 64px;

// Icons
// $icon-size: rem(2.4);

// // Toast
// $toast-height: $baseline-grid * 3 !default;
// $toast-margin: $baseline-grid * 1 !default;


// Z-indexes
// $z-index-tooltip: 100 !default;
// $z-index-toast: 90 !default;
// $z-index-bottom-sheet: 70 !default;
$z-index-scroll-mask: 65 !default;
// $z-index-sidenav: 60 !default;
// $z-index-toolbar: 30 !default;
// $z-index-fab: 20 !default;
// $z-index-progress-circular: 2 !default; // Used to fix animation bug in Chrome


html, body {
  height: 100%;
  position: relative;
}

body {
  margin: 0;
  padding: 0;
}

[tabindex='-1']:focus {
  outline: none;
}

.inset {
  padding: 10px;
}

button.mat-no-style {
  font-weight: normal;
  background-color: inherit;
  text-align: left;
  border: none;
  padding: 0;
  margin: 0;
}

select,
button,
textarea,
input {
  vertical-align: baseline;
}

// Fix Android 4.0 button bugs
input[type="reset"],
input[type="submit"],
html input[type="button"],
button {
  cursor: pointer;
  -webkit-appearance: button;

  &[disabled] {
    cursor: default;
  }
}

textarea {
  vertical-align: top;
  overflow: auto;
}

input {
  &[type="search"] {
    -webkit-appearance: textfield;
    box-sizing: content-box;
    -webkit-box-sizing: content-box;

    &::-webkit-search-decoration,
    &::-webkit-search-cancel-button {
      -webkit-appearance: none;
    }
  }
}

.mat-visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  text-transform: none;
  width: 1px;
}

.mat-shadow {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  border-radius: inherit;
  pointer-events: none;
}

.mat-shadow-bottom-z-1 {
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}

.mat-shadow-bottom-z-2 {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
}

.mat-shadow-animated.mat-shadow {
  transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}


.mat-padding {
  padding: 8px;
}

.mat-margin {
  margin: 8px;
}

.mat-scroll-mask {
  position: absolute;
  background-color: transparent;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  > .mat-scroll-mask-bar {
    display: block;
    position: absolute;
    background-color: #fafafa;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: $z-index-scroll-mask;
    box-shadow: inset 0px 0px 1px rgba(0, 0, 0, 0.3)
  }
}

.mat-no-select {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

@media (min-width: $layout-breakpoint-sm) {
  .mat-padding {
    padding: 16px;
  }
}

// Global page styles
//
// [2] Ensure the page always fills at least the entire height of the viewport.
// [3] Prevent iOS text size adjust after orientation change, without disabling user zoom
// [4] Fonts on OSX will look more consistent with other systems that do not
// render text using sub-pixel anti-aliasing.
@import 'node_modules/@angular/material/theming';
$display-1-font-size-base: rem(3.400) !default;
$display-4-font-size-base: rem(11.20) !default;
$display-3-font-size-base: rem(5.600) !default;
$display-2-font-size-base: rem(4.500) !default;

$headline-font-size-base: rem(2.400) !default;
$title-font-size-base: rem(2.000) !default;
$subhead-font-size-base: rem(1.600) !default;

// $body-font-size-base: rem(1.400) !default;
$caption-font-size-base: rem(1.200) !default;

// Layout
// $baseline-grid: 8px !default;
$layout-breakpoint-xs: 600px !default;
$layout-breakpoint-sm: 600px !default;
$layout-breakpoint-md: 960px !default;
$layout-breakpoint-lg: 1280px !default;
// $layout-gutter-width: ($baseline-grid * 2) !default;

// Typography
// $md-body-font-size-base: rem(1.400) !default;

// App bar variables
// $app-bar-height: 64px;

// Icons
// $icon-size: rem(2.4);

// // Toast
// $toast-height: $baseline-grid * 3 !default;
// $toast-margin: $baseline-grid * 1 !default;


// Z-indexes
// $z-index-tooltip: 100 !default;
// $z-index-toast: 90 !default;
// $z-index-bottom-sheet: 70 !default;
$z-index-scroll-mask: 65 !default;
// $z-index-sidenav: 60 !default;
// $z-index-toolbar: 30 !default;
// $z-index-fab: 20 !default;
// $z-index-progress-circular: 2 !default; // Used to fix animation bug in Chrome


html, body {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;

  min-height: 100%; // [2]

  -webkit-text-size-adjust: 100%; // [3]
  -ms-text-size-adjust: 100%; // [3]

  -webkit-font-smoothing: antialiased; // [4]
  -moz-osx-font-smoothing: grayscale; // [4]
}


/************
 * Headings
 ************/
.mat-display-4 {
  font-size: $display-4-font-size-base;
  font-weight: 300;
  letter-spacing: -0.010em;
  line-height: $display-4-font-size-base;
}

.mat-display-3 {
  font-size: $display-3-font-size-base;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: $display-3-font-size-base;
}

.mat-display-2 {
  font-size: $display-2-font-size-base;
  font-weight: 400;
  line-height: rem(6.4);
}

.mat-display-1 {
  font-size: $display-1-font-size-base;
  font-weight: 400;
  line-height: rem(4);
}

.mat-headline {
  font-size: $headline-font-size-base;
  font-weight: 400;
  line-height: rem(3.2);
}


.mat-caption {
  font-size: $caption-font-size-base;
  letter-spacing: 0.020em;
}

.mat-button {
  letter-spacing: 0.010em;
}

/************
 * Defaults
 ************/

button,
select,
html,
textarea,
input {
  font-family: $mat-font-family;
}

select,
button,
textarea,
input {
  font-size: 100%;
}

/************
 * ICONS
 ************/

 .material-icons{
  font-feature-settings:"liga"
 }
$display-1-font-size-base: rem(3.400) !default;
$display-4-font-size-base: rem(11.20) !default;
$display-3-font-size-base: rem(5.600) !default;
$display-2-font-size-base: rem(4.500) !default;

$headline-font-size-base: rem(2.400) !default;
$title-font-size-base: rem(2.000) !default;
$subhead-font-size-base: rem(1.600) !default;

// $body-font-size-base: rem(1.400) !default;
$caption-font-size-base: rem(1.200) !default;

// Layout
// $baseline-grid: 8px !default;
$layout-breakpoint-xs: 600px !default;
$layout-breakpoint-sm: 600px !default;
$layout-breakpoint-md: 960px !default;
$layout-breakpoint-lg: 1280px !default;
// $layout-gutter-width: ($baseline-grid * 2) !default;

// Typography
// $md-body-font-size-base: rem(1.400) !default;

// App bar variables
// $app-bar-height: 64px;

// Icons
// $icon-size: rem(2.4);

// // Toast
// $toast-height: $baseline-grid * 3 !default;
// $toast-margin: $baseline-grid * 1 !default;


// Z-indexes
// $z-index-tooltip: 100 !default;
// $z-index-toast: 90 !default;
// $z-index-bottom-sheet: 70 !default;
$z-index-scroll-mask: 65 !default;
// $z-index-sidenav: 60 !default;
// $z-index-toolbar: 30 !default;
// $z-index-fab: 20 !default;
// $z-index-progress-circular: 2 !default; // Used to fix animation bug in Chrome


  .o-container {
   /* display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: initial;
    -webkit-box-direction: normal;
    -moz-box-direction: normal;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-flex-wrap: nowrap;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-box-pack: start;
    -moz-box-pack: start;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-align-content: flex-start;
    -ms-flex-line-pack: start;
    align-content: flex-start;
    -webkit-box-align: stretch;
    -moz-box-align: stretch;
    -webkit-align-items: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;*/
  }

  .o-container-title-item {
    -webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    -webkit-order: 0;
    -ms-flex-order: 0;
    order: 0;
    -webkit-box-flex: 0;
    -moz-box-flex: 0;
    -webkit-flex: 0 1 auto;
    -ms-flex: 0 1 auto;
    flex: 0 1 auto;
    -webkit-align-self: auto;
    -ms-flex-item-align: auto;
    align-self: auto;
  }

  .container-title {
    margin: 0px 4px;
    span {
      font-weight: 700;
      font-size: 18px;
      padding-bottom: 0px;
      padding-left: 4px;
    }
  }

  .margin-top-bottom {
    margin: 8px 0px;
  }

  .o-container-content-item {
    -webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    -webkit-order: 0;
    -ms-flex-order: 0;
    order: 0;
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    -webkit-flex: 1 1 auto;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    -webkit-align-self: auto;
    -ms-flex-item-align: auto;
    align-self: auto;
  }

  .container-content {
    padding: 8px 4px;
  }


 /*
      Legacy Firefox implementation treats all flex containers
      as inline-block elements.
  */
  @-moz-document url-prefix() {
  .o-container {
      width: 100%;
      -moz-box-sizing: border-box;
      }

  }

span.icon-btn{
  cursor: pointer;
  i {
    padding-top: 4px;
  }

  &.mat-disabled {
    cursor: default;
  }
}


.relative {
  position: relative;
}

.mat-dialog-custom {
  padding: 0 0 24px 0 !important;
  .mat-dialog-content.dialog-list-container {
    margin: 0;
  }
  .mat-dialog-actions {
    padding: 12px 24px;
  }
}

.mathint {
  position: absolute;
  font-size: 75%;
  bottom: 4px;

  &.mat-right {
    right: 0;
  }

  [dir='rtl'] & {
    right: 0;
    left: auto;

    &.mat-right {
      right: auto;
      left: 0;
    }
  }
}

.display-none {
  display: none;
}

.visibility-hidden {
  visibility: hidden;
}

$steps: 6;
@mixin padding-margin-x {
  @for $i from 1 through $steps {
    $val: $i * 4;
    .vertical-padding-#{$val} { padding-top: $val px; padding-bottom: $val px; }
    .horizontal-padding-#{$val} { padding-left: $val px; padding-right: $val px; }
    .vertical-margin-#{$val} { margin-top: $val px; margin-bottom: $val px; }
    .horizontal-margin-#{$val} { margin-left: $val px; margin-right: $val px; }
  }
}

@include padding-margin-x();