/* Drupal 7 specific tweaks -- homed here as a central authority */

/* Sort table handles for field-widget-inline-entity-form */
.field-widget-inline-entity-form .ief-tabledrag-handle a.tabledrag-handle {
  border-bottom: 0;
  padding-top: .25rem;
  float: left;
}

.field-widget-inline-entity-form .ief-tabledrag-handle a.tabledrag-handle .handle {
  height: 24px;
  width: 21px;
}

.field-widget-inline-entity-form span.warning.tabledrag-changed {
  margin-left: -0.75rem;
  padding-top: 0.25rem;
  display: inline-block;
}

/* Workaround for node form buttons that don't have class .button */
.node-form button:not(.button) {
  background: #AAA;
  color: #FFF;
  padding: .25rem .5rem;
  margin-bottom: .5rem;
  cursor: pointer;
}

.node-form button:not(.button):hover {
  opacity: .8;
}

/* Pager alignment */
.item-list .pager li { display: inline-block; }
.pagination .current  a { color: #fff; border-bottom: none; }

/* Table */
tbody tr:nth-child(even),
tr.even, tr.odd { background: none; border-bottom: 1px solid #eee; }

/* Drupal edit/local tabs */
.button-group { margin-left: 0; margin-top: 2rem;}
.button-group li { display: inline-block; }
.button-group li a.button.secondary {background: #f1f1f1;color: #333;border:0;border-right: 1px solid #fff;}
.button-group li a.button.secondary.active,
.button-group li a.button.secondary:active,
.button-group li a.button.secondary:hover { background: #333; color: #fff; }

/* Don't underline active tabs, or highligh active trails */
.masthead nav ul li a.active {border-bottom: none;background: #fff;color: #333;}
.masthead ul li.active-trail a.active { background: none; color: #fff; font-weight: 400; border-right: 1px solid #fff; }
.masthead ul li.active a.active { background: #fff; color: #333; font-weight: 600; border-right: none; }

/* Pad top of content */
main.row { margin-top: .5rem; }

/* Form buttons */
body .form-actions.form-wrapper button {
  display: inline-block;
  text-align: center;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  transition: background-color 0.25s ease-out, color 0.25s ease-out;
  vertical-align: middle;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0.85em 1em;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

input[type="checkbox"], input[type="radio"] { vertical-align: text-top; }
/* no padding on facet checkboxes */
.form-type-checkboxes input[type="checkbox"] { vertical-align: middle; margin-bottom: 0; }

/* Misc */
#panels-edit-display-form h2.label { background: none; }
html.js fieldset.collapsed { height: 2em; }

/* Edit form */
.node-form input#edit-title {
  font-family: Helvetica, Arial, FreeSans, 'Liberation Sans', sans-serif;
  font-size: 1.8em;
  height: 2em;
}

/* Fieldset */
fieldset.form-wrapper {
  border: 1px solid #ccc;
  padding: 0 1rem;
}

fieldset.form-wrapper .fieldset-legend {
  padding: 0 .5rem;
  font-weight: bold;
}

/* Table ordering */
.sticky-table { box-sizing: initial; }
.sticky-table a { border-bottom: none; }

/* Reveal */
body.is-reveal-open { overflow: auto; } /* Allow scrolling */
body.is-reveal-open #status-messages { top: 30% !important; position: fixed !important; } /* Scroll the messages with the use */
.alert-box { margin-right: .5rem; } /* Space for close button */

/* Sidebar menus aren't horizontal */
.shortcuts ul.menu ul.menu,
.sidebar ul.menu ul.menu { padding-left: .75em; }
.intro-unit .menu.menu-tree-menu > li,
.shortcuts .menu > li,
.sidebar .menu > li { display: list-item; }
.shortcuts .menu > li > a,
.sidebar .menu > li > a { padding-left: .5em }

/* Remove background gunk from modals and messages */
.callout.success { background-color: #fff; }
div.warning {
  background: none;
  border: 1px solid rgba(10, 10, 10, 0.25);
}
div.warning, .warning { color: #333; }

/* Do not show default page title on panel pages */
body.page-node h2#page-title { display: none; }
/* But show for revisions */
body.page-node.page-node-revisions h2#page-title { display: block; }

/* Allow showing of drupal status messages statically */
body.is-reveal-open #status-messages.static {
  position: static !important;
  width: auto;
  margin-top: 1rem;
}
body.is-reveal-open #status-messages.static button.close-button {
  position: static;
  display: inline-block;
  float: right;
}
body.is-reveal-open #status-messages.static .alert-box {
  display: inline-block;
  margin-top: .25rem;
}

/* Caption filter unset */
body div.caption-right { margin: 0 0 0 .5rem; }
body div.caption-left { margin: 0 .5rem 0 0; }
body div.caption-inner {
  border: none;
  background: none;
  text-align: left;
  padding: 0;
}

/* Tinymce reset */
/* tinyMce WYSIWYG fixes */
body.mceContentBody,
body#tinymce { font-size: 1rem; padding: 0 1em; overflow-y: scroll !important; }

/* For some drupal views we need to absue li items as columns */
li.columns { list-style-type: none; }

/* Breadcrumbs */
ul.breadcrumbs { padding-top: 1rem; }

/* Panels IPE */
.medium-4 .panels-ipe-portlet-content > .with-overlay,
.medium-3 .panels-ipe-portlet-content > .with-overlay {
  margin-bottom: .75rem;
}

/* print tweaks */
@media print {
  body.logged-in ul.button-group,
  body.logged-in > .toolbar {
    display: none;
  }
}
