/* ==========================================================================
 * Buttons
 * ========================================================================== */

$mds-v-button__gap: calc(var(--mds-d-spacing--xs));

$mds-v-button__horizontal-padding--med: var(--mds-d-spacing--sm);
$mds-v-button__horizontal-padding--sm: var(--mds-d-spacing--xs);
$mds-v-button__horizontal-padding--xs: var(--mds-d-spacing--xxxs);

$mds-v-button__vertical-padding--med: var(--mds-d-spacing--sm);
$mds-v-button__vertical-padding--sm: var(--mds-d-spacing--xs);
$mds-v-button__vertical-padding--xs: var(--mds-d-spacing--xxxs);

.mds-c-buttons {
  --mds-v-buttons__gap: $mds-v-button__gap;

  align-items: center;
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  margin: calc(var(--mds-v-buttons__gap) * -1);

  & + & {
    margin-top: var(--mds-d-spacing--lg);
  }

  &:empty {
    display: none;
  }

  > .mds-c-button-group,
  > .mds-c-button {
    margin: var(--mds-v-buttons__gap);
  }

  &--no-margin {
    --mds-v-buttons__gap: 0;
  }

  &--full-width {
    width: 100%;
  }

  &--justify-flex-start {
    justify-content: flex-start;
  }

  &--justify-flex-end {
    justify-content: flex-end;
  }

  &--justify-center {
    justify-content: center;
  }

  &--justify-space-between {
    justify-content: space-between;
  }

  &--justify-space-around {
    justify-content: space-around;
  }

  &--justify-space-evenly {
    justify-content: space-evenly;
  }
}
