@import '../../variables.scss';

#{$biz-css-prefix}-dropdown {
  background-color: white;

  #{$biz-css-prefix}-dropdown-nav {
    display: flex;
    border-bottom: 1px solid transparent;
  }

  &-open {
    #{$biz-css-prefix}-dropdown-nav {
      border-bottom-color: #eee;
    }
  }

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

    #{$biz-css-prefix}-dropdown-item-title {
      display: flex;
      align-items: center;
      position: relative;
      max-width: 100%;
      font-size: 13px;
      padding: 12px;

      &-text {
        margin-right: 5px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      &-arrow {
        color: #ccc;
        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(--color-primary-40);
    }

    &-active {
      #{$biz-css-prefix}-dropdown-item-title {
        color: var(--color-primary-40);
      }

      #{$biz-css-prefix}-dropdown-item-title:after {
        margin-top: -1px;
        transform: rotate(135deg);
      }
    }

    &-content {
      width: 100%;
      background: white;
      &-hidden {
        display: none;
      }
    }

    .triangle {
      display: inline-block;
      position: relative;
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 5px solid #ccc;
    }

    #{$biz-css-prefix}-dropdown-item-hr {
      position: absolute;
      top: 5px;
      right: 1px;
      height: 80%;
      width: 1px;
      background-color: #ccc;
    }
  }

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

  //   #{$biz-css-prefix}-dropdown-popup-mask {
  //     position: absolute;
  //   }

  //   #{$biz-css-prefix}-dropdown-popup-body {
  //     position: absolute;
  //   }
  // }
}
