/**
 * @file
 * Positioning for a responsive layout.
 *
 * Define CSS classes to create a fluid grid layout with optional sidebars
 * depending on whether blocks are placed in the left or right sidebars.
 *
 * This layout uses the Zen Grids plugin for Compass: http://zengrids.com
 */

/**
 * Center the page.
 *
 * For screen sizes larger than 1200px, prevent excessively long lines of text
 * by setting a max-width.
 */
#page,
.region-bottom {
  /*max-width: 1200px;*/
  width: 100%;
}
#top-nav, #header, #main-inner, #navigation, #footer #block-block-5, #footer #meta-nav, #footer #block-block-6 {
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  max-width: 960px;
}

/* Apply the shared properties of grid items in a single, efficient ruleset. */
#header,
#content,
#navigation,
.region-sidebar-first,
.region-sidebar-second,
#footer {
  /*padding-left: 10px;*/
  /*padding-right: 10px;*/
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  word-wrap: break-word;
  *behavior: url("/path/to/boxsizing.htc");
  _display: inline;
  _overflow: hidden;
  _overflow-y: visible;
}

/* Containers for grid items and flow items. */
#header,
#main,
#footer {
  *position: relative;
  *zoom: 1;
}
#header:before,
#header:after,
#main:before,
#main:after,
#footer:before,
#footer:after {
  content: "";
  display: table;
}
#header:after,
#main:after,
#footer:after {
  clear: both;
}
#main-navigation-wrapper #main-menu li {
  display: block;
  float: none;
  padding-left: 0.5em;
}
#main-menu {
  float: none;
}
#cochrane-library-link {
  float: none;
  background-color: #002D64;
}
#feature-slider #feature {
  position: relative;
}
#block-views-latest-reviews-block {
  position: relative;
}
#block-views-news-and-events-front-block {
  clear: left;
}
#block-views-news-and-events-front-block .views-row {
  width: 100%;
  float: left;
  position: relative;
}
#main-navigation-wrapper {
  clear: both;
  font-size: 19px;
}
#main-navigation-wrapper a {
  display: block;
  color: #002D64;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
}
#main-menu a {
  padding: 0.5em 1em;
}
#main-menu .active-trail > a {
  background-color: #e9e9e9;
}
#secondary-menu a {
  padding: 0.5 1em;
}
#cochrane-library-link {
  line-height: 2.5em;
}
#main {
  /* Move all the children of #main down to make room. */
  /*padding-top: 3em;*/
  padding-top: 4em;
  position: relative;
}
#main-menu {
  clear: both;
}
#tagline-image {
  display: block;
}
#cochrane-library-link {
  position: absolute;
  top: 0;
  width: 100%;
}
#cochrane-library-link a {
  color: #fff;
}
#cochrane-library-link .library-link {
  padding: 0 50px 0 30px;
}
#cochrane-library-link .library-arrow {
  background-color: #194273;
  position: absolute;
  padding: 0 20px;
  right: 0;
  top: 0;
}
.header__logo-image {
  padding: 10px;
  width: 42px;
  height: 42px;
}
#site-name {
  line-height: 62px;
  font-size: 42px;
  padding: 0;
}
.region-sidebar-first {
  font-size: 14px;
  margin: 10px 0 0 0;
}
.two-sidebars .region-sidebar-second {
  clear: right;
}
#content {
  padding: 0 10px;
}
#block-apachesolr-search-mlt-001 .block-title {
  padding-top: 2em;
  position: relative;
}
#block-apachesolr-search-mlt-001 .block-title:before {
  background: url("../images/diamond.png") no-repeat 0 -25px transparent;
  content: " ";
  height: 25px;
  left: 50%;
  margin: 0 0 0 -13px;
  padding: 0;
  position: absolute;
  top: 0;
  width: 25px;
}
#block-apachesolr-search-mlt-001 li a {
  border-top: 1px solid #ccc;
  padding: 10px 0 10px 14px;
}
#footer #partners {
  height: auto;
}
#footer #partners .partner {
  width: 100%;
  font-size: 18px;
}
#footer #meta-nav #meta-logo {
  margin: 10px;
}
#top-search {
  width: 100%;
  padding-top: 0;
}
#search-form .as-keys {
  width: 100%;
}
#block-block-3 {
  display: none;
}
#block-block-9 .row {
  padding: 0.2em 0;
}
#block-block-9 .top-number {
  display: none;
}
#article-actions ul {
  float: right;
}
#article-actions li {
  clear: right;
  float: right;
}
#article-actions .label {
  float: left;
}
#article-actions .icon {
  float: right;
}
#article-actions #share-actions {
  left: 100%;
}
#page-banner {
  display: none;
}


