#qazana-template-library-modal {
  .dialog-widget-content {
    width: 1300px;
    background-color: $editor-background-light;
  }

  .dialog-widget-header {
    position: relative;
    z-index: 1;
    padding: 0;
    background-color: #ffffff;
    box-shadow: $panel-bottom-shadow;
    // Show the shadow above the scrolled list
  }

  .dialog-buttons-wrapper {
    display: none;
  }

  .dialog-message {
    overflow: auto;
    padding: 15px;
    max-height: 85vh;
    height: 830px;
  }

  a {
    &,
    &:hover {
      color: inherit;
    }
  }

  a.qazana-template-library-blank-footer-link {
    transition: color .5s;

    &:hover {
      color: $editor-accent;
    }
  }

  .qazana-button-success {
    text-transform: uppercase;

    .qazana-button-title {
      @include padding-start(8px);
    }
  }
}

#qazana-template-library-header {
  display: flex;
  width: 100%;

   > * {
    display: table-cell;
    vertical-align: middle;
  }
}

#qazana-template-library-header-logo-area {
  @include     padding-start(15px);
  width: 15%;
  text-align: $start;

   > * {
    float: $start;

     > * {
      vertical-align: middle;
    }
  }
}

#qazana-template-library-header-logo {
  padding-top: 13px;
  color: $editor-darkest;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;

  i {
    &:before {
      content: '';
    }
  }
}

#qazana-template-library-header-menu {
  width: 100%;
  text-align: center;
}

.qazana-template-library-menu-item {
  display: inline-block;
  padding: 17px;
  cursor: pointer;

  &.qazana-active {
    border-bottom: 3px solid $editor-accent;
    background-image: linear-gradient(
    to bottom,
    #f3f3f3,
    #ffffff
    );
  }
}

#qazana-template-library-header-menu-area {
  width: 75%;

   > * {
    float: $end;
  }
}

#qazana-template-library-header-items-area {
  width: 18%;

   > * {
    float: $end;
  }
}

#qazana-template-library-header-tools {
   > * {
    float: $end;
  }
}

.qazana-template-library-header-item {
  @include     border-start(1px solid $editor-background);
  position: relative;
  box-sizing: content-box;
  height: 50px;
  cursor: pointer;
  transition: color .5s;

  &:not(:hover) {
    color: $editor-light;
  }

   > * {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
  }

   > i {
    font-size: 18px;
  }
}

#qazana-template-library-header-close-modal,
#qazana-template-library-header-save,
#qazana-template-library-header-import {
  width: 56px;
}

#qazana-template-library-header-preview {
   > * {
    float: $end;
  }
}

#qazana-template-library-header-preview-insert-wrapper {
  width: 100px;
  cursor: default;
}

#qazana-template-library-header-preview-insert {
  padding: 8px 0;
  width: 80%;
}

#qazana-template-library-header-preview-back {
  @include     padding(16.5px, 16.5px, 15px, 0);
  @include     border-end(1px solid $editor-background);
  cursor: pointer;
  transition: color .5s;

  &:not(:hover) {
    color: $editor-light;
  }

  i {
    @include    padding-end(10px);
    font-size: 18px;

    &:before {
      content: getValueByDirection( '\e908', '\e907' );
    }
  }
}

#qazana-template-library-loading {
  .qazana-loading-title {
    color: $editor-light;
  }

  .qazana-loader .cube {
    background-color: $editor-lightest;
  }
}

#qazana-template-library-templates-container {
  overflow: hidden;

  &[data-template-source='local'] {
    margin: 15px;
    box-shadow: 1px 1px 5px rgba(0,0,0,.1);
  }

  &:not([data-template-source='remote']),
  &:not([data-template-source='theme']) {
     + #qazana-template-library-footer-banner {
      display: none;
    }
  }
}

.qazana-template-library-template-remote,
.qazana-template-library-template-theme {
  float: $start;
  margin-top: 15px;
  padding: 0 15px;
  width: 25%;

  &:not(:hover) {
    .qazana-template-library-template-controls {
      opacity: 0;
    }
  }

  .qazana-template-library-template-body {
    position: relative;
    height: 330px;
    box-shadow: 0 1px 6px rgba(0,0,0,.2);
  }

  .qazana-template-library-template-screenshot {
    height: 100%;
  }

  .qazana-template-library-template-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    transition: opacity .5s;
  }

  .qazana-template-library-template-insert {
    width: 150px;
    font-size: 11px;
  }

  .qazana-template-library-template-preview {
    position: relative;
    height: 180px;
    cursor: pointer;

    i {
      position: absolute;
      top: 50%;
      left: 50%;
      color: $editor-lightest;
      font-size: 20px;
      transform: translateX(-50%) translateY(-50%);
    }
  }

  .qazana-template-library-template-insert {
    padding: 11px;

    i {
      @include padding-end(5px);
    }
  }

  .qazana-template-library-template-name {
    margin: 13px 0 10px;
    color: $editor-dark;
    text-align: center;
    font-size: 12px;
  }
}

