@import '../../globals/scss/vars';
@import '../../globals/scss/colors';
@import '../../globals/scss/typography';
@import '../../globals/scss/spacing';
@import '../../globals/scss/helper-mixins';
@import '../../globals/scss/css--reset';
@import '@carbon/import-once/scss/import-once';

@include exports('content-switcher') {
  .#{$prefix}--content-switcher {
    @include font-family;
    display: flex;
    height: $input-height;
  }

  .#{$prefix}--content-switcher--sm {
    height: rem(24px);
    .#{$prefix}--content-switcher-btn {
      padding: 0 $spacing-sm 0 $spacing-sm;
      @include typescale('omega');
    }
  }

  .#{$prefix}--content-switcher-btn {
    @include reset;
    @include font-smoothing;
    @include typescale('zeta');
    @include font-family;
    background-color: transparent;
    display: flex;
    align-items: center;
    padding: 0 $spacing-xl;
    margin: 0;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--interactive-01);
    color: var(--interactive-01);

    &:focus {
      outline: 1px solid transparent;
      // box-shadow: 0 2px 0 0 $color__blue-20, 0 -2px 0 0 $color__blue-20;
      //background-color: $hover-primary;
      z-index: 2;
      //border-color: $hover-primary;
      text-decoration: none;
      //color: var(--inverse-01);
    }

    &:hover {
      cursor: pointer;
    }

    &:hover,
    &:active {
      //background-color: $hover-primary;
      //border-color: $hover-primary;
      //color: var(--inverse-01);
    }
  }

  .#{$prefix}--content-switcher__icon {
    margin-right: $spacing-xs;
    fill: currentColor;
    // need to color any child path or g
    * {
      fill: currentColor;
    }
  }

  .#{$prefix}--content-switcher-btn:not(:last-of-type) {
    border-right: none;
  }

  .#{$prefix}--content-switcher-btn:not(:first-of-type) {
    border-left: $content-switcher-option-border;

    &:hover {
      //border-left-color: $hover-primary;
    }
  }

  .#{$prefix}--content-switcher-btn:first-of-type {
    border-bottom-left-radius: $content-switcher-border-radius;
    border-top-left-radius: $content-switcher-border-radius;

    &:hover {
      //border-color: $hover-primary;
    }

    &:focus {
      // box-shadow: -2px 0 0 0 $color__blue-20, 0 2px 0 0 $color__blue-20, 0 -2px 0 0 $color__blue-20;
      z-index: 0;
    }
  }

  .#{$prefix}--content-switcher-btn:last-of-type {
    border-top-right-radius: $content-switcher-border-radius;
    border-bottom-right-radius: $content-switcher-border-radius;

    &:hover {
      //border-color: $hover-primary;
    }

    &:focus {
      // box-shadow: 2px 0 0 0 $color__blue-20, 0 2px 0 0 $color__blue-20, 0 -2px 0 0 $color__blue-20;
      z-index: 0;
    }
  }

  .#{$prefix}--content-switcher-btn.#{$prefix}--content-switcher--selected {
    background-color: var(--interactive-01);
    color: var(--inverse-01);
    outline: 1px solid transparent;

    &:hover,
    &:focus {
      //border-color: $hover-primary;
      //background-color: $hover-primary;
    }
  }
}
