@import './../../theme/vars.scss';
@import './../../mixins/reset.scss';

$commonDropdownPrefixCls: #{$vender-prefix}-common-dropdown;
$popoverPrefixCls: amos-popover;
$idropDownPrefixCls: amos-idropdown;

.#{$commonDropdownPrefixCls} {
  @include reset-component2;

  position: relative;
  min-width: 12em;
  line-height: 28px;
  background-color: white;
  border-radius: 2px;
  outline: none;

  &:focus {
    border-color: var(--primary-color);
  }

  &.#{$popoverPrefixCls}-trigger-disabled {
    &:focus {
      border-color: $border-color-base;
    }
  }

  &.#{$idropDownPrefixCls}-toggle-open {
    border-color: var(--primary-color);
  }
}

.#{$commonDropdownPrefixCls}-popover {
  &.#{$popoverPrefixCls}-down {
    padding-top: 1px;

    &::after {
      display: none;
    }
  }

  &.#{$popoverPrefixCls}-up {
    padding-bottom: 1px;
    margin-top: 1px;

    &::after {
      display: none;
    }
  }

  > .#{$popoverPrefixCls}-content {
    max-width: none;
    padding: 0;

    > ul {
      padding: 0;
      margin: 0;
      list-style: none;
    }
  }
}
