@import "./segment-button";
@import "./segment-button.md.vars";

// Material Design Segment
// --------------------------------------------------

.segment-button-md {
  @include padding($segment-button-md-padding-top, $segment-button-md-padding-end, $segment-button-md-padding-bottom, $segment-button-md-padding-start);

  flex: 1;

  height: $segment-button-md-height;

  border-bottom-width: $segment-button-md-border-bottom-width;
  border-bottom-style: solid;
  border-bottom-color: $segment-button-md-border-bottom-color;

  font-size: $segment-button-md-font-size;
  font-weight: $segment-button-md-font-weight;
  line-height: $segment-button-md-line-height;
  text-transform: uppercase;

  color: $segment-button-md-text-color;
  background-color: transparent;
  opacity: $segment-button-md-opacity;
  transition: $segment-button-md-transition;

  ion-icon {
    font-size: $segment-button-md-icon-size;
    line-height: $segment-button-md-icon-line-height;
  }

  &.activated,
  &.segment-activated {
    border-color: $segment-button-md-border-color-activated;
    opacity: $segment-button-md-opacity-activated;
  }
}


// Material Design Segment Button Disabled
// --------------------------------------------------

.segment-md .segment-button-disabled {
  opacity: $segment-button-md-opacity-disabled;

  pointer-events: none;
}


// Material Design Segment Color Generation
// --------------------------------------------------

@each $color-name, $color-value in $colors-md {
  $color-base: ion-color($colors-md, $color-name, base, md);

  .segment-md-#{$color-name} .segment-button {
    color: $color-base;

    &.activated,
    &.segment-activated {
      border-color: $color-base;
      color: $color-base;
    }
  }
}
