/**
 * @file
 * Form Styling
 */

@import "base";


.form-item { /* Wrapper for a form element (or group of form elements) and its label */
  margin: 1em 0;

  input.error,
  textarea.error,
  select.error { /* Highlight the form elements that caused a form submission error */
    border: 1px solid #c00;
  }

  label { /* The label for a form element */
    display: block;
    font-weight: bold;
    color: #333333;
  }

  label.option { /* The label for a radio button or checkbox */
    display: inline;
    font-weight: normal;
  }

  .form-required { /* The part of the label that indicates a required field */
    color: #ac2e32;
  }

  .description { /* The descriptive help text (separate from the label) */
    font-size: 0.75em;
    line-height: 1.5em;
    color: #828282;
  }

  .form-checkboxes & ,
  .form-radios & { /* Pack groups of checkboxes and radio buttons closer together */
    margin: 0; /* Drupal core uses "0.4em 0" */
  }
}

.form-submit { /* The submit button */
}

.container-inline {
  div,
  label { /* Inline labels and form divs */
    display: inline;
  }
}

.tips { /* Tips for Drupal's input formats */
}

a.button { /* Buttons used by contrib modules like Media */
  @include appearance(button);
}

/*
 * Password confirmation
 */

.password-parent,
.confirm-parent {
  margin: 0;
}

/*
 * Search (search-block-form.tpl.php)
 */

#block-search-form { /* Wrapper for the search form */

  position: relative;
  margin: 1em;
  overflow: hidden;

  @media screen and (min-width: 48.25em) {
    margin: 0.5em 1em 0.5em 0;
  }
  z-index: 100;
  clear: both;

  @media screen and (min-width: 48.25em) {
    max-width: 12em;
    clear: none;
  }

  .search-form {
    position: relative;
  }

  input[type="text"] {
    -moz-box-shadow: 1px 1px 1px 0 #8C8C8C inset;
    -webkit-box-shadow: 1px 1px 1px 0 #8C8C8C inset;
    -o-box-shadow: 1px 1px 1px 0 #8C8C8C inset;
    box-shadow: 1px 1px 1px 0 #8C8C8C inset;
    background: #f2f2f2;
    border: medium none;
    padding: 0em 0.813em;
    font-size: 0.875em;
    height: 2em;
    margin: 0 1%;
    z-index: -1;
    color: #666;
    width: 98%;
	-webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
  }

  .form-submit { /* Hide the submit button */
    border: medium none;
    padding: 0.5em;
    margin: 0 1%;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 9;
    -moz-box-shadow: 1px 1px 1px 0 #8C8C8C inset;
    -webkit-box-shadow: 1px 1px 1px 0 #8C8C8C inset;
    -o-box-shadow: 1px 1px 1px 0 #8C8C8C inset;
    box-shadow: 1px 1px 1px 0 #8C8C8C inset;
	-webkit-border-top-right-radius: 4px;
    -webkit-border-bottom-right-radius: 4px;
    -moz-border-radius-topright: 4px;
    -moz-border-radius-bottomright: 4px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    height: 2em;
    font-size: 0.875em;
    background: #f2f2f2;
  }
}

/*
 * Drupal's default login form block
 */

#user-login-form {
  text-align: left; /* LTR */

  /*
   * OpenID
   *
   * The default styling for the OpenID login link seems to assume Garland's
   * styling of list items.
   */

  ul { /* OpenID creates a new ul above the login form's links. */
    margin-bottom: 0; /* Position OpenID's ul next to the rest of the links. */
  }

  html.js & li.openid-link,
  li.openid-link { /* The "Log in using OpenID" link. */
    margin-top: 1.5em;
    margin-left: -20px; /* LTR */ /* Un-do some of the padding on the ul list. */
  }

  li.user-link { /* The "Cancel OpenID login" link. */
    margin-top: 1.5em;
  }
}

#user-login ul {
  margin: 1.5em 0;
}

/*
 * Drupal admin tables
 *
 * We overrode these styles in normalize.css, but restore them for the admin
 * section of the site.
 */

form {
  th {
    text-align: left; /* LTR */
    padding-right: 1em; /* LTR */
    border-bottom: 3px solid #ccc;
  }

  tbody {
    border-top: 1px solid #ccc;
  }

  tr.even {
    background-color: #fff;
  }

  table .item-list ul {
    margin: 0;
  }
}

@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
  .lt-ie8 tr.even,
  .lt-ie8 tr.odd {
    th,
    td {
      border-bottom: 1px solid #ccc; /* IE doesn't display borders on table rows */
    }
  }
}

/*
 * Drupal core wrongly puts this in system.menus.css. Since we override that, add it back.
 */

td.menu-disabled {
  background: #ccc;
}


/*
 * Add show form.
 */

.node-cm_show-form {

  .horizontal-tabs {
    ul.horizontal-tabs-list {
      font-size: 0.75em;
      background-color: #eeeeee;

      li {
        border-right: none;
        background: #eeeeee;

        &:focus, &:hover, &.selected {
          background: #ffffff;
        }
        a {
          padding: 0.5em 0.8em 0.3em 0.8em;
        }
      }
    }
  }

  input, select {
    margin: 0.25em 0;
  }

  .form-submit {
    background: #312f30;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    margin-right: 1em;
    border-radius: 0.5em;
  }

  .form-submit:hover {
    background: #666666;
  }

  .form-textarea-wrapper textarea {
    margin: 0.25em 0 0;
  }

  .form-radios {
    font-size: 0.875em;
  }

  fieldset {
    margin: 0 0 1em 0;
    border-width: 1px;
    border-radius: 0.5em;
  }
}


/*
 * Add show form.
 */

.form-field-name-field-member-temp, .form-field-name-field-duration-temp {
  @include element-invisible;
}