/*
 Theme Name:   NOMIS 3.2.1 Child
 Description:  NOMIS 3.2.1 Child Theme
 Author:       Colin Lewis
 Author URI:   https://codeable.io
 Template:     nomis-321
 Version:      1.0.0
 Text Domain:  nomischild
*/

/* Global 
---------------------------------------------------------------- */
/* The layout breaks unless we change the flex-wrap */
body {
  flex-wrap: nowrap !important;
}

/* Allow lines to wrap in dropdown search fields. Break words normally instead of at any character */
/* Override Facet stylesheet rules */
.facetwp-type-fselect .fs-option .fs-option-label {
  white-space: normal !important;
  word-break: normal !important;
  line-height: 1.3 !important;
}

/* Basic list without padding or bullets */
ul.plain-list,
ul.plain-list li {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

/* Toggle news 
   ------------------------------ */

.loadMore {
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin-top: 0.5rem;
  display: block;
}

/* Hide the items beyond X number of items */
/* NB – Syncronize the number of items with the count on the loadMore link in single-person.php */
.loadParent li:nth-child(n + 4) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  opacity: 0;
  transition: all 500ms;
}

/* Toggle .loadMore class to show the items */
/* NB – Syncronize the number of items with the count on the loadMore link */
.loadMoreItems li:nth-child(n + 4) {
  clip: auto;
  clip-path: initial;
  height: 100%;
  overflow: visible;
  position: relative;
  white-space: normal;
  opacity: 1;
}

/* HOME 
   ---------------------------------------------------------------- */
/*– Split featured section row on home page into 3 columns */
@media (min-width: 992px) {
  .home-content .featured-content > section.triple {
    width: calc(33.3333333333% - 2px) !important;
  }

  .home-content .featured-content .featured-content--heading {
    font-size: 2rem !important;
  }

  .home-content .featured-content > section.triple .featured-content--heading {
    padding-top: 1em;
  }
}

/* NAVIGATION 
   ---------------------------------------------------------------- */
/* Prevent the primary menu from breaking into two lines.
This is just a bandage until the menu can be fixed properly. */
@media (min-width: 992px) {
  #primary-menu {
    font-size: 9px;
  }
}

@media (min-width: 1080px) {
  #primary-menu {
    font-size: 11px;
  }
}

@media (min-width: 1120px) {
  #primary-menu {
    font-size: 12px;
  }
}

@media (min-width: 1180px) {
  #primary-menu {
    font-size: 13px;
    letter-spacing: -0.025em;
  }
}

/* NOMIS FELLOWS PAGE 
   ---------------------------------------------------------------- */

/* 
This page uses the Awards page styles because we needed to get the correct layout.
Here we change a few colors to match the Researchers page.
*/
body.page-nomis-fellows .archive-title,
body.page-nomis-fellows .index-title {
  color: #212529;
}

body.page-nomis-fellows .index-right-column--section-header--nds {
  background-color: #6c757d;
}

@media (min-width: 992px) {
  body.page-nomis-fellows.page-awards
    .archive-right-column--item
    h1.person-title,
  body.page-nomis-fellows.page-awards
    .index-right-column--item
    h1.person-title {
    color: #111315;
  }
}

/* Hide the count in the search fields. 
   Setting dropdown show_counts to false 
   in inc/config/plugins/facet-wp.php doesn't 
   work when running files through child theme. */
.facetwp-counter {
  display: none;
}

/* TEMP: Fix the inline style generated on this sometimes, possibly through Termly */
.site-footer {
  margin-top: 0 !important;
}

/* Footer Termly buttons */
.site-info {
  width: 100%;
}
.termly-cookie-preference-button {
  margin: auto auto auto 1em;
}
