@import '../prefix';

.#{$prefix}--header__action--switcher {
  border: rem(2px) solid transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.#{$prefix}--website-switcher {
  position: fixed;
  right: 0;
  top: 0;
  width: rem(256px);
  background-color: $carbon--gray-100;
  height: 100%;
  z-index: 1000;
  transform: translate(16rem);
  will-change: transform;
  transition: transform 0.11s cubic-bezier(0.2, 0, 1, 0.9);
  overflow-y: auto;
  overflow-x: hidden;
  border-left: 1px solid $carbon--gray-80;
}

.#{$prefix}--header ~ .#{$prefix}--website-switcher {
  top: 3rem;
}

.#{$prefix}--website-switcher--expanded {
  transform: translate(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.#{$prefix}--website-switcher-list__item:nth-child(1),
.#{$prefix}--website-switcher-list__item:nth-last-child(3) {
  position: relative;
  margin-top: $spacing-05;
  margin-bottom: $spacing-03;

  &::after {
    content: '';
    display: block;
    position: absolute;
    bottom: rem(-9px);
    width: rem(222px);
    margin-left: $spacing-05;
    border-top: 1px solid $carbon--gray-80;
  }
}

.#{$prefix}--website-switcher-list__item:nth-last-child(3) {
  margin-top: 0;
}

.#{$prefix}--website-switcher-list__item:nth-child(2),
.#{$prefix}--website-switcher-list__item:nth-last-child(2) {
  padding-top: rem(9px);
}

.#{$prefix}--website-switcher-list__item-link {
  @include carbon--type-style('heading-01');
  display: block;
  text-decoration: none;
  padding: rem(6px) 1rem;
  color: $carbon--gray-30;

  &:hover {
    background: #353535;
    color: $carbon--gray-10;
  }

  &:focus {
    outline: 2px solid $shell-side-nav-accent-01;
    outline-offset: -2px;
  }
}
