.lbaic-settings-dropdown {
  &-holder {
    --lbaic-settings-dropdown-height: 0;
    --lbaic-settings-dropdown-placeholder-right: unset;
    --lbaic-settings-dropdown-placeholder-left: 0;
    --lbaic-settings-dropdown-placeholder-transform: translate3d(0, 0, 0);

    position: relative;
    width: 100%;

    &.opened {
      --lbaic-settings-dropdown-height: 204px;

      .lbaic-settings-dropdown {
        border: 1px solid rgba(var(--lbaic-settings-primary-rgb), 0.3);
        box-shadow: 0 0 0 3px rgba(var(--lbaic-settings-primary-rgb), 0.2);

        &-arrow {
          transform: scaleY(-1);
        }

        &-menu {
          transform: translate3d(0, 2px, 0);
          opacity: 1;
          pointer-events: auto;
        }
      }
    }
  }

  & {
    position: relative;
    background-color: var(--lbaic-settings-dropdown-local-bg, var(--lbaic-settings-dropdown-bg));
    border: 1px solid var(--lbaic-settings-dropdown-border);
    border-radius: 6px;
    transition: border-color 200ms ease-in-out;

    &:not(.lbaic-settings-dropdown-has-custom-box-shadow) {
      transition: box-shadow 200ms ease-in-out, border-color 200ms ease-in-out;
    }

    &:focus-within {
      border: 1px solid rgba(var(--lbaic-settings-primary-rgb), 0.25);
      box-shadow: 0 0 0 3px rgba(var(--lbaic-settings-primary-rgb), 0.1);
    }
  }

  &-in {
    height: 100%;
    display: flex;
    align-items: center;
    padding-inline: var(--lbaic-settings-dropdown-pis, 10px) var(--lbaic-settings-dropdown-pie, 48px);
  }

  &-icon {
    width: 18px;
    flex: 0 0 18px;
    height: auto;
    display: block;

    &:not(.lbaic-i-stroke) {
      fill: var(--lbaic-settings-dropdown-icon-fill);
    }

    &.lbaic-i-stroke {
      stroke: var(--lbaic-settings-dropdown-icon-fill);
    }
  }

  &-input {
    flex: 1 0 0;
    width: 100%;
    padding-block: 8px;
    font-size: var(--lbaic-settings-fs-13);
    font-weight: var(--lbaic-settings-fw-400);
    color: var(--lbaic-settings-dropdown-color);
    line-height: var(--lbaic-settings-lh-24);
    text-align: var(--lbaic-settings-dropdown-align, left);

    &:not(:first-child:last-child) {
      padding-inline-start: 10px;
    }

    &:read-only {
      cursor: pointer;
    }

    &:focus {
      box-shadow: none;
      outline: none;
    }

    &:not(:placeholder-shown) {
      & ~ .lbaic-settings-dropdown-placeholder {
        --lbaic-settings-dropdown-placeholder-transform: translate3d(6px, -50%, 0) scale(0.857);
        --lbaic-settings-dropdown-placeholder-padding-inline: 4px;
      }
    }
  }

  &-placeholder {
    display: inline-flex;
    align-items: center;
    margin-block-end: 5px;

    &-in {
      padding-inline: var(--lbaic-settings-dropdown-placeholder-padding-inline);
      border-radius: 6px;
      font-size: var(--lbaic-settings-fs-14);
      font-weight: var(--lbaic-settings-fw-500);
      line-height: var(--lbaic-settings-lh-18);
      cursor: pointer;
    }
  }

  &-arrow {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    transition: transform 180ms ease-in-out;
    cursor: pointer;

    &-in {
      width: 18px;
      height: auto;
      display: block;
      margin-block: auto;
      margin-inline: auto;
      fill: var(--lbaic-settings-dropdown-icon-fill);
    }
  }

  &-h-48 {
    height: 48px;
  }

  &-h-42 {
    height: 42px;
  }

  &-menu {
    position: fixed;
    top: var(--lbaic-settings-dropdown-holder-top, unset);
    left: var(--lbaic-settings-dropdown-holder-left, unset);
    bottom: var(--lbaic-settings-dropdown-holder-bottom, unset);
    width: var(--lbaic-settings-dropdown-holder-width, 100%);
    max-height: var(--lbaic-settings-dropdown-height);
    border-radius: 6px;
    box-shadow: var(--lbaic-settings-dropdown-menu-shadow);
    transform: translate3d(0, 2px, 0);
    opacity: 1;
    transition: transform 180ms ease-in-out, opacity 180ms ease-in-out;
    pointer-events: auto;
    overflow: hidden;
    z-index: 301;

    &-in {
      max-height: var(--lbaic-settings-dropdown-height);
      padding-block: 8px;
      padding-inline: 8px;
      background-color: var(--lbaic-settings-dropdown-menu-bg);
      border-radius: 6px;
      box-shadow: var(--lbaic-settings-dropdown-menu-shadow);
    }

    &-item {
      min-height: 36px;
      display: flex;
      align-items: center;
      padding-block: 8px;
      padding-inline: 10px;
      background-color: transparent;
      border-radius: 4px;
      text-align: left;
      transition: background-color 360ms ease-in-out;
      cursor: pointer;

      &:not(:last-child) {
        margin-bottom: 2px;
      }

      &-i {
        width: 18px;
        height: auto;
        display: block;
        flex: 0 0 18px;

        &:not(.lbaic-i-stroke) {
          fill: var(--lbaic-settings-dropdown-icon-fill);
        }

        &.lbaic-i-stroke {
          stroke: var(--lbaic-settings-dropdown-icon-fill);
        }
      }

      &-label {
        flex: 1 0 0;
        font-size: var(--lbaic-settings-fs-13);
        color: var(--lbaic-settings-dropdown-menu-item-color);
        line-height: var(--lbaic-settings-lh-20);
        white-space: pre-wrap;

        &:not(:first-child) {
          padding-inline-start: 10px;
        }
      }

      &-actions {
        margin-inline-start: auto;
        display: flex;
        align-items: center;
        gap: 4px;
      }

      &-action {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        padding: 0;
        border: none;
        background-color: transparent;
        border-radius: 3px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.05s ease, background-color 0.05s ease;

        @include min-width($lbaic-settings-wp-sm-breakpoint) {
          width: 24px;
          height: 24px;
          flex: 0 0 24px;
        }

        &:hover {
          background-color: var(--lbaic-settings-button-bg-hover);
        }

        &:active {
          background-color: var(--lbaic-settings-button-bg-active);
        }

        &-i {
          width: 16px;
          height: auto;
          flex: 0 0 16px;
          display: block;
          fill: var(--lbaic-settings-table-accordion-i);
        }
      }

      &:hover {
        background-color: var(--lbaic-settings-dropdown-menu-item-hover);
      }

      &.active {
        background-color: var(--lbaic-settings-dropdown-menu-item-hover);
        cursor: default;
      }

      &.disabled {
        --lbaic-settings-dropdown-menu-item-color: var(--lbaic-settings-dropdown-menu-item-color-disabled);

        pointer-events: none;
      }
    }

    &-action {
      min-height: 36px;
      display: flex;
      align-items: center;
      background-color: transparent;
      border-radius: 4px;
      text-align: left;
      transition: background-color 360ms ease-in-out;
      cursor: pointer;

      &:first-child {
        margin-block-end: 2px;
      }

      &-i {
        width: 18px;
        height: auto;
        display: block;
        flex: 0 0 18px;
        fill: var(--lbaic-settings-dropdown-menu-item-action-color);
      }

      &-label {
        flex: 1 0 0;
        font-size: var(--lbaic-settings-fs-13);
        color: var(--lbaic-settings-dropdown-menu-item-action-color);
        line-height: var(--lbaic-settings-lh-20);
        white-space: pre-wrap;

        &:not(:first-child) {
          padding-inline-start: var(--lbaic-settings-button-label-pi-start);
        }
      }

      &:hover {
        background-color: var(--lbaic-settings-dropdown-menu-item-action-hover);
      }

      &-in {
        --lbaic-settings-loading-circle-width: var(--lbaic-settings-button-i-width);
        --lbaic-settings-button-label-pi-start: 10px;
        --lbaic-settings-loading-circle-width-stroke: var(--lbaic-settings-primary);
        width: 100%;
        padding-block: 8px;
        padding-inline: 10px;
        display: flex;
        font-weight: var(--lbaic-settings-fw-400);
      }
    }
  }

  &-has-children {
    --lbaic-settings-dropdown-pis: 44px;
    --lbaic-settings-dropdown-placeholder-transform: translate3d(32px, 0, 0);

    .lbaic-settings-dropdown-children {
      position: absolute;
      top: 12px;
      bottom: 12px;
      left: 12px;
      display: flex;
      align-items: center;
    }
  }

  &-has-value {
    .lbaic-settings-dropdown-placeholder {
      --lbaic-settings-dropdown-placeholder-transform: translate3d(6px, -50%, 0) scale(0.857);
      --lbaic-settings-dropdown-placeholder-padding-inline: 4px;
      transform-origin: left;
    }
  }

  &-input-focused {
    .lbaic-settings-dropdown-placeholder {
      --lbaic-settings-dropdown-placeholder-transform: translate3d(6px, -50%, 0) scale(0.857);
      --lbaic-settings-dropdown-placeholder-padding-inline: 4px;
      transform-origin: left;
    }
  }

  &-error {
    --lbaic-settings-dropdown-border: var(--lbaic-settings-input-error);
    --lbaic-settings-dropdown-placeholder-color: var(--lbaic-settings-input-error);

    .lbaic-settings-dropdown {
      &:focus-within {
        --lbaic-settings-dropdown-border: var(--lbaic-settings-input-error);
        --lbaic-settings-dropdown-placeholder-color: var(--lbaic-settings-input-error);
      }
    }

    &-message {
      padding-block-start: 4px;

      &-in {
        font-size: var(--lbaic-settings-fs-12);
        font-weight: var(--lbaic-settings-fw-500);
        color: var(--lbaic-settings-input-error);
        line-height: var(--lbaic-settings-lh-16);
      }
    }
  }

  &-disabled {
    opacity: 0.4;
    pointer-events: none;
  }

  &-kb-icon {
    width: 12px;
    flex: 0 0 12px;
  }
}