@charset "UTF-8";
@import "./input.css";
@import "./common/var.css";

@component-namespace el {

  @b cascader {
    display: inline-block;
    position: relative;
    background-color: #fff;

    .el-input,
    .el-input__inner {
      cursor: pointer;
      background-color: transparent;
      z-index: 1;
    }

    .el-input__icon {
      transition: none;
    }

    .el-icon-caret-bottom {
      transition: transform .3s;

      @when reverse {
        transform: rotateZ(180deg);
      }
    }

    @e label {
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      line-height: 34px;
      padding: 0 15px 0 10px;
      color: var(--input-color);
      width: 100%;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      box-sizing: border-box;
      cursor: pointer;
    }

    @m large {
      font-size: var(--input-large-font-size);

      .el-cascader__label {
        line-height: calc(var(--input-large-height) - 2);
      }
    }
    @m small {
      font-size: var(--input-small-font-size);

      .el-cascader__label {
        line-height: calc(var(--input-small-height) - 2);
      }
    }
  }

  @b cascader-menus {
    white-space: nowrap;
    background: #fff;
    position: absolute;
    margin: 5px 0;
    z-index: 1001;
    border: var(--select-dropdown-border);
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: var(--select-dropdown-shadow);
  }

  @b cascader-menu {
    display: inline-block;
    vertical-align: top;
    height: 180px;
    overflow: auto;
    border-right: var(--select-dropdown-border);
    background-color: var(--select-dropdown-background);
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    min-width: 110px;

    &:last-child {
      border-right: 0;
    }

    @e item {
      font-size: var(--select-font-size);
      padding: 8px 30px 8px 10px;
      position: relative;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: var(--select-option-color);
      height: var(--select-option-height);
      line-height: 1.5;
      box-sizing: border-box;
      cursor: pointer;

      @e keyword {
        color: var(--color-danger);
      }
      
      @m extensible {
        &:after {
          font-family: 'element-icons';
          content: "\e602";
          font-size: 12px;
          transform: scale(0.8);
          color: rgb(191, 203, 217);
          position: absolute;
          right: 10px;
          margin-top: 1px;
        }
      }

      @when disabled {
        color: var(--select-option-disabled-color);
        background-color: var(--select-option-disabled-background);
        cursor: not-allowed;

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

      @when active {
        color: var(--color-white);
        background-color: var(--select-option-selected);

        &.hover {
          background-color: var(--select-option-selected-hover);
        }
      }

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

      &.selected {
        color: var(--color-white);
        background-color: var(--select-option-selected);

        &.hover {
          background-color: var(--select-option-selected-hover);
        }
      }
    }

    @m flexible {
      height: auto;
      max-height: 180px;
      overflow: auto;

      .el-cascader-menu__item {
        overflow: visible;
      }
    }
  }
}
