// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>

.library-bar {
  background-color: $color-white;
  bottom: 0;
  height: 100%;
  left: 0;
  position: fixed;
  width: 250px;

  .library-bar-inside {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 60px;

    .library-tabs {
      align-items: center;
      background-color: $color-gray-lighter;
      display: flex;
      justify-content: space-around;
      margin: 0;
      padding-top: 12px;

      li {
        background-color: darken($color-gray-lighter, 10%);
        border-top-left-radius: 3px;
        border-top-right-radius: 3px;
        color: $color-gray;
        cursor: pointer;
        font-weight: bold;
        font-size: $fs14;
        padding: .6rem;
        text-align: center;
        width: 118px;

        &:hover {
          color: $color-white;
        }

        &.current {
          background-color: $color-white;
          color: $main-ui-color;
        }

      }

    }

    .library-elements {
      display: flex;
      flex-direction: column;
      height: 85%;
      overflow-y: auto;
      padding-bottom: 20px;

      li {
        border-bottom: 1px solid $color-gray-lighter;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        padding: 10px;

        span.element-title {
          color: $color-gray-dark;
          font-weight: bold;
          margin-bottom: 5px;
          overflow-x: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        input.element-title {
          border: 0;
          height: 30px;
          padding: 5px;
        }

        .close {
            background: $color-white;
            cursor: pointer;
            padding: 5px 10px;

            svg {
              fill: $color-gray;
              height: 20px;
              transform: rotate(45deg) translateY(7px);
              width: 20px;
            }
        }

        .element-subtitle {
          color: $color-gray-light;
          font-style: italic;
        }

        &:hover,
        &.current {
          background-color: $main-ui-color;

          span.element-title,
          .element-subtitle {
            color: $color-white;
          }
          input.element-title {
            color: $color-gray-dark;
          }
        }

      }

    }

  }

}
