$preview-header-height: 60px;
$preview-list-width: 250px;
$preview-list-bottom-height: 39px;

.preview {
  height: 100vh;
  background-color: black;
  overflow: hidden;

  &-header {
    width: 100vw;
    height: $preview-header-height;
    display: flex;
    justify-content: space-between;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.37) 57%, rgba(0, 0, 0, 0.5));
    position: absolute;
    z-index: 5;

    &__playlist-icon {
      @include playlist;
      @include size(19px);
      margin-right: 13px;
    }

    &__title {
      @include align-center-vertical;
      padding-left: 23px;
      font-size: 16px;
      font-weight: 600;
      line-height: $preview-header-height;
      color: rgba(255, 255, 255, 0.6);
    }

    &-close {
      width: 60px;
      height: 100%;
      padding: 22px;
      cursor: pointer;

      &__icon {
        @include cross-button;
        @include size(16px);
      }
    }
  }

  &-body {
    display: flex;
    align-content: flex-end;
  }

  &-list {
    width: $preview-list-width;
    height: 100%;
    z-index: 4;
    padding-top: 60px;
    background-color: black;

    &-body {
      width: 100%;
      height: calc(100vh - #{$preview-list-bottom-height } - #{$preview-header-height});
      overflow-y: auto;
      background-color: #161616;
    }

    &-bottom {
      @include align-between-horizontal;
      width: 100%;
      height: $preview-list-bottom-height;
      background-color: #161616;

      &__button {
        @include align-center-both;
        width: 124px;
        background-color: #2a2a2a;
        cursor: pointer;
        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
        }
      }

      &__previous {
        @include playlist-previous;
        @include size(25px);
      }

      &__next {
        @include playlist-next;
        @include size(25px);
      }
    }
  }

  &-item {
    display: flex;
    height: 60px;
    border-bottom: solid 1px #292929;
    user-select: none;
    cursor: pointer;

    &:hover {
      background-color: rgba(255, 255, 255, 0.1);
    }

    &__thumbnail {
      @include thumbnail;
      width: 107px;
      height: 60px;
    }

    @mixin preview-item-text {
      width: 143px;
      padding: 12px 14px 12px 15px;
    }

    &-text {
      @include preview-item-text;

      &--selected {
        @include preview-item-text;
        background-color: rgba(255, 255, 255, 0.1);
      }
    }

    &__duration {
      font-size: 11px;
      font-weight: 600;
      text-align: left;
      color: #666666;
      margin-right: 10px;
    }

    &__effect {
      font-size: 11px;
      font-weight: 600;
      text-align: left;
      color: #666666;
    }

    &-name {
      @mixin preview-item-name {
        font-size: 13px;
        text-align: left;
        color: #aaaaaa;
      }
      &__prefix {
        @include ellipse-text;
        @include preview-item-name;
        max-width: 60px;
      }

      &__suffix {
        @include preview-item-name;
        white-space: nowrap;
      }
    }
  }

  &-detail {
    @include thumbnail;
    width: calc(100vw - #{$preview-list-width});
    height: 100vh;
    float: right;
    display: flex;

    &-image {
      @include align-center-both;
    }

    &-slide {
      @include thumbnail;
      float: right;
      position: fixed;
    }

    &-fade {
      @include thumbnail;
      float: right;
      position: fixed;
      z-index: 1;
    }

    &-blind {
      background: black no-repeat center;
      float: right;
      position: fixed;

      &__image {
        background: black no-repeat center;
        float: right;
      }
    }

    &-default {
      background: black no-repeat center;
      float: right;
      position: fixed;
    }

    &--video {
      width: calc(100vw - #{$preview-list-width});
      height: 100%;
      position: fixed;
      left: 250px;

      &__center {
        @include align-center-both;
        height: 100%;
      }

      &__wrapper {
        overflow: hidden;
      }
    }
  }
}