button,
select,
html,
textarea,
input {
  font-family: $font-family;
  font-weight: 300;
}

input {
  border-width: 0;
}

.md-char-counter {
  display: none;
}

.md-button {
  font-size: inherit;
  font-weight: 300;
  height: auto;
  line-height: inherit;
  margin: 0;
  min-height: 0;
  min-width: 0;
  padding: 8px 10px;

  &,
  &.md-fab {
    line-height: 1;
  }

  > span {
    vertical-align: middle;
  }

  [class^='icon-'],
  [class*=' icon-'] {
    font-size: 0.8em;
  }
}

md-menu-content {
  md-radio-button {
    margin: 16px 20px;
  }
}

md-menu-item > .md-button {
  font-weight: 300;
  line-height: 25px;

  [class^='icon-'],
  [class*=' icon-'] {
    font-size: 25px;
  }
}

// md-slider.md-default-theme .md-track {
// 	background-color: #aaa;
// }

.md-track-ticks {
  display: none;
}

md-slider {
  margin-bottom: 16px;

  &.md-min .md-thumb::after {
    background-color: rgb(68, 138, 255);
  }
}

md-radio-group {
  border: 0;
}

md-switch {
  .md-container {
    width: 60px;
  }

  .md-thumb {
    height: 18px;
    left: 1px;
    top: 1px;
    width: 18px;
  }

  .md-bar {
    background-color: rgba(0, 0, 0, 0.26);
    height: 2px;
    top: 12px;
    width: 54px;
  }

  .md-thumb-container {
    width: 36px;
  }

  &.md-default-theme.md-checked.md-primary .md-bar,
  &.md-checked.md-primary .md-bar {
    background-color: rgb(33, 150, 243);
  }

  &.md-default-theme.md-checked.md-primary .md-thumb,
  &.md-checked.md-primary .md-thumb {
    background-color: rgb(68, 138, 255);
  }
}

md-input-container {
  display: block;
  margin: 18px 0 46px;

  .md-input {
    height: auto;
  }

  .md-errors-spacer {
    display: none;
  }

  &.md-classeur-theme .md-input[disabled],
  [disabled] &.md-classeur-theme .md-input {
    background: none;
    border-bottom-width: 2px;
    color: #fff;
  }

  &.md-classeur-theme.md-input-focused .md-input {
    border-color: rgba(255, 255, 255, 0.5) !important;
  }
}

md-dialog {
  background-color: #f8f8f8;
  max-width: 500px;

  md-dialog-content {
    padding: 24px;
  }

  .md-title,
  h2 {
    font-size: 1.8em;
    font-weight: 500;
  }

  md-input-container {
    margin: 46px 0 18px;
  }
}

.md-inline-form .md-button {
  margin-top: 16px;
}

md-checkbox {
  display: block;

  .md-icon {
    border-color: rgba(0, 0, 0, 0.67);
    border-width: 1px;
  }
}

$tooltip-background-color: #333;

md-tooltip {
  font-weight: inherit;
  overflow: visible;

  p {
    font-size: 13px;
    line-height: 1.3;
  }

  p:first-child {
    font-size: 20px;
    margin: 0;
  }

  &.md-default-theme .md-background {
    background-color: $tooltip-background-color;
  }

  &.md-show {
    @include transition(none);
  }

  .md-content {
    background-color: $tooltip-background-color;
    border-radius: 4px;
    height: auto;
    max-width: 270px;
    padding: 12px;
    white-space: inherit;
  }

  .md-background {
    display: none;
  }

  &::before {
    border-color: transparent;
    border-style: solid;
    content: '';
    height: 0;
    position: absolute;
    width: 0;
  }

  &.bottom::before {
    border-bottom-color: $tooltip-background-color;
    border-width: 0 9px 7px;
    left: 50%;
    margin-left: -9px;
    top: -7px;
  }

  &.left::before {
    border-left-color: $tooltip-background-color;
    border-width: 9px 0 9px 7px;
    margin-top: -9px;
    right: -7px;
    top: 50%;
  }

  .tooltip-actions {
    margin: 12px -8px -8px;
  }

  .md-button {
    font-size: 16px;
  }
}

.md-chips .md-chip {
  background-color: rgba(160, 160, 160, 0.25);
  font-size: 13px;
  height: 25px;
  line-height: 25px;
}

md-chips .md-chips {
  box-shadow: none;
}

// Workaround https://github.com/angular/material/issues/4513
// body > .md-dialog-container {
// 	height: 100vh !important;
// }

.md-tab,
.md-subhead {
  font-weight: 300;
}

$toolbar-height: 52px;

md-toolbar {
  &.md-default-theme:not(.md-menu-toolbar),
  &:not(.md-menu-toolbar) {
    background-color: #606060;
    height: $toolbar-height;
    letter-spacing: -0.02em;
    min-height: $toolbar-height;

    .md-button:not(.md-raised) {
      color: #fff;
    }
  }
}

.md-toolbar-tools {
  font-weight: inherit;
  height: $toolbar-height;
  max-height: $toolbar-height;
}