.qazana-template-library-template-local {
  display: table;
  width: 100%;
  height: 50px;
  border-bottom: 1px solid $editor-lightest;
  background-color: #ffffff;
  table-layout: fixed;
  transition: background-color .3s linear;

  &:hover {
    background-color: lighten($editor-background-light, 3%);
  }

  &:not(:hover) {
    .qazana-template-library-template-controls {
      visibility: hidden;
    }
  }

   > * {
    display: table-cell;
    vertical-align: middle;
    text-align: start;
  }

  .qazana-template-library-template-icon {
    width: 6%;
    text-align: center;
  }

  .qazana-template-library-template-name {
    width: 35%;
    font-weight: 500;
    font-size: 13px;
  }

  .qazana-template-library-template-type {
    color: $editor-light;
  }

  .qazana-template-library-template-controls {
    width: 42%;
    direction: getInverseDirection();

     > * {
      direction: $direction;
    }

     > div {
      @include      margin-start(15px);
      display: inline-block;
      font-weight: 500;
      cursor: pointer;
      transition: color .5s;

      &:not(:hover) {
        color: $editor-light;
      }
    }
  }

  .qazana-template-library-template-control-title {
    @include margin-start(6px);
  }

  .qazana-template-library-template-delete {
    &:hover {
      color: $editor-warning;
    }
  }

  .qazana-template-library-template-insert {
    margin: 0 20px;
    padding: 8px 18px;
  }
}

#qazana-template-library-preview {
  overflow: hidden;
  height: 100%;

  iframe {
    width: 1906px;
    height: 150%;
    transform: scale(.666) translateX(getValueByDirection(-25%, 25%)) translateY(-25%);
  }
}

//Save Templates
.qazana-template-library-blank-title {
  margin-top: 55px;
  font-size: 30px;
}

.qazana-template-library-blank-excerpt {
  margin-top: 20px;
  color: $editor-light;
  font-weight: 300;
  font-size: 18px;
}

#qazana-template-library-save-template-form {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 55px;

   > * {
    height: 60px;
    font-size: 18px;
  }
}

#qazana-template-library-save-template-name {
  @include           padding-start(25px);
  width: 460px;
  border: none;
  border-radius: getValueByDirection(3px 0 0 3px, 0 3px 3px 0);
  background-color: #ffffff;
  color: $editor-light;
  font-weight: 300;

  &:focus {
    border: 1px solid $editor-background;
  }
}

#qazana-template-library-save-template-submit {
  width: 150px;
  border-radius: getValueByDirection(0 3px 3px 0, 3px 0 0 3px);
  font-weight: 500;

  &:hover {
    box-shadow: none;
  }
}

/// Import Templates
.qazana-template-library-import-title {
  margin-top: 55px;
  font-size: 30px;
}

.qazana-template-library-import-excerpt {
  color: $editor-light;
  font-weight: 300;
  font-size: 18px;
  max-width: 60%;
  margin: 20px auto;
}

#qazana-template-library-import-form {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 55px;

   > * {
    height: 60px;
    font-size: 18px;
  }
}

#qazana-template-library-import-file {
  @include padding-start(25px);
  width: 460px;
  border: none;
  border-radius: getValueByDirection(3px 0 0 3px, 0 3px 3px 0);
  background-color: #ffffff;
  color: $editor-light;
  font-weight: 300;
  padding: 16px 20px;
  border: 1px solid #e8e8e8;
  &:focus {
    border: 1px solid $editor-background;
  }

  input[type="button" i] {
      margin-top: 2px;
      margin-left: -6px;
  }
}

#qazana-template-library-import-submit {
  width: 150px;
  border-radius: getValueByDirection(0 3px 3px 0, 3px 0 0 3px);
  font-weight: 500;

  &:hover {
    box-shadow: none;
  }
}

.qazana-template-library-blank-footer {
  position: absolute;
  bottom: 90px;
  left: 50%;
  color: $editor-light;
  font-style: italic;
  font-size: 13px;
  transform: translateX(-50%);
}

#qazana-template-library-footer-banner {
  i {
    margin-top: 40px;
    color: $editor-lighter;
    font-size: 56px;
  }

  .qazana-excerpt {
    margin: 20px 0;
    color: $editor-light;
    font-weight: 500;
    font-size: 15px;
  }
}

#qazana-template-library-templates-empty-icon {
  margin-top: 40px;
  color: $editor-lightest;
  font-size: 96px;
}

#qazana-template-library-error-dialog {
  .dialog-message {
    text-align: start;
  }
}

#qazana-template-library-error-info {
  margin-top: 10px;
}

// Search Icon
#qazana-template-library-header-search-input {
  position: relative;
  margin-top: 10px;
  height: 30px;
  border: 1px solid #ebebeb;
  border-radius: 2px;

  input {
    padding: 0 27px 0 10px;
    border: none;
    border-radius: 0;
    color: #a0a5aa;
    font-size: 11px;
    line-height: 28px;
    transition: all 1s;
  }

  #qazana-template-library-header-search-input-clear,
  .fa.fa-search {
    position: absolute;
    top: 50%;
    right: 10px;
    color: #a0a5aa;
    transition: right 1s;
    transform: translateY(-50%);
  }

  #qazana-template-library-header-search-input-clear {
    right: -30px;
    z-index: 1;
    width: 30px;
    height: 30px;
    line-height: 30px;
    opacity: 0;
    cursor: pointer;
  }

  &.active {
    #qazana-template-library-header-search-input-clear {
      opacity: 1;
    }
  }
}