/* Navigation bar */
@media all and (min-width: 481px) {
  #main-navigation-wrapper {
    /*background-color: #962D91;*/
    overflow: hidden;
    clear: both;
    /* Move the navbar up inside #main's padding. */
    position: absolute;
    top: 0;
    left: 0;
    /*height: 2.5em;*/
    width: 100%;
  }
  #main-navigation-wrapper a {
    border-bottom: none;
    color: #fff;
    line-height: 2.5em;
    position: relative;
    text-decoration: none;
  }
  #main-navigation-wrapper #main-menu a:hover, #main-navigation-wrapper #main-menu a.active-trail {
    background-color: #A3409E;
  }
  #main-navigation-wrapper #main-menu li {
    display: inline;
    float: left;
    padding-left: 0;
  }
  #main-navigation-wrapper #main-menu ul ul {
    display: none;
  }
  #navigation {
    background-color: #962d91;
    height: inherit;
    position: relative;
  }
  #navigation:after {
    clear: both;
    content: " ";
    display: block;
  }
  #cochrane-library-link {
    border-left: 2px solid #fff;
    /*float: right;*/
    height: inherit;
    /*margin-left: -200px;*/
    position: absolute;
    width: auto;
    right: 0;
    top: 0;
  }
  #main-menu a {
    padding: 0;
  }
  #secondary-menu a {
    border-right: 1px solid #fff;
    padding: 0 1em;
  }
  #secondary-menu li.last a {
    border-right: none;
  }
  #main-menu .links li {
    padding: 0 2px 0 0;
  }
  #main-menu {
    border-left: 999px solid #962d91;
    clear: none;
    float: left;
    height: inherit;
    margin-left: -999px;
    margin-right: 218px;
  }
  #header {
    padding-bottom: 20px;
  }
  #header #site-slogan {
    display: block;
  }
  #tagline-image {
    display: none;
  }
  .header__logo-image {
    padding: 0;
    width: auto;
    height: auto;
  }
  #site-name {
    line-height: 1em;
    font-size: 56px;
    padding: 0 0 0 11px;
  }
  #language-switcher {
    position: relative;
    width: 100%;
  }
  #language-switcher ul {
    max-height: 20em;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 1px 0 0;
    transition: max-height 0.5s;
    float: right;
    text-align: right;
  }
  #language-switcher li {
    list-style-type: none;
    display: inline-block;
  }
  #language-switcher a, #language-switcher span.active {
    display: block;
    padding: 0 1em;
    color: #002d64;
    transition: background-color 0.5s, color 0.5s;
    font-size: 12px;
    line-height: 28px;
  }
  #language-switcher a:hover {
    background-color: #002d64;
    text-decoration: none;
    color: #fff;
  }
  #language-switcher .active {
    text-decoration: underline;
  }
  #language-switcher #language-toggle {
    content: "▼";
    position: absolute;
    top: 0.2em;
    right: 0.5em;
    color: #002d64;
    font-size: 0.7em;
    display: none;
    cursor: pointer;
  }
  #language-switcher.toggle #language-toggle {
    display: block;
  }
  #language-switcher.toggle ul {
    padding-right: 20px;
  }
  #top-nav {
    display: table;
    width: 100%;
  }
  #top-nav-inner {
    display: table-row;
  }
  #language-switcher, #secondary-menu {
    display: table-cell;
    overflow: hidden;
  }
  #secondary-menu {
    white-space: nowrap;
  }
  #secondary-menu ul {
    padding: 0;
    margin: 0;
  }
  #block-views-latest-reviews-block {
    float: right;
    width: 49%;
  }
  #block-views-news-and-events-front-block {
    float: left;
    width: 49%;
  }
  .region-sidebar-first {
    float: left;
    width: 20%;
  }
  #block-cck-blocks-field-doi.sticky {
    border-top: 0;
    position: fixed;
    width: 192px;
    top: 0;
    z-index: 999;
  }
  #content {
    padding: 0;
  }
  #block-apachesolr-search-mlt-001 .block-title {
    padding-top: 0;
  }
  #block-apachesolr-search-mlt-001 .block-title:before {
    display: none;
  }
  #block-apachesolr-search-mlt-001 li a:before {
    background: url("../images/diamond-small.png") no-repeat scroll 0 0 transparent;
    content: " ";
    display: block;
    height: 7px;
    left: 0;
    position: absolute;
    top: 13px;
    width: 7px;
  }
  #block-apachesolr-search-mlt-001 li a:hover:before {
    background-position: 0 -7px;
  }
  #block-apachesolr-search-mlt-001 li a {
    border-top: none;
    padding: 5px 0 5px 14px;
  }
  #footer #partners {
    height: 45px;
  }
  #footer #partners .partner {
    float: left;
    width: 22.5%;
  }
  #footer #partners #partner-more {
    width: 10%;
    float: left;
  }
  #top-search {
    width: auto;
    padding-top: 22px;
  }
  #top-search .apachesolr-autocomplete {
    width: 400px;
  }
  #block-block-9 .top-column {
    width: 50%;
    float: left;
  }
  #block-block-3 {
    display: block;
  }
  #block-block-9 .row {
    padding: 0.4em 0;
  }
  #block-block-9 .top-number {
    display: block;
  }
  #sidebar-actions {
    display: none;
  }
  .page-node-34870 #page-title, .page-node-34867 #page-title, .page-node-35100 #page-title, .page-node-35091 #page-title {
    display: none;
  }
  #page-banner {
    display: block;
  }
}
/*@media all and (min-width: 481px) and (max-width: 700px) {
  #main-navigation-wrapper {
    height: 5em;
  }
}*/
@media all and (min-width: 481px) and (max-width: 780px) {
  #main-navigation-wrapper {
    font-size: 17px;
  }
}
@media all and (min-width: 630px) {
  #footer #meta-menu a {
    padding: 1.5em;
  }
  #footer #meta-menu ul li {
      float: left;
  }
  #footer #meta-menu ul ul li {
    float: none;
  }
  #footer #meta-nav #meta-menu {
    float: right;
  }
  #footer #meta-menu ul ul {
    max-height: 0;
    width: 0;
  }
  #footer  #meta-nav #meta-menu > ul > li > a {
    border-top: none;
  }
  #footer #meta-menu > ul > li > ul {
    font-size: 0.8em;
  }
  #footer #meta-nav.menu-open #meta-menu {
    float: none;
    margin-left: 70px;
  }
  #footer #meta-nav.menu-open #meta-menu > ul {
    width: 100%;
  }
  #footer #meta-nav.menu-open #meta-menu > ul > li {
    width: 25%;
  }
  #footer #meta-nav.menu-open #site-slogan-footer {
    width: 0;
    overflow: hidden;
  }
  #footer #meta-nav.menu-open #meta-logo {
    width: 0;
  }
  #footer .menu-open #meta-menu ul {
    max-height: 999px;
    width: auto;
  }
  #footer .menu-open #meta-menu a:hover {
    background-color: inherit;
  }
  #footer .menu-open #meta-menu a {
    padding-left: 1em;
  }
  #footer .menu-open  #meta-menu > ul > li:hover a {
    /*background-color: #A3409E;*/
  }
  #footer .menu-open  #meta-menu li li:hover > a {
    text-decoration: underline;
  }
  #footer #meta-nav #meta-logo {
    /*margin: -25px 0 0 0;*/
    position: absolute;
    /*top: 50%;*/
  }
}
@media all and (min-width: 631px) and (max-width: 780px) {
  #footer #meta-nav #meta-logo {
    width: 0;
  }
}
/**
 * Use 3 grid columns for smaller screens.
 */
