$scene-resource-width: 560px;
$scene-tab-header-height: 55px;
$scene-tab-button-width: 160px;
$scene-tab-body-contents-top-margin: 26px;

.scene {
  height: 100vh;
}

.scene-body {
  height: calc(100% - #{$top-bar-sub-height});
}

.scene-editor-wrapper--vertical {
  @include align-center-both;
  float: left;
  width: calc(100% - #{$scene-resource-width});
  height: 100%;
  background: white;
  border-right: 2px solid $color-line-sub;
  overflow: scroll;
}

.scene-editor-wrapper--horizontal {
  @include align-center-both;
  float: left;
  width: calc(100% - #{$scene-resource-width});
  height: 100%;
  background: white;
  border-right: 2px solid $color-line-sub;
  overflow: scroll;
}

.scene-resource-wrapper {
  float: right;
  width: $scene-resource-width;
  height: 100%;
}

.scene-tab {
  &__header {
    @include align-center-both;
    width: 100%;
    height: $scene-tab-header-height;
  }

  &__button {
    @include align-center-both;
    width: $scene-tab-button-width;
    height: 100%;
    font-size: 16px;
    color: #bbbbbb;
    background-color: $color-sub-bg;
    cursor: pointer;
    &:hover {
      color: $color-primary-text;
    }

    &--selected {
      @include align-center-both;
      width: $scene-tab-button-width;
      height: 100%;
      font-size: 16px;
      cursor: default;
      color: $color-primary-text;
    }
  }

  &__body {
    height: calc(100% - #{$scene-tab-header-height} - #{$scene-tab-body-contents-top-margin});

    &__contents {
      margin: #{$scene-tab-body-contents-top-margin} 30px 0 30px;
      height: 100%;
    }
  }
}

.scene-layout--selected {
  @include upload-done;
  @include size(150px, 110px);
  position: absolute;
  background-size: 30px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: $color-accent-focus;
}

.scene-layout-wrapper {
  width: 150px;
  height: 110px;
  margin-bottom: 30px;
  cursor: pointer;

  &:not(:nth-child(3n)) {
    margin-right: 25px;
  }
}

.scene-layout {
  display: grid;

  &-info {
    height: 20px;
    margin-top: 25px;
    margin-left: 29px;
    color: #777777;
    width: 100%;
    float: left;
    display: inline-block;

    &-message {
      font-size: 13px;
      line-height: 20px;
      text-align: left;
      float: left;

      span {
        color: rgba(102, 102, 102, 0.4);
        width: 75px;
        height: 20px;
        line-height: 20px;
        padding: 2px 9px;
        margin: 0 3px;
        background-color: #f1f1f1;
      }
    }

    &-icon {
      @include info;
      @include size(20px);
      background-size: auto;
      background-repeat: no-repeat;
      background-position: center;
      margin-right: 13px;
      float: left;

    }

  }
}

.layout-item-wrapper {
  display: flex;
  flex-wrap: wrap;
  margin: 25px 30px 40px 30px;
}

.layout-wrapper--vertical {
  width: 434px;
  height: 770px;
  border: 1px solid #d8d8d8;
}

.layout-wrapper--horizontal {
  width: 962px;
  height: 542px;
  border: 1px solid #d8d8d8;
}

.layout-panel {
  &__body {
    @include panel;

    &__status {
      @include panel;

      &--dragged-over {
        @include panel;
        border: solid 2px #2e3ab1;
        background-color: rgba(92, 101, 192, 0.2);
      }

      &--selected {
        @include panel;
        border: solid 2px $color-light-purple;
      }
    }
  }

  &__guide-message {
    @include align-center-both;
    height: 100%;
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: $color-dim;
  }

  &__controller {
    display: none;
    z-index: 10;

    &--active {
      z-index: 10;
      @include size(190px, 50px);
      display: inline-flex;
      position: fixed;
      background-color: $color-light-purple;
    }

    &--icon-wrapper {
      @include screen-icon;
      @include align-center-both;
      border-right: solid 1px rgba(0, 0, 0, 0.2);
    }

    &--trash-can {
      @include trash-can-white;
      width: 100%;
      height: 100%;
      background-size: auto;
      background-repeat: no-repeat;
      background-position: center;
      cursor: pointer;
    }
  }
}

.drop-down.scene-fitMode-drop-down {
  width: 140px;
}

.drop-down__button.scene-fitMode-drop-down__button {
  width: 140px;
  font-size: 14px;
  color: $color-reversed;
}

.drop-down__button.scene-fitMode-drop-down__button > svg {
  fill: #ffffff;
}

.drop-down-menu.scene-fitMode-drop-down-button {
  width: 140px;
  height: 50px;
}

.drop-down-menu.scene-fitMode-drop-down-menu {
  width: 140px;
  top: 49px;
}

.drop-down__item.scene-fitMode-drop-down__item {
  justify-content: flex-start;
  padding-left: 14px;
}

.drop-down__item--selected.scene-fitMode-drop-down__item--selected {
  @extend .drop-down__item.scene-fitMode-drop-down__item;
}

.drop-down-arrow-ascending.scene-fitMode-drop-down-arrow-ascending {
  background-image: url(../../asset/icon/dropdown-ascender-white.svg);
}

.drop-down-arrow-descending.scene-fitMode-drop-down-arrow-descending {
  background-image: url(../../asset/icon/dropdown-ascender-white.svg);
}

.scene-fitMode-drop-down {
  &__icon {
    &-fit-to-screen {
      @include fit-to-screen;
      @include size(20px, 16px);
      margin-right: 12px;
      &--selected {
        @include fit-to-screen-focus;
        @include size(20px, 16px);
        margin-right: 12px;
      }
    }

    &-stretch {
      @include stretch;
      @include size(20px, 16px);
      margin-right: 12px;
      &--selected {
        @include stretch-focus;
        @include size(20px, 16px);
        margin-right: 12px;
      }
    }

    &-crop-to-fit {
      @include crop-to-fit;
      @include size(20px, 16px);
      margin-right: 12px;
      &--selected {
        @include crop-to-fit-focus;
        @include size(20px, 16px);
        margin-right: 12px;
      }
    }
  }
}
