// Fonts, colours etc.
@import "variables.less";

// Import a subset of Twitter Bootstrap
@import "bootstrap/reset.less";
@import "bootstrap/mixins.less";

// Base CSS
@import "bootstrap/scaffolding.less";
@import "bootstrap/type.less";
@import "bootstrap/code.less";
@import "bootstrap/forms.less";
@import "bootstrap/tables.less";

// Components: Buttons & Alerts
@import "bootstrap/buttons.less";
@import "bootstrap/alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
@import "bootstrap/labels-badges.less";

// Components: Popovers
@import "bootstrap/modals.less";
@import "bootstrap/tooltip.less";
@import "bootstrap/popovers.less";

@import "footer.less";


.vertical-scrolling() {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#list-pane {
  background: #f3f3f3;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  bottom: 0;
  width: 230px;
  .vertical-scrolling();
  border-right: 1px solid #ddd;
  .box-shadow(0 0 20px #ddd);

  h2 {
    font-size: @baseFontSize + 2px;
    line-height: @baseFontSize + 12px;
    padding: 0 18px;
    margin: 0;
    background: #f9f9f9;

    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    &:first-child {
      border-top: 0px;
    }
  }

  ul {
    list-style: none;
    margin: 0;
  }

  & > ul > li {
    padding: 15px 18px;

    // General link styling
    a {
      display: block;
      font-weight: lighter;
      padding: 4px 0;
      text-decoration: none;
      .text-overflow();

      // Don't underline labels on hover
      &:hover {
        text-decoration: none;
        .type-name {
          text-decoration: underline;
        }
      }
    }

    // Protocol links
    & > a {
      .namespace {
        font-size: @smallFontSize;
        font-weight: lighter;
        color: @grayLight;
        padding-left: 5px;
      }
    }

    // Message and named type links
    & > ul > li > a {
      padding: 4px 6px;

      .label {
        margin-left: 4px;
        font-size: @smallFontSize;
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15);
        background-color: fade(@grayLight, 50%);
        &-info {
          background-color: fade(@infoText, 50%);
        }
      }

      &:hover .label {
        background-color: fade(@grayLight, 80%);
        &-info {
          background-color: fade(@infoText, 80%);
        }
      }
    }
  }

  // Highlight on selected links
  li.selected {
    background: white;
    .box-shadow(0 0 3px #ddd);
    .border-radius(3px);
  }


  // If multiple schemata are present in the list, highlight the currently selected one.
  // If there is only one schema, don't bother with the highlight, to reduce visual clutter.
  & > ul.multiple-schemata > li.selected {
    background: @blueDark;
  }
}

#content-pane {
  padding: 11px 25px 50px 260px;

  h2.namespace {
    font-size: @baseFontSize;
    color: @gray;
    margin: 0;
  }
  h1.type-name {
    margin-top: 0;
  }

  .type-doc {
    margin: @baseLineHeight 0;
  }
  table {
    margin-top: @baseLineHeight;
    td {
      border-bottom: 1px solid @tableBorder;
    }
  }
}

// Override some styles from bootstrap/popovers.less
.popover.avrodoc-named-type {
  width: 600px;

  .popover-title {
    .text-overflow();
    .namespace { color: @gray; }
    .type-name { font-weight: bold; }
  }

  .popover-content {
    .vertical-scrolling();
    font-size: 85%;
    table th, table td {
      padding: 4px 5px;
    }
  }
}
