
:root {
  --fab-width: 56px;
  --fab-height: 56px;
  --fab-position: absolute;
  --fab-mini-width: 40px;
  --fab-mini-height: 40px;

  --material-fab-width: 56px;
  --material-fab-height: 56px;
  --material-fab-position: absolute;
  --material-fab-mini-width: 40px;
  --material-fab-mini-height: 40px;

  --fab: {
    position: relative;
    display: inline-block;
    @apply(--reset-box-model);
    @apply(--reset-base);
    @apply(--reset-font);
    @apply(--reset-cursor);
    width: var(--fab-width);
    height: var(--fab-height);
    text-decoration: none;
    font-size: 25px;
    line-height: var(--fab-height);
    letter-spacing: 0;
    color: var(--fab-text-color);
    vertical-align: middle;
    text-align: center;
    background-color: var(--fab-background-color);
    border: 0 solid currentColor;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
    transition: all 0.1s linear;
  }

  --material-fab: {
    @apply(--fab);
    @apply(--material-font);
    width: var(--material-fab-width);
    height: var(--material-fab-height);
    text-decoration: none;
    font-size: 25px;
    line-height: var(--material-fab-height);
    color: var(--material-fab-text-color);
    background-color: var(--material-fab-background-color);
    @apply(--material-shadow-2);
    transition: all 0.2s ease-in-out;
  }

  --fab--focus: {
    outline: 0;
  }

  --material-fab--focus: {
    outline: 0;
  }

  --fab--active: {
    box-shadow: 0 3px 6 rgba(0, 0, 0, 0.12);
    background-color: var(--fab-active-background-color);
    transition: all 0.2s ease;
  }

  --material-fab--active: {
    @apply(--material-shadow-4);
    background-color: var(--material-fab-active-background-color);
    transition: all 0.2s ease;
  }

  --fab--disabled: {
    background-color: color(black alpha(50%));
    @apply(--material-shadow-0);
    @apply(--disabled);
  }

  --material-fab--disabled: {
    background-color: color(black alpha(50%));
    @apply(--material-shadow-0);
    @apply(--disabled);
  }
}

/*~
  name: Fab
  category: Fab
  elements: ons-fab
  markup: |
    <button class="fab"><i class="zmdi zmdi-car"></i></button>
    <button class="fab" disabled><i class="zmdi zmdi-car"></i></button>
*/
/* stylelint-disable */
ons-fab, ons-speed-dial-item, button {
  &.fab {
    @apply(--fab);
    &:active {
      @apply(--fab--active);
      box-shadow: 0 0 6 rgba(0, 0, 0, 0.12);
    }
    &:focus {
      @apply(--fab--focus);
    }
    &:disabled,
    &[disabled] {
      @apply(--material-fab--disabled);
    }
  }

  &.fab__icon {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: block;
    border-radius: 100%;
    padding: 0;
    z-index: 100;
    line-height: var(--material-fab-height);
  }
}
/* stylelint-enable */

/*~
  name: Material Fab
  category: Fab
  elements: ons-fab
  markup: |
    <button class="fab fab--material"><i class="zmdi zmdi-car"></i></button>
    <button class="fab fab--material" disabled><i class="zmdi zmdi-car"></i></button>
*/

/* stylelint-disable */
ons-fab, ons-speed-dial-item, button {
  &.fab--material {
    @apply(--material-fab);
  }

  &.fab--material:active {
    @apply(--material-fab--active);
  }

  &.fab--material:focus {
    @apply(--material-fab--focus);
  }

  &.fab--material__icon {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: block;
    border-radius: 100%;
    padding: 0;
    z-index: 100;
    line-height: var(--material-fab-height);
  }

  &.fab--material:disabled,
  &.fab--material[disabled] {
    @apply(--material-fab--disabled);
  }
}
/* stylelint-enable */

/*~
  name: Fab Mini
  category: Fab
  elements: ons-fab
  markup: |
    <button class="fab fab--mini"><i class="zmdi zmdi-plus"></i></button>
    <button class="fab fab--mini" disabled><i class="zmdi zmdi-plus"></i></button>
*/

/*~
  name: Material Fab Mini
  category: Fab
  elements: ons-fab
  markup: |
    <button class="fab fab--material fab--mini"><i class="zmdi zmdi-plus"></i></button>
    <button class="fab fab--material fab--mini" disabled><i class="zmdi zmdi-plus"></i></button>
*/

/* stylelint-disable */
ons-fab, ons-speed-dial-item, button {
  &.fab--mini {
    width: var(--fab-mini-width);
    height: var(--fab-mini-height);
    line-height: var(--fab-mini-height);
  }

  &.fab--mini__icon {
    line-height: var(--fab-mini-height);
  }

  &.speed-dial__item  {
    position: absolute;
    transform: scale(0);
  }
}
/* stylelint-enable */

/* stylelint-disable */
ons-fab, button, .speed-dial {
  &.fab--top__right {
    top: 20px;
    bottom: auto;
    right: 20px;
    left: auto;
    position: var(--fab-position);
  }

  &.fab--bottom__right {
    top: auto;
    bottom: 20px;
    right: 20px;
    left: auto;
    position: var(--fab-position);
  }

  &.fab--top__left {
    top: 20px;
    bottom: auto;
    right: auto;
    left: 20px;
    position: var(--fab-position);
  }

  &.fab--bottom__left {
    top: auto;
    bottom: 20px;
    right: auto;
    left: 20px;
    position: var(--fab-position);
  }

  &.fab--top__center {
    top: 20px;
    bottom: auto;
    margin-left: -28px;
    left: 50%;
    right: auto;
    position: var(--fab-position);
  }

  &.fab--bottom__center {
    top: auto;
    bottom: 20px;
    margin-left: -28px;
    left: 50%;
    right: auto;
    position: var(--fab-position);
  }
}
/* stylelint-enable */