@media all and (min-width: 481px) and (max-width: 959px) {

  /**
   * The layout when there is only one sidebar, the left one.
   */

  #main-inner {
    padding: 10px;
  }
  /* Span 2 columns, starting in 2nd column from left. */
  .sidebar-first #content-inner {
    float: left;
    margin-top: 10px;
    width: 66%;
  }

  /* Span 1 column, starting in 1st column from left. */
  .sidebar-first .region-sidebar-first {
    float: right;
    width: 32%;
  }
  /* Move sidebar to left for search pages */
  .page-search.sidebar-first #content-inner {
    float: right;
  }
  .page-search.sidebar-first .region-sidebar-first {
    float: left;
  }

  /**
   * The layout when there is only one sidebar, the right one.
   */

  /* Span 2 columns, starting in 1st column from left. */
  .sidebar-second #content-inner {
    float: left;
    margin-top: 10px;
    width: 66%;
  }

  /* Span 1 column, starting in 3rd column from left. */
  .sidebar-second .region-sidebar-second {
    float: right;
    width: 32%;
  }
  /* Move sidebar to left for search pages */
  .page-search.sidebar-second #content-inner {
    float: right;
  }
  .page-search.sidebar-second .region-sidebar-second {
    float: left;
  }

  /**
   * The layout when there are two sidebars.
   */

  /* Span 2 columns, starting in 2nd column from left. */
  .two-sidebars #content-inner {
    float: left;
    margin-top: 10px;
    width: 66%;
  }

  /* Span 1 column, starting in 1st column from left. */
  .two-sidebars .region-sidebar-first {
    float: right;
    width: 32%;
  }

  /* Start a new row and span all 3 columns. */
  .two-sidebars .region-sidebar-second {
    float: right;
    width: 32%;
  }
  /* Move sidebars to left for search pages */
  .page-search.two-sidebars #content-inner {
    float: right;
  }
  .page-search.two-sidebars .region-sidebar-first, .page-search .two-sidebars .region-sidebar-second {
    float: left;
  }
  .header__logo-image {
    padding-left: 10px;
  }
  #top-search {
    max-width: 30%;
  }
  #main-menu a {
    padding: 0 10px;
  }
  #cochrane-library-link .library-link {
    padding: 0 50px 0 10px;
  }
  #cochrane-library-link .library-arrow {
    padding: 0 10px;
  }
  #article-actions ul {
    float: left;
  }
  #article-actions li {
    clear: left;
    float: left;
  }
  #article-actions .label {
    float: right;
  }
  #article-actions .icon {
    float: left;
  }
  #article-actions #share-actions {
    left: inherit;
    right: 100%;
  }
}
@media all and (min-width: 480px) and (max-width: 669px) {
  #top-search {
    width: 100%;
    max-width: 100%;
  }
  #top-search .apachesolr-autocomplete {
    width: 100% !important;
  }
}

