@import "defs.less";


body {
  background-color: white;
  color: black;
  font-family: Verdana, Arial, Helvetica, Sans-Serif;
  font-size: 8pt;
  margin: 0;
  padding: 0;
}

form th {
  text-align: right;
  vertical-align: top;
}

h1 {
  font-size: 10pt;
}

h3 {
  margin-top: 2em;
}

img {
  border: 0;
}

label.required {
  font-weight: bold;
}

pre, textarea {
  font-size: 10pt;
  font-family: monospace;
}

span {
  &.label-draft {
    color: #008000;
  }

  &.label-submitted {
    color: #b7a93e;
  }

  &.label-discarded {
    color: #fe5757;
  }
}

td.help {
  font-size: 10px;
  color: #333;
  padding-top: 0;
}

textarea {
  resize: none;
}

ul.errorlist {
  color: #DD0000;
  display: inline;
  font-weight: bold;
  margin: 0 0 0 15px;
  padding: 4px 8px;

  li {
    display: inline;
  }
}

.loading img {
  margin-right: 4px;
  vertical-align: text-bottom;
}


/****************************************************************************
 * Buttons
 ****************************************************************************/

.btn,
input[type="button"],
input[type="submit"] {
  // Button Base
  cursor: pointer;
  display: inline-block;
  #gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient
  padding: 3px 8px;
  text-shadow: 0 1px 1px rgba(255,255,255,.75);
  color: #333;
  font-size: 13px;
  line-height: normal;
  border: 1px solid #ccc;
  border-bottom-color: #bbb;
  .border-radius(4px);
  .box-shadow(inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05));

  &:hover {
    background-position: 0 -15px;
    color: #333;
    text-decoration: none;
  }

  // Primary Button Type
  &.primary, &.default {
    color: white;
    text-shadow: none;

    .gradientBar(@btn-primary-color1, @btn-primary-color2);
  }

  // Transitions
  .transition(.1s linear all);

  // Active and Disabled states
  &:active {
    .box-shadow(inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05));
  }

  &.disabled {
    cursor: default;
    background-image: none;
    .reset-filter();
    .opacity(65);
    .box-shadow(none);
  }

  &[disabled] {
    // disabled pseudo can't be included with .disabled
    // def because IE8 and below will drop it ;_;
    cursor: default;
    background-image: none;
    .reset-filter();
    .opacity(65);
    .box-shadow(none);
  }

  // Button Sizes
  &.large {
    font-size: 130%;
    line-height: normal;
    padding: 9px 14px 9px;
    .border-radius(6px);
  }

  &.small {
    padding: 7px 9px 7px;
    font-size: 11px;
  }

  &.danger {
    color: white !important;
    .gradientBar(#ee5f5b, #c43c35);
  }
}


// Help Firefox not be a jerk about adding extra padding to buttons
button.btn,
input[type=submit].btn {
  &::-moz-focus-inner {
    padding: 0;
    border: 0;
  }
}


/****************************************************************************
 * Banners
 ****************************************************************************/
.banner {
  background: @draft-bg-color;
  border: 1px @draft-border-color solid;
  margin-bottom: 10px;
  padding: 8px 10px;
  z-index: @z-index-banner;

  h1 {
    display: inline;
    margin-right: 0.2em;
    padding: 0;
  }

  input {
    margin-left: 10px;
  }
}


/****************************************************************************
 * Box classes
 ****************************************************************************/
.box, .modalbox {
  background-color: white;
  background-image: url('../images/box_top_bg.png');
  background-position: top left;
  background-repeat: repeat-x;
  border: 1px @box-border-color solid;
  .border-radius(@box-border-radius);
  .box-shadow(@box-shadow);
}

.box.important {
  background-color: #fdf2a0;
  background-image: url('../images/gold_box_top_bg.png');
  border: 1px #b7a93e solid;
  padding: 0 10px;

  .box-inner {
    background: url("../images/important.png") no-repeat top left;
    padding: 0 0 0 50px;
  }
}

