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

  > header {
    @include clearfix;
    margin-bottom: 10px;
    background: #efefef;
    border: 1px solid #ddd;

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

    ul {
      @include inline-block;

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

        a {
          @include inline-block();
        }

        ul {
          @include inline-block();

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

  ol {
    list-style: none;
    @include clearfix;
    @include box-sizing(border-box);
    border-left: 1px solid #333;
    border-top: 1px solid #333;
    width: 100%;

    > li {
      border-right: 1px solid #333;
      border-bottom: 1px solid;
      @include box-sizing(border-box);
      float: left;
      width: flex-grid(3) + ((flex-gutter() * 3) / 4);

      header {
        border-bottom: 1px solid #000;
        @include box-shadow(0 1px 2px #aaa);
        display: block;
        margin-bottom: 2px;

        h1 {
          font-size: 14px;
          text-transform: uppercase;
          border-bottom: 1px solid #ccc;
          padding: 6px;

          a {
            color: #000;
            display: block;
          }
        }

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

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

        li {
          background: #efefef;
          border-bottom: 1px solid #666;
          padding: 6px;

          &.create-module {
            position: relative;

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

              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;

    > a {
      @extend .button;
      @include inline-block();
    }

    section {
      display: none;

      header {
        background: #fff;
        text-align: left;
      }

      form {
        background: #fff;
        width: 50%;
        padding: 6px;
        border: 1px solid #000;
        margin: 0 auto;
        @include box-shadow(0 0 2px #333);
        position: relative;

        &:before {
          background: #fff;
          border-left: 1px solid #000;
          border-top: 1px solid #000;
          content: "  ";
          display: block;
          height: 10px;
          left: 50%;
          position: absolute;
          top: -6px;
          @include transform(rotate(45deg));
          width: 10px;
          z-index: 0;
        }

        select {
          margin-bottom: 6px;
          width: 100%;

          option {
            padding: 10px 0 !important;
          }
        }

        input[type="submit"] {
          display: block;
          margin-bottom: 6px;
          width: 100%;
        }

        a {

          &:first-child {
            float: left;
          }

          &:last-child {
            float: right;
          }
        }
      }
    }

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

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

      > header ul {
        display: none;
      }

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