// studio - views - course static pages
// ====================

body.course.static-pages {

  .new-static-page-button {
    @include grey-button;
    display: block;
    text-align: center;
    padding: 12px 0;
  }

  .nav-introduction-supplementary {

    .icon-question-sign {
      display: inline-block;
      vertical-align: baseline;
      margin-right: ($baseline/4);
    }

  }

  .unit-body {
    padding: 0;

    .details {
      display: block !important;

      h2 {
        margin: 0 0 5px 0;
      }
    }

    .wrapper-component-editor {
      z-index: 9999;
      position: relative;
      background: $lightBluishGrey2;
    }

    .component-editor {
      @include edit-box;
      @include box-shadow(none);
      display: none;
      padding: 0;
      border-radius: 2px 2px 0 0;

      //Overrides general edit-box mixin
      .row {
        margin-bottom: 0px;
      }

      // This duplicates the styling from Unit page editing
      .module-actions {
        @include box-shadow(inset 0 1px 1px $shadow);
        padding: 0px 0 10px 10px;
        background-color: $gray-l6;

        .save-button {
        margin: ($baseline/2) 8px 0 0;
        }
      }
    }
  }

  .component-editor {
    border: none;
    border-radius: 0;
  }

  .components > li {
    margin: 0;
    border-radius: 0;

    &.new-component-item {
      background: transparent;
      border: none;
      @include box-shadow(none);
    }
  }

  .component {
    position: relative;
    border: 1px solid $mediumGrey;
    border-top: none;

    &:first-child {
      border-top: 1px solid $mediumGrey;
    }

    &:hover {
      border: 1px solid $mediumGrey;
      border-top: none;

      &:first-child {
        border-top: 1px solid $mediumGrey;
      }

      .drag-handle {
        background: url(../img/drag-handles.png) center no-repeat #fff;
      }
    }

    .drag-handle {
      position: absolute;
      display: block;
      top: 0;
      right: 0;
      z-index: 11;
      width: 35px;
      height: 100%;
      border: none;
      background: url(../img/drag-handles.png) center no-repeat #fff;

      &:hover {
        background: url(../img/drag-handles.png) center no-repeat #fff;
      }
    }

    .component-actions {
      position: absolute;
      top: 20px;
      right: 44px;
    }
  }

  .component.editing {
    border-left: 1px solid $mediumGrey;
    border-right: 1px solid $mediumGrey;

    .xmodule_display {
      display: none;
    }
  }

  .new .xmodule_display {
    background: $yellow;
  }

  .xmodule_display {
    padding: 20px 20px 22px;
    font-size: 24px;
    font-weight: 300;
    background: #fff;
    @include transition(background-color 3s);
  }

  .static-page-item {
    position: relative;
    margin: 10px 0;
    padding: 22px 20px;
    border: 1px solid $darkGrey;
    border-radius: 3px;
    background: #fff;
    @include box-shadow(0 1px 2px rgba(0, 0, 0, .1));

    .page-name {
      font-size: 19px;
      font-weight: 700;
    }

    .item-actions {
      margin-top: 19px;
      margin-right: 12px;
    }
  }
}

.edit-static-page {
  .main-wrapper {
    margin-top: 40px;
  }

  .static-page-details {
    @extend .window;
    padding: 32px 40px;

    .row {
      border: none;
    }
  }

  .page-display-name-input {
    width: 100%;
    font-size: 20px;
  }

  .page-contents {
    @include box-sizing(border-box);
    width: 100%;
    height: 360px;
    padding: 15px;
    border: 1px solid #b0b6c2;
    border-radius: 2px;
    @include linear-gradient(top, rgba(255, 255, 255, 0), rgba(255, 255, 255, .3));
    background-color: #edf1f5;
    @include box-shadow(0 1px 2px rgba(0, 0, 0, .1) inset);
    font-family: Monaco, monospace;
    font-size: 13px;
    color: #3c3c3c;
    outline: 0;
  }
}

