@import "./fab-list.vars";

// Floating Action Button List
// --------------------------------------------------

:host {
  @include margin($fab-size + $fab-list-margin, 0);

  display: none;
  position: absolute;
  top: 0;

  flex-direction: column;
  align-items: center;

  min-width: $fab-size;
  min-height: $fab-size;
}

:host(.fab-list-active) {
  display: flex;
}

::slotted(.fab-button-in-list) {
  --size: #{$fab-mini-size};

  transform: scale(0);

  opacity: 0;
  visibility: hidden;
}

:host(.fab-list-side-top) ::slotted(.fab-button-in-list),
:host(.fab-list-side-bottom) ::slotted(.fab-button-in-list) {
  --padding-top: 5px;
  --padding-bottom: 5px;
}

:host(.fab-list-side-start) ::slotted(.fab-button-in-list),
:host(.fab-list-side-end) ::slotted(.fab-button-in-list) {
  --padding-start: 5px;
  --padding-end: 5px;
}

::slotted(.fab-button-in-list.fab-button-show) {
  transform: scale(1);

  opacity: 1;
  visibility: visible;
}


:host(.fab-list-side-top) {
  top: auto;
  bottom: 0;

  flex-direction: column-reverse;
}

:host(.fab-list-side-start) {
  @include margin(0, $fab-size + $fab-list-margin);
  @include position-horizontal(null, 0);

  flex-direction: row-reverse;
}

:host(.fab-list-side-end) {
  @include margin(0, $fab-size + $fab-list-margin);
  @include position(null, null, null, 0);

  flex-direction: row;
}
