@import "flive-vars";

.base {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  position: relative;
  transition: all .2s linear;
  outline: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  vertical-align: middle;
  @media (min-width: $screen-sm-min) {
    &:first-child {
      margin-left: 0;
    }
    &:last-child {
      margin-right: 0;
    }
  }
}

.content {
  display: flex;
  align-items: center;
  overflow: hidden;
  justify-content: center;
  /*
  todo find style name for replace 'i' tag
   */
  > i {
    margin-right: 10px;
  }
}
.button-filled {
  color: #FFF;
  border-style: solid;
  border-width: 1px;
  animation-direction: reverse;
  padding: 0 1.2em;
  border-radius: 1.2em;
  max-width: 20em;
  margin: 0.5em;
  @media (min-width: $screen-sm-min) {
    margin: 0 0.5em;
  }
  @include title-font-light();
  .content {
    height: 2.4em;
    line-height: 1em;
  }
}

.primary {
  composes: button-filled;
  background: $flive-night-blue;
  border-color: $flive-night-blue;
  &:hover {
    background: rgba($flive-night-blue, 0.8);
  }
}

.info {
  composes: button-filled;
  background: $flive-blue;
  border-color: darken($flive-blue, 3%);
  &:hover {
    background: rgba($flive-blue, 0.8);
  }
}

.sensit {
  composes: button-filled;
  background: $sensit-button-blue-gradient;
  border: none;
  &:hover {
    opacity: 0.8;
  }
}

.sensit-negative {
  composes: button-filled;
  background:$flive-light-grey;
  color: $sensit-button-blue;
  border: 1px solid $sensit-button-blue;
  &:hover {
    background:$flive-medium-grey;
  }
}

.sensit-link{
  border:none;
  color:$sensit-button-light-blue;
  background-color:transparent;
  text-decoration: underline;
  padding:0 0.5em;
  &:hover {
    color:$sensit-button-blue;
  }
}

.alert {
  composes: button-filled;
  background: $flive-red;
  border-color: darken($flive-red, 3%);
  &:hover {
    background: rgba($flive-red, 0.8);
  }
}

.warning {
  composes: button-filled;
  background: $flive-orange;
  border-color: darken($flive-orange, 3%);
  &:hover {
    background: rgba($flive-orange, 0.8);
  }
}

.cancel {
  composes: button-filled;
  background: transparent;
  color: $flive-night-blue;
  border-color: rgba($flive-night-blue, 0.6);
}

.dash-lagoon, .dash-night-blue, .dash-grey, .dash-white {
  margin: 0 1em !important;
}
.dash-lagoon {
  @include dash-button($flive-lagoon);
}

.dash-night-blue {
  @include dash-button($flive-night-blue);
}

.dash-grey {
  @include dash-button($flive-light-blue, $grey, $flive-light-blue);
}

.dash-white {
  @include dash-button(#fff, #fff, #fff);
}

.state-dropdown-closed, .state-dropdown-opened {
  .content:after {
    content: "";
  }
}

.primary, .info, .alert, .warning, .dash-lagoon, .dash-grey, .dash-white, .dash-night-blue, .icon, .sensit, .grey {
  &.state-dropdown-closed, &.state-dropdown-opened {
    .content:after {
      position: relative;
      display: inline-block;
      margin: 0.05em 0 0 0.7em;
      width: 0;
      height: 0;
      border-style: solid;
    }
  }
  &.state-dropdown-closed {
    .content:after {
      border-width: 5px 5px 0 5px;
      border-color: #ffffff transparent transparent transparent;
    }
  }
  &.state-dropdown-opened {
    .content:after {
      border-width: 0 5px 5px 5px;
      border-color: transparent transparent #ffffff transparent;
    }
  }
}
.dash-lagoon, .dash-night-blue, .icon, .grey {
  &.state-dropdown-closed .content:after {
    border-color: adjust_color($flive-night-blue, $alpha: -0.2) transparent transparent transparent;
  }
  &.state-dropdown-opened .content:after {
    border-color: transparent transparent adjust_color($flive-night-blue, $alpha: -0.2) transparent;
  }
}

.nav-bar {
  font-size: .9rem;
  @include title-font-light();
  .content {
    height: $header-height-desktop;
  }
}

.nav-bar-level-2 {
  font-size: .9rem;
  @include title-font-light();
  .content {
    height: 3.1rem;
  }
}

.tab {
  display: block;
  color: $flive-text-black;
  background: #fff;
  margin: 0 0 1.25em 0;
  border: 1px solid $flive-medium-grey;
  padding: 1em 1.25em 1em 1em;
  width: 100%;
  text-align: left;
  &.state-opened {
    border-right: 0.25em solid $flive-lagoon;
    padding-right: 1em;
  }
  .content {
    justify-content: flex-start;
  }
}

.lg {
  @include buttonFontSize('lg');
}

.md {
  @include buttonFontSize('md');
}

.sm {
  @include buttonFontSize('sm');
}
.disabled {
  @include disabled-button();
}

.icon {
  padding: 0;
  background: none;
  border: none;
  color: $flive-night-blue;
  margin: 0.5em;
  @media (min-width: $screen-sm-min) {
    margin: 0 0.5em;
  }
}

.floating-action {
  background: $flive-medium-grey;
  border: none;
  color: $flive-night-blue;
  border-radius: 50%;
  width: 3em;
  height: 3em;
  text-align: center;
}

.button-collapsible-card {
  background: none;
  border: none;
  font-size: 1rem;
  padding: 0 0 1.5em 0;
  &.state-opened:before,
  &.state-opened:after {
    content: "";
    bottom: 0;
    left: 50%;
    margin: 0 -.8em;
    border-style: solid;
    border-width: 0 .8em .8em .8em;
    border-color: transparent transparent $collapsible-plain-content-border transparent;
    position: absolute;
  }
  &.state-opened:after {
    bottom: -2px;
    border-color: transparent transparent $collapsible-plain-content-background transparent;
  }
}