.box.tip {
  background-color: #fdf2a0;
  background-image: url('../images/gold_box_top_bg.png');
  border: 1px #b7a93e solid;
  padding: 0 10px;

  .box-inner {
    background: transparent;
  }

  h1 {
    padding-left: 0;
  }
}

.box.yay {
  background-color: #fdf2a0;
  background-image: url('../images/gold_box_top_bg.png');
  border: 1px #b7a93e solid;
  padding: 0 10px;

  .box-inner {
    background: transparent;
    position: relative;
  }

  h1 {
    padding-left: 2.5em;
  }

  img {
    float: left;
    left: -5px;
    margin: 0;
    padding: 0;
    position: absolute;
    top: -20px;
  }
}

.box .star {
  cursor: pointer;
}

h1.title,
.modalbox-title {
  background: @box-title-bg;
  border-bottom: 1px #728eac solid;
  margin: 0;
  padding: 5px 10px 5px 5px;
  font-size: 120%;
  .border-radius(@box-border-radius @box-border-radius 0 0);
}

.box .main {
  padding: 5px;
}

.box-container {
  margin-bottom: 10px;
  width: 100%;
}

.box-inner,
.modalbox-inner {
  background-image: url('../images/box_bottom_bg.png');
  background-position: bottom left;
  background-repeat: repeat-x;
  padding-bottom: 1px; /* IE wants this and it does no harm. */
  .border-radius(@box-border-radius);
}

.box-inner form {
  margin: 0;
}

.datagrid-title,
.datagrid-titlebox {
  background: @box-title-bg !important;
}

.datagrid-header {
  border-top: 0 !important;
}

.datagrid-menu {
  border: 1px #888A85 solid;
}

.datagrid .shipit-count {
  background-image: url("../images/shipit_bg.png");
  background-position: top left;
  background-repeat: repeat-x;
  background-color: #6bc810;
  border: 1px #478a06 solid;
  display: block;
  color: white;
  font-weight: bold;
  padding: 0.05em 0.5em;
  white-space: nowrap;
  .border-radius(10px);
}

.server-error-box .response-data {
  margin-top: 2em;
}


/****************************************************************************
 * Modal Boxes
 ****************************************************************************/
.modalbox {
  margin: 10px;

  .modalbox-contents {
    margin: 10px;
    position: relative; /* Makes this the offsetParent for calculations. */
  }

  .modalbox-buttons {
    position: absolute;
    margin: 10px;
    text-align: right;
    bottom: 0;
    right: 0;

    input {
      margin-left: 10px;
    }
  }
}

/****************************************************************************
 * Inline editor forms
 ****************************************************************************/
.editicon {
  margin-left: 4px;

  img {
    vertical-align: bottom;
  }
}

.inline-editor-form {
  display: block;
  margin: 0;
  padding: 0;
  white-space: nowrap;

  input[type="submit"] {
    margin-left: 5px;
  }

  input[type="text"] {
    border: 1px #888a85 solid;
    padding: 1px 2px;
  }

  textarea {
    border: 1px #888a85 solid;
    font-size: 10pt;
    margin: 5px 0 0 0;
    padding: 10px;
  }
}

.loading-indicator {
  display: inline;
}


/****************************************************************************
 * Forms
 ****************************************************************************/
form table td {
  padding: 8px 8px 4px 4px;

  &.label {
    text-align: right;
    font-weight: bold;
  }
}

.formdlg {
  tr {
    padding-top: 4px;
  }

  td.label {
    white-space: nowrap;
  }

  .error {
    color: #DD0000;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 4px 8px;
  }

  .errorlist {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;

    li {
      display: list-item;
      padding: 2px 4px;
    }
  }

  .spinner {
    float: left;

    img {
      vertical-align: top;
    }

    h1 {
      display: inline;
      margin-left: 10px;
    }
  }
}


