@import './base.less';

.@{css-prefix} {
  &.layout {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    .flex-direction(column);
    -webkit-box-flex: 1;
    .flex(auto);

    &.has-sider {
      -webkit-box-orient: horizontal;
      -webkit-box-direction: normal;
      .flex-direction(row);
    }

    > .header, > .footer {
      -webkit-box-flex: 0;
      .flex(none);
    }
    > .header {
    }
    > .content {
      -webkit-box-flex: 1;
      .flex(auto);
    }
    > .footer {
      padding: 20px 0;
      color: rgba(0,0,0,.65);
      text-align: center;
    }
    > .sider {
      .transition(all .15s cubic-bezier(.645,.045,.355,1));
      position: relative;
      min-width: 0;
      flex: 0 0 200px;
      width: 200px;
    }

    > .toggle {
      display: none;
    }
  }
}

/* Mobile */
@media only screen and (max-width: @largestMobileScreen) {
  .@{css-prefix} {
    &.layout.responsive {
      &.has-sider {
        .flex-direction(column);
        margin: 0;
      }
      > .sider {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
        display: none;
        overflow-y: auto;
        height: 100%;
      }
      > .toggle {
        display: block;
        position: fixed;
        color: #666;
        z-index: 1000;
        background: #fff;
        left: 0;
        top: -1000px;
        .padding;
        box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
      }
    }
  }
}
