.container-dropdown {
  display: inline-block;
  overflow: hidden;
  position: relative;

  .dropdown {
    align-items: center;
    border-radius: 2px;
    cursor: pointer;
    display: inline-flex;
    padding: 2px 6px;
    position: relative;
    text-transform: capitalize;
  }

  .dropdown-options {
    background-color: var(--figma-color-bg-inverse);
    border: 1px solid var(--figma-color-border-strong);
    border-radius: 2px;
    box-shadow: 0 2px 6px rgb(0 0 0 / 15%);
    color: var(--figma-color-text-oninverse);
    filter: drop-shadow(0 4px 4px var(--figma-color-bg-inverse));
    margin: 0;
    opacity: 0;
    padding: 0;
    position: absolute;
    text-transform: capitalize;
    top: calc(100% + 0.4rem);

    // transition: all 300ms ease;
    width: 148px;
    z-index: 99;

    .figma-dark & {
      background-color: var(--figma-color-bg-hover);
      border-color: var(--figma-color-border);
      color: var(--figma-color-text);
      filter: drop-shadow(0 4px 4px var(--figma-color-bg));
    }

    &.align-right {
      right: 0;
    }
  }

  .dropdown-overlay-close {
    inset: 0;
    pointer-events: none;
    position: fixed;
    transform: translate(100%, 0);
    z-index: 9;
  }

  &.opened {
    overflow: visible;

    .dropdown-options {
      opacity: 1;
      padding: var(--spacing-xs) 0;
    }

    .dropdown {
      z-index: 99;
    }

    .dropdown-overlay-close {
      pointer-events: auto;
      transform: none;
    }
  }

  .dropdown-option {
    cursor: pointer;
    line-height: 24px;
    list-style: none;
    padding-left: var(--spacing-lg);
    width: 100%;

    &:hover {
      background-color: var(--background-accent);
    }
  }

  .dropdown-option-disabled {
    & .dropdown-option {
      cursor: default;
      opacity: 0.5;

      &:hover {
        background-color: transparent;
      }
    }
  }

  .dropdown-option-selected {
    left: 5px;
    position: absolute;
    top: 5px;
  }
}