.select,
.multi-select {
  display: flex;
  flex-direction: column;
  position: relative;
  flex: 1;

  &-toggle {
    padding: $base-spacing $base-spacing-3-4th;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.5px;
    color: $tundra-500;
    border: 1px solid $boulder-400;
    border-radius: 2px;
    background-color: transparent;
    position: relative;
    cursor: pointer;

    &::after {
      content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="%23757575"><path fill-rule="evenodd" d="M20.7343997,7.20340672 C21.0369343,6.9196125 21.5124245,6.93461618 21.7964369,7.23691839 C22.05463,7.51173857 22.0656928,7.92938754 21.8382717,8.21627127 L21.7628995,8.29813984 L12.8478053,16.6609927 C12.4000257,17.0810349 11.7203768,17.1107014 11.2398501,16.7502163 L11.1326902,16.6601017 L2.23653106,8.29760525 C1.93429195,8.01349685 1.91977114,7.53835648 2.20409793,7.23634952 C2.46257683,6.96179775 2.87905475,6.92484705 3.17971854,7.1338526 L3.26616944,7.20394131 L11.9903648,15.4047756 L20.7343997,7.20340672 Z"/></svg>');
      position: absolute;
      right: $base-spacing-3-4th;
    }

    &.active {
      color: $base-black;
      border-color: $sky-blue-500;

      &::after {
        content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="%230069AA"><path fill-rule="evenodd" d="M20.7343997,7.20340672 C21.0369343,6.9196125 21.5124245,6.93461618 21.7964369,7.23691839 C22.05463,7.51173857 22.0656928,7.92938754 21.8382717,8.21627127 L21.7628995,8.29813984 L12.8478053,16.6609927 C12.4000257,17.0810349 11.7203768,17.1107014 11.2398501,16.7502163 L11.1326902,16.6601017 L2.23653106,8.29760525 C1.93429195,8.01349685 1.91977114,7.53835648 2.20409793,7.23634952 C2.46257683,6.96179775 2.87905475,6.92484705 3.17971854,7.1338526 L3.26616944,7.20394131 L11.9903648,15.4047756 L20.7343997,7.20340672 Z"/></svg>');
      }
    }
  }

  &-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: $base-white;
    margin-top: 4px;
    width: 100%;
    min-width: 200px;
    padding: 0;
    z-index: 1;
    box-shadow: $base-elevation-card;
    display: none;
    opacity: 0;
    transition: opacity ease-out 0.3s;
    max-height: 300px;
    overflow-y: auto;

    li {
      display: flex;
      letter-spacing: 0.5px;
      line-height: 1;
      width: 100%;
      color: $boulder-400;
      font-size: 16px;
      transition: background-color ease-out 0.3s;

      label {
        padding: $base-spacing;
        cursor: pointer;
        width: 100%;
        display: inline-flex;
        align-items: baseline;
        line-height: 1.25;

        input {
          margin-right: $base-spacing;
        }
      }

      &:not(.select-menu-title):hover {
        background-color: $nobel-300;
        color: $base-white;

        label {
          color: $base-white;
        }
      }

      &.active {
        background-color: $boulder-400;
        color: $base-white;

        label {
          color: $base-white;
        }
      }
    }

    &.showing {
      display: flex;
      flex-wrap: wrap;
    }

    &.show {
      opacity: 1;
    }
  }
}

.action-section {
  display: flex;
  flex-direction: column;
  position: relative;
  flex: 1;

  .action-button {
    cursor: pointer;
    display: flex;
    justify-content: flex-end;
  }

  .action-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    margin-top: 4px;
    width: auto;
    padding: 0;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: none;
    opacity: 0;
    transition: opacity ease-out 0.3s;
    max-height: 300px;
    overflow-y: auto;
    min-width: 200px;

    li {
      display: flex;
      letter-spacing: 0.5px;
      line-height: 1;
      width: 100%;
      color: #757575;
      font-size: 16px;
      transition: background-color ease-out 0.3s;

      label {
        padding: 16px;
        cursor: pointer;
        width: max-content;
        display: inline-flex;
        align-items: baseline;
        line-height: 1.25;

        input {
          margin-right: 16px;
        }
      }

      &:not(.select-menu-title):hover {
        background-color: #B3B3B3;
        color: #FFFFFF;

        label {
          color: #FFFFFF;
        }
      }

      &.active {
        background-color: #757575;
        color: #FFFFFF;

        label {
          color: #FFFFFF;
        }
      }

      &.disabled:hover {
        background-color: unset;
        color: #757575;

        label {
          cursor: not-allowed;
          color: unset;
        }
      }
    }

    &.showing {
      display: flex;
      flex-wrap: wrap;
    }

    &.show {
      opacity: 1;
    }

    &.right {
      left: unset;
      right: 0;
    }

    &.no-scroll {
      max-height: unset;
    }
  }
}