/****************************************************************************
 * Account page
 ****************************************************************************/
.prefsbuttons {
  padding: 1em;
  text-align: center;
}

.prefsgroup ul {
  list-style: none;
  padding-left: 0;
  margin: 5px;
}

.section {
  margin-bottom: 20px;

  .title {
    background: #DDDDDD;
    border: 1px black solid;
    padding: 4px 8px;
  }

  .body {
    margin-left: 20px;
    padding: 10px;
  }
}

#headerbar {
  background: @headerbar-bg;
  border-bottom: 1px #DDDDDD solid;
  color: white;
  margin: 0;
  padding: @headerbar-padding;

  br {
    clear: both;
    height: 0;
  }

  #title {
    color: white;
    display: inline;
    font-weight: normal;
    font-size: 120%;
    vertical-align: middle;
    margin: 0;
    padding: 0;

    a {
      color: white;
      font-size: 120%;
      text-decoration: none;
    }

    .version {
      color: #E0E0E0;
      font-weight: normal;
      font-size: 90%;
    }
  }

  #logo {
    position: absolute;
    top: 0px;
    left: @headerbar-logo-padding-horiz;
  }

  #search {
   float: right;
   margin: 0 1em;

   input {
     border: 1px black solid;
     margin: 0;
     padding: 2px;
     .border-radius(6px);
     background-color: #EEEEEE;
     font-size: 1.2em;
   }
  }
}

#rbinfo {
  float: left;
  position: absolute;
  left: 0;
  padding-top: 0.2em;
  padding-left: @headerbar-padding-left;

  img {
    display: inline;
    vertical-align: middle;
  }
}

#accountnav {
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: @z-index-base;
  float: right;

  li {
    display: block;
    float: right;
    margin: -@headerbar-padding 0;
    padding: 0;
    position: relative;
    white-space: nowrap;

    &:hover {
      background: @headerbar-bg-active;

      ul {
        display: block;
        z-index: @z-index-menu;
      }
    }

    a {
      color: white;
      display: block;
      font-size: 120%;
      margin: 0;
      padding: 0 1em;
      text-decoration: none;
      height: 32px;
      vertical-align: middle;
      line-height: 32px;

      &.user-nav-item {
        padding-left: 0.2em;
      }
    }

    img {
      display: inline;
      vertical-align: top;
      margin: 0;
      padding: 0;
    }

    ul {
      background-color: @headerbar-bg;
      display: none;
      margin: 0;
      min-width: @headerbar-menu-min-width;
      padding: 0;
      position: absolute;
      right: 0;
      .border-radius(0 0 @box-border-radius @box-border-radius);

      li {
        float: none;
        margin: 0;
        padding: 0;
        text-align: right;

        &:last-child {
          .border-radius(0 0 @box-border-radius @box-border-radius);
        }

        a {
          margin: 0;
        }
      }
    }
  }
}

#activity-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  text-align: center;
  font-weight: bold;
  background-color: #fce94f;
  background-image: url("../images/spinner.gif");
  background-position: 0.4em 0.4em;
  background-repeat: no-repeat;
  border: 1px #c4a000 solid;
  border-top: 0;
  margin-left: -3em;
  padding: 0.5em 0.6em 0.5em 2.2em;
  width: 6em;
  z-index: @z-index-spinner;

  &.error {
    background-color: #ffcd9c;
    width: 28em;
    margin-left: -14em;
    background-image: none;
    padding-left: 0.6em;

    a {
      margin-left: 1em;
      color: #0000CC;
      text-decoration: none;
    }
  }
}

#error {
  div {
    background: #ffcd9c;
    border: 1px #9a4306 solid;
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  h1 {
    display: inline;
    margin: 0;
    padding: 0;
  }

  input[type='submit'] {
    margin-left: 10px;
  }
}

