@import '~tc-ui/src/styles/tc-includes';


:global {
  .dropdown-wrap {
    cursor: pointer;
    position: relative;
  }
  
  .Dropdown {
    background-color: #fff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.17);
    border-radius: 5px;
    display: inline-block;
    position: absolute;
    left: 0;
    top: 5px;
    width: 100%;
    z-index: 2;
  
    ul {
      height: 100%;
      width: 100%;
      position: relative;
      z-index: 10;
      background-color: #fff;
      padding: 11px 20px;
      border-radius: 5px;
  
      li {
        list-style: none;
      }
  
      li a {
        color: #394146;
        font-family: "Roboto", Arial, Helvetica, sans-serif;
        font-size: 12px;
        display: block;
        line-height: 26px;
      }
    }
  }
  
  .dropdown-wrap.default {
    border: 1px solid $tc-gray-20;
    display: flex;
    align-items: center;
    padding: calc(2 * #{$base_unit});
    position: relative;
  
    .Dropdown {
      ul.dropdown-menu-list {
        padding: 10px 0px;
        li {
          padding: 0 20px;
          @include ellipsis;
        }
  
        li:focus,
        li:hover {
          background-color: $tc-gray-neutral-dark;
          outline: none;
        }
      }
    }
  }
  
  .dropdown-wrap.default::after {
    content: " ";
    width: 10px;
    height: 10px;
    display: block;
    right: 10px;
    top: 50%;
    position: absolute;
    transform: translateY(-50%) rotate(45deg);
    border-bottom: 2px solid $tc-gray-20;
    border-right: 2px solid $tc-gray-20;
  }

  .dropdown-wrap {
    &.focused {
      box-shadow: 0 0 2px 0 rgba(6, 129, 255, 0.7);
      border: 1px solid $tc-dark-blue-100!important;
    }
    .handle-keyboard {
      position: absolute;
      width: 100%;
      max-height: 40px;
      top: 0;
      left: 0;
      height: 100%;

      &:focus {
        outline: none;
      }
    }
  }
  
  .Dropdown.hide {
    display: none;
  }
  
  .Dropdown.pointer-left:before {
    right: initial;
    left: 15px;
  }
  
  .UserDropdownMenu .Dropdown.pointer-shadow {
    margin-top: 35px;
  
    &:before {
      content: '';
      display: block;
      position: absolute;
      top: -6px;
      right: 24px;
      width: 12px;
      height: 12px;
      background: #FFFFFF;
      border-right: 1px solid $tc-gray-20;;
      border-bottom: 1px solid $tc-gray-20;;
      transform: rotate(-135deg);
      z-index:999;
    }
  }
  
  .Dropdown.pointer-hide:before {
    display: none;
  }
  
  .Dropdown.no-autoclose {
    cursor: default;
  }
  
  .new-theme {
    text-align: left;
    height: 30px;
    color: $tc-black;
    background: $tc-gray-neutral-light;
    border: 1px solid $tc-gray-20;
    @include roboto;
    font-size: 13px;
    line-height: 20px;
    width: 100%;
    border-radius: 2px;
    position: relative;
  
    .dropdown-menu-header {
      width: 100%;
      border: 0;
      height: 28px;
      line-height: 28px;
      margin: 0;
      padding: 0 0 0 10px;
      color: $tc-gray-50;
      font-size: 13px;
    }
    &:after{
      display: block;
      content: '';
      position: absolute;
      width: 10px;
      height: 14px;
      right: 11px;
      top: 50%;
      margin-top: -7px;
      background: url("./icon-select.png") left top no-repeat;
      background-size: 10px 14px;
      z-index:2;
    }
    .Dropdown {
      ul.dropdown-menu-list {
        padding: 10px 0px;
        li {
          padding: 0 20px;
          @include ellipsis;
        }
        li:focus,
        li:hover {
          background-color: $tc-gray-neutral-dark;
          outline: none;
        }
      }
    }
  }
}
  