@import "styles/mixins";

.wrapper {
  display: flex;
  border-radius: 4px;

  &-menu {
    position: relative;
  }
}

.btn {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--color-primary-7);
  letter-spacing: 0.2px;
  cursor: pointer;
  background-color: #fff;
  border: 1px solid var(--color-primary-7);

  &:focus {
    background-color: var(--background-focus);
    outline: none;
  }

  &:active {
    color: #fff;
    background-color: var(--color-primary-7);
  }

  &-primary {
    border-radius: 4px 0 0 4px;
  }

  &-menu-controller {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-left: none;
    border-radius: 0 4px 4px 0;

    svg {
      width: 14px;
      height: 14px;
    }
  }
}

.menu {
  position: absolute;
  top: calc(100% + 5px);
  z-index: 3;
  min-width: 100px;
  overflow: hidden;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 0 2px var(--shadow-3), 0 4px 8px var(--shadow-5);

  &-left {
    left: 0;
  }

  &-right {
    right: 0;
  }

  &-item {
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;

    &:focus {
      color: var(--color-primary-7);
      background-color: var(--background-focus);
      outline: none;
    }

    @include hover {
      color: var(--color-primary-7);
    }
  }
}