/**
 * Use 5 grid columns for larger screens.
 */
@media all and (min-width: 960px) {

  /**
   * The layout when there is only one sidebar, the left one.
   */

  /* Span 4 columns, starting in 2nd column from left. */
  .sidebar-first #content-inner {
    float: right;
    margin-top: 10px;
    width: 78%;
  }

  /* Span 1 column, starting in 1st column from left. */
  .sidebar-first .region-sidebar-first {
    float: left;
    width: 20%;
    margin-left: 0%;
    margin-right: -20%;
  }

  /**
   * The layout when there is only one sidebar, the right one.
   */

  /* Span 4 columns, starting in 1st column from left. */
  .sidebar-second #content-inner {
    float: left;
    width: 78%;
    margin-left: 0%;
    margin-right: -80%;
  }

  /* Span 1 column, starting in 5th column from left. */
  .sidebar-second .region-sidebar-second {
    float: left;
    width: 20%;
    margin-left: 80%;
    margin-right: -100%;
  }

  /**
   * The layout when there are two sidebars.
   */

  /* Span 3 columns, starting in 2nd column from left. */
  .two-sidebars #content {
    /*float: left;*/
    /*width: 80%;*/
    /*margin-left: 20%;*/
    /*margin-right: -80%;*/
  }
  .two-sidebars #content-inner {
    float: left;
    margin-left: 22%;
    margin-right: -100%;
    margin-top: 10px;
    width: 56%;
  }

  /* Span 1 column, starting in 1st column from left. */
  .two-sidebars .region-sidebar-first {
    float: left;
    width: 20%;
    margin-left: 0%;
    margin-right: -20%;
  }

  /* Span 1 column, starting in 5th column from left. */
  .two-sidebars .region-sidebar-second {
    float: left;
    width: 20%;
    margin-left: 80%;
    margin-right: -100%;
    margin-top: 10px;
  }

  #main-menu a {
    padding: 0 20px;
  }
  #cochrane-library-link .library-link {
    padding: 0 66px 0 20px;
  }
  #cochrane-library-link .library-arrow {
    padding: 0 20px;
  }
  #block-views-latest-reviews-block {
    margin-left: 620px;
    width: auto;
    padding-left: 2em;
  }
  #block-views-news-and-events-front-block {
    margin-right: -620px;
    width: 620px;
  }
  #block-views-news-and-events-front-block .views-row {
    width: 50%;
  }
  #contact-address {
    float: right;
    width: 185px;
  }
  #webform-client-form-35099 {
    margin-right: 200px;
  }
}
