section.cal {
  @include box-sizing(border-box);
  padding: 25px;
  @include clearfix;

  > header {
    @include clearfix;
    margin-bottom: 10px;
    opacity: .4;
    @include transition;

    &:hover {
      opacity: 1;
    }

    h2 {
      @include inline-block();
      text-transform: uppercase;
      letter-spacing: 1px;
      font-size: 14px;
      padding: 6px;
      font-size: 12px;
    }

    ul {
      @include inline-block;

      li  {
        @include inline-block;
        margin-left: 6px;
        border-left: 1px solid #ddd;
        padding: 0 6px;

        a {
          @include inline-block();
        }

        ul {
          @include inline-block();

          li {
            @include inline-block();
            padding: 0;
            border-left: 0;
          }
        }
      }
    }
  }

  ol {
    list-style: none;
    @include clearfix;
    border-left: 1px solid lighten($dark-blue, 40%);
    border-top: 1px solid lighten($dark-blue, 40%);
    width: 100%;
    @include box-sizing(border-box);

    > li {
      border-right: 1px solid lighten($dark-blue, 40%);
      border-bottom: 1px solid lighten($dark-blue, 40%);
      @include box-sizing(border-box);
      float: left;
      width: flex-grid(3) + ((flex-gutter() * 3) / 4);
      background-color: lighten($light-blue, 2%);


      header {
        border-bottom: 1px solid lighten($dark-blue, 40%);
        @include box-shadow(0 2px 2px $light-blue);
        display: block;
        margin-bottom: 2px;
        background: #FFF;

        h1 {
          font-size: 14px;
          text-transform: uppercase;
          border-bottom: 1px solid lighten($dark-blue, 60%);
          padding: 6px;

          a {
            color: $bright-blue;
            display: block;
          }
        }

        ul {
          li {
            background: #fff;
            color: #888;
            border-bottom: 0;
            font-size: 12px;

            &:hover {
              background: #fff;
            }
          }
        }
      }

      ul {
        list-style: none;
        margin-bottom: 1px;

        li {
          border-bottom: 1px solid darken($light-blue, 8%);
          padding: 6px;

          &:hover {
            background: lighten($yellow, 10%);
          }

          a {
            color: lighten($dark-blue, 10%);
          }

          &.create-module {
            position: relative;

            > div {
              display: none;
              @include position(absolute, 30px 0 0 0);
              width: 90%;
              background: rgba(#000, .9);
              padding: 10px;
              @include box-sizing(border-box);
              @include border-radius(3px);
              z-index: 99;

              &:before {
                content: "  ";
                display: block;
                background: rgba(#000, .8);
                width: 10px;
                height: 10px;
                @include position(absolute, -5px 0 0 50%);
                @include transform(rotate(45deg));
              }

              ul {
                li {
                  border-bottom: 0;
                  background: none;

                  input {
                    width: 100%;
                    @include box-sizing(border-box);
                    border-color: #000;
                    padding: 6px;
                  }

                  select {
                    width: 100%;
                    @include box-sizing(border-box);

                    option {
                      font-size: 14px;
                    }
                  }

                  a {
                    float: right;

                    &:first-child {
                      float: left;
                    }
                  }
                }
              }
            }

            &:hover {
              div {
                display: block;
              }
            }
          }
        }
      }
    }
  }

  section.new-section {
    margin-top: 10px;
    @include inline-block();
    position: relative;

    > a {
      @extend .button;
      display: block;
    }

    section {
      display: none;
      @include position(absolute, 30px 0 0 0);
      background: rgba(#000, .8);
      min-width: 300px;
      padding: 10px;
      @include box-sizing(border-box);
      @include border-radius(3px);
      z-index: 99;

      &:before {
        content: "  ";
        display: block;
        background: rgba(#000, .8);
        width: 10px;
        height: 10px;
        @include position(absolute, -5px 0 0 20%);
        @include transform(rotate(45deg));
      }

      form {

        ul {
          list-style: none;

          li {
            border-bottom: 0;
            background: none;
            margin-bottom: 6px;

            input {
              width: 100%;
              @include box-sizing(border-box);
              border-color: #000;
              padding: 6px;
            }

            select {
              width: 100%;
              @include box-sizing(border-box);

              option {
                font-size: 14px;
              }
            }

            a {
              float: right;

              &:first-child {
                float: left;
              }
            }
          }
        }
      }
    }

    &:hover {
      section {
        display: block;
      }
    }
  }
}

body.content
section.cal {
  width: flex-grid(3) + flex-gutter();
  float: left;
  overflow: scroll;
  @include box-sizing(border-box);
  opacity: .4;
  @include transition();

  > header ul {
    display: none;
  }

  &:hover {
    opacity: 1;
  }

  ol {
    li {
      @include box-sizing(border-box);
      width: 100%;

      &.create-module {
        display: none;
      }
    }
  }
}
