@import (reference) "lib/bootstrap_mixins.less";
@import (reference) "lib/mixins";
@import (reference) "lib/variables";

#gallery {
  width: 200px;
  z-index: -1;
  position: fixed;
  top: 37px;
  bottom: 0;
  left: -200px;
  font-family: @monoFontFamily;
  font-size: 15px;
  line-height: 20px;
  .user-select(none);

  .scrollbox {
    position: absolute;
    top: 25px;
    bottom: 33px;
    left: 0px;
    right: 0px;

    .local_themes_list {
      border-bottom: 1px solid #b6b6b6;

      .theme_title {
        .ellipsis();
      }

      li {
        position: relative;

        .remove_theme {
          display: none;
          font-size: 21px;
          padding: 0 5px 0 0;
          opacity: .5;
          position: absolute;
          top: 2px;
          right: 0;
        }

        &:hover {
          .remove_theme {
            display: block;

            &:hover {
              opacity: 1;
            }
          }
        }
      }
    }
  }

  h5 {
    margin: 0;
    padding: 0 5px;
    font-family: @systemFontFamily;
    background: #ffffff;
    background: -moz-linear-gradient(top,  #ffffff 0%, #ffffff 23%, #f4f4f4 54%, #ececec 62%, #ededed 100%);
    background: -webkit-linear-gradient(top,  #ffffff 0%,#ffffff 23%,#f4f4f4 54%,#ececec 62%,#ededed 100%);
    background: -o-linear-gradient(top,  #ffffff 0%,#ffffff 23%,#f4f4f4 54%,#ececec 62%,#ededed 100%);
    background: linear-gradient(to bottom,  #ffffff 0%,#ffffff 23%,#f4f4f4 54%,#ececec 62%,#ededed 100%);
    height: 16px;
    line-height: 16px;
    font-size: 11px;
    border-bottom: 1px solid #b6b6b6;
    border-top: 1px solid #fff;
    text-transform: uppercase;
    font-weight: 600;
    color: #333 !important;

    .theme_count {
      color: #666;
      font-size: 10px;
      font-weight: normal;
      line-height: 13px;
      margin-top: 1px;
    }

  }

  ul {
    list-style-type: none;
    margin:0;

    li {
      cursor: pointer;
      padding: 2px 2px 2px 4px;
      font-size: 13px;
      width: 100%;
      box-sizing: border-box;

      a {
        text-decoration: none;
        color: inherit;
        display: block;
        width: 100%;
        .ellipsis();
      }
    }
  }

  .selected_bglight {
    #gradient > .vertical(rgba(0,0,0,.1),rgba(0,0,0,.3));
    background-color: transparent;
    border-top: 1px solid rgba(0,0,0,.1);
    border-bottom: 1px solid rgba(0,0,0,.2);
  }

  .selected_bgdark {
    #gradient > .vertical(rgba(255,255,255,.1),rgba(255,255,255,.3));
    background-color: transparent;
    border-top: 1px solid rgba(255,255,255,.1);
    border-bottom: 1px solid rgba(255,255,255,.2);
  }

  .titlebar {
    max-width: 200px;
    min-width: 200px;

    .actions {
      @width: 29px;
      @height : 24px;
      .add {
        right: 0;
        border-left: 1px solid #989898;
      }

      .dark_filter, .light_filter  {
        display: block;
        float: left;
        top:0;
        border-right: 1px solid #989898;
        width: 85px;
        height: @height;
        text-align: center;
        cursor: pointer;
        background-position: center center;
        background-repeat: no-repeat;
        text-decoration: none;
        color: #333;
        font-size: 13px;

        &:active, &.active {
          background-color: rgba(0,0,0,.2);
          .box-shadow(inset 0 0 3px rgba(0,0,0,.2));
        }

      }

      .light_filter {
        right: @width + 1;
        border-right: 0;
        &:before { background-color: #FFF;}
      }

      .dark_filter {
        right: @width*2 + 2;
        &:before { background-color: #000;}
      }
    }


  }

  .dark_theme_icon, .light_theme_icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    position: relative;
    top: 3px;
    left: 2px;

    &:before {
      font-size: 10px;
      position: absolute;
      top: 1px;
      left: 3px;
      line-height: 10px;
      font-weight: 500;
    }
  }

  .dark_theme_icon {
    background-color: #000;
    border: 1px solid rgba(255,255,255,.5);

    &:before {
      content: "D";
      color: rgba(255,255,255,.5);
    }
  }

  .light_theme_icon {
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.5);

    &:before {
      content: "L";
      color: rgba(0,0,0,.5);
    }

  }

  .searchbar {
    #gradient > .vertical(#e8e8e8, #c2c2c2);
    border-top: 1px solid #969696;
    .box-shadow(inset 0 1px 0 #f5f5f5);
    position: fixed;
    bottom: 0px;
    height: 32px;
    width: 200px;

    input[type="search"] {
      border-radius: 4px;
      margin: 3px 6px;
      font-size: 13px;
      line-height: 16px;
      height: 16px;
      width: 156px;
      padding-left: 24px;
      border-color: #989898;
      box-shadow: 0 1px 2px rgba(0,0,0,.05);

      &:-moz-placeholder {
        line-height: 16px;
        color: #bbb;
      }
      &:-ms-input-placeholder {
        line-height: 16px;
        color: #bbb;
      }
      &::-webkit-input-placeholder {
        line-height: 16px;
        color: #bbb;
      }
    }

    &:after {
      content: "\e002";
      display: block;
      position: absolute;
      top: 9px;
      left: 13px;
      z-index: 999999;
      width: 16px;
      height: 16px;
      font-size: 13px;
      opacity: 0.75;
      font-family: "tmthemeeditor" !important;
      font-style: normal !important;
      font-weight: normal !important;
      font-variant: normal !important;
      text-transform: none !important;
      speak: none;
      line-height: 1;
      color: #333;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      .scale(1.25);
      display: inline-block;
    }
  }

}

.clear_search {
  color: #bababa;
  z-index: 9999999;
  position: absolute;
  top: 8px;
  right: 11px;
  width: 15px;
  height: 15px;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  font-weight: 300;
}

.tabbar, .sidebar, .titlebar, .actionbar, .preview, .dl-save, .sep,
#new-popover, #edit-popover, #gc-popover, #gallery .titlebar, #gallery .scrollbox,
#gallery .searchbar, .theme-title, .preview-footer {
  -webkit-transition: -webkit-transform .4s ease;
          transition: transform .4s ease;
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;

  &.slide {
    .translate3d(200px,0,0);
  }
}

.transition-off {
  .tabbar, .sidebar, .titlebar, .actionbar, .preview, .dl-save, .sep,
  #new-popover, #edit-popover, #gc-popover, #gallery .titlebar, #gallery .scrollbox,
  #gallery .searchbar, .theme-title, .preview-footer {
    .transition(none);
  }
}


.tooltip {
  text-shadow: none;
  font-weight: 600;
}
