@class-prefix-dropdown: ~'adm-dropdown';
@class-prefix-dropdown-item: ~'adm-dropdown-item';

.@{class-prefix-dropdown} {
  background-color: var(--adm-color-background);

  .@{class-prefix-dropdown}-nav {
    display: flex;
    border-bottom: 1px solid transparent;
  }

  &-open {
    .@{class-prefix-dropdown}-nav {
      border-bottom-color: var(--adm-color-border);
    }
  }

  &-item {
    display: flex;
    flex: 1;
    justify-content: center;
    min-width: 0;
    cursor: pointer;

    .@{class-prefix-dropdown-item}-title {
      display: flex;
      align-items: center;
      position: relative;
      max-width: 100%;
      font-size: var(--adm-font-size-main);
      padding: 12px;
      &-text {
        margin-right: 5px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
      &-arrow {
        color: var(--adm-color-light);
        font-size: 9px;
        transform: rotate(0deg) translateY(1px);
        transition: all ease 0.2s;
        &-active {
          transform: rotate(-180deg) translateY(-1px);
        }
      }
      &:active {
        opacity: 0.7;
      }
    }

    &-highlight {
      color: var(--adm-color-primary);
    }

    &-active {
      .@{class-prefix-dropdown-item}-title:after {
        margin-top: -1px;
        transform: rotate(135deg);
      }
    }

    &-content {
      width: 100%;
      background: var(--adm-color-background);
      &-hidden {
        display: none;
      }
    }
  }

  &-popup {
    position: fixed;
    overflow: hidden;
    width: 100%;
    right: 0;
    bottom: 0;
    left: 0;

    .@{class-prefix-dropdown}-popup-mask {
      position: absolute;
    }

    .@{class-prefix-dropdown}-popup-body {
      position: absolute;
    }
  }
}
