@import "../less/fonts.less";
@import (reference) "../less/index";

.segmented_control {
  white-space: nowrap;

  .segmented_control--selectable-item {
    .button--reset();
    background-color: @neutral_white;
    border: 1px solid @neutral_silver;
    color: @neutral_dark_gray;
    cursor: pointer;
    display: inline-block;
    font-family: "Proxima Nova";
    font-size: 12px;
    padding: 10px;
    text-align: center;
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;

    &:first-child {
      border-radius: 3px 0 0 3px;
    }

    &:last-child {
      border-radius: 0 3px 3px 0;
    }

    &:not(:first-child) {
      // Overlap borders instead of removing one so we aren't missing one side in the hover state.
      margin-left: -1px;
    }

    &:hover,
    &:focus,
    &:active {
      background-color: @neutral_off_white;
      border-color: @primary_blue;
      outline: none;
      position: relative;
      // Pop up on top of peers to expose overlapped borders.
      z-index: 1;
    }

    &.segmented_control--selectable-item--selected {
      background-color: @primary_blue;
      border-color: @primary_blue;
      color: @neutral_off_white;
      position: relative;
      // Pop up on top of peers to expose overlapped borders.
      z-index: 2;
    }

    &.segmented_control--selectable-item--disabled {
      background-color: @neutral_off_white;
      border-color: #d7d9d9;
      border-color: @neutral_silver;
      color: #d7d9d9;
      color: @neutral_gray;
      cursor: not-allowed;

      &.segmented_control--selectable-item--selected {
        background-color: @neutral_silver;
        color: @neutral_dark_gray;
      }
    }
  }
}