#manual-updates {
  padding: 1em;

  .main {
    padding: 1em;

    h1, h2 {
      margin-top: 2em;
    }
  }

  p {
    font-size: 9pt;
  }
}

#navbar {
  background: @navbar-bg;
  border-bottom: 1px @navbar-border-color solid;
  list-style: none;
  margin: 0 0 1em 0;
  min-height: 1.5em;
  padding: @headerbar-padding;
  padding-left: @headerbar-padding-left;

  li {
    display: inline;
    height: 30px;
    margin: 0 1em 0 0;
  }

  a {
    color: @navbar-text-color;
    font-size: 110%;
    text-decoration: none;
  }

  .newreviewrequest {
    text-align: right;
  }
}

body.admin #navbar {
  background: url("../images/admin/yellow_bg_small.png") repeat-x #F9F2C9;
  margin: 0;

  a {
    color: black;
  }
}

#page-container {
  padding: 0 @page-container-padding @page-container-padding @page-container-padding;
}

#searchbar {
  position: absolute;
  right: 0;
  margin-top: -3px;
}


/****************************************************************************
 * Auto-complete widget
 ****************************************************************************/

.ui-autocomplete-results {
  background: #ffffff;
  border: 1px solid #808080;
  overflow: hidden;
  position: absolute;
  width: 100%;
  z-index: @z-index-menu;

  ul {
    margin: 0;
    padding: 0;
    width: 100%;

    li {
      cursor: pointer;
      margin: 0;
      padding: 3px 6px;
      position: relative;
      white-space: nowrap;

      span {
        margin-left: 6px;
        position: absolute;
        right: 6px;
      }
    }
  }

  .ui-autocomplete-over {
    background: #71a5db;
    color: #FFF;
  }
}

.ui-autocomplete-footer {
  background: #ECECEC;
  border-top: 1px #C0C0C0 solid;
  padding: 3px 6px;
}


/****************************************************************************
 * User page hover
 ****************************************************************************/

#user-infobox {
  background: #F9F9F9;
  border: 1px black solid;
  display: block;
  height: 12em;
  padding: 1em;
  position: absolute;
  min-width: 30em;
  z-index: @z-index-dialog;
  .border-radius(10px);
  .box-shadow(0px 0px 4px #000);

  &.loading {
    background-image: url("../images/spinner.gif");
    background-position: 1em 1em;
    background-repeat: no-repeat;
  }

  .infobox-pic {
    float: left;
    width: 85px;
    margin-right: 1em;
  }

  .infobox-text {
    color: black;
    float: left;
  }

  p {
    font-size: 1.2em;
    margin: 0.5em 0;
    padding: 0;
  }

  h2 {
    font-size: 1.4em;
    margin: 0 0 0.5em 0;
    padding: 0;
    text-decoration: none;
  }

  .logged-in {
    margin-top: 2em;
  }

  .logged-in, .joined {
    font-size: 0.8em;
  }

  #infobox-text h2 {
    margin-top: 0;
    padding-top: 0;
  }
}

#submitter {
  position: relative;
}


/****************************************************************************
 * New Review Request
 ****************************************************************************/
.new-review-request {
  background-color: #fefadf;
  background-image: url('../images/review_request_box_top_bg.png');

  label {
    color: #575012;
    font-weight: bold;
  }

  tr {
    padding-top: 4px;
  }

  .box-inner {
    background-image: url('../images/review_request_box_bottom_bg.png');
  }
}


.new-review-request table,
#id_basedir,
#id_diff_path,
#id_parent_diff_path {
   width: 100%;
}


/****************************************************************************
 * clearfix hacks
 ****************************************************************************/

/*
 * clearfix hack. See http://www.webtoolkit.info/css-clearfix.html
 */
.clearfix {
  display: inline-block;

  &:after {
    content: ".";
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
  }
}

html[xmlns] .clearfix {
  display: block;
}

* html .clearfix {
  height: 1%;
}

// vim: set et ts=2 sw=2:
