/*
Description: Custom styles for IMC website
Version: 1.00
Author: James Memmott
Author Email: jmemmott@braeman.com

Copyright 2018 James Memmott

This script is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This script is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

@media (max-height: 500px), (max-width: 500px)
{
  ul.sub-menu
  {
    overflow-y: auto;
  }
}

label.control-label
{
  margin-bottom: 0px;
}

.form-group.required .control-label:before{
  color: red;
  content: "*";
  position: absolute;
  margin-left: -10px;
  font-family: 'FontAwesome';
  font-weight: normal;
  font-size: 10px;
  content: "\f069";
}

p.error
{
  margin-bottom:0em;
}

a.navbar-action-link {
  padding: 0.5px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  border: 1px solid rgba(85, 128, 57, 0.5);
  font-size: 85% !important;
  /* color: rgba(85, 128, 57, 0.95) !important; */
  /* color: white !important; */
  /* background-color: rgba(85, 128, 57, 0.9); */
  /* background-color: #D3E5CC; */
}
a.navbar-action-link:hover {
  color: white !important;
  background-color: rgba(85, 128, 57, 0.7);
}

.g-recaptcha {
  margin: 1em 0;
}

/* fix user role editor permissions popup */
/* center dialog in middle of screen */
.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-front.wp-dialog.ui-dialog-buttons.ui-draggable {
  position: absolute;
  left: 50% !important;
  top: 40% !important;
  transform: translate(-50%, -50%) !important;
}
/* make content visible inside of dialog */
div#ure_confirmation_dialog {
  min-width: 400px !important;
  min-height: 100px !important;
}
/* remove duplicate close X next to button */
button.ui-dialog-titlebar-close:before {
  display: none;
}

.search-template .search-form {
  margin-left: 10px;
  width: 300px;
}
.search-template .no-results {
  padding: 20px 40px !important;
  font-size: 110%;
}

/* search results page post-3176 */
/* /\* make highlighted regions in search results in titles behave like rest of title *\/ */
.search-template a:hover,
.search-template a:hover mark.is-highlight,
.search-template a mark.is-highlight:hover {
  background-color: initial !important;
  color: #c3e0b8 !important;
}

/* don't display the full signed-in user name on narrow displays */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .user-menu span.display-name {
    display: none;
  }
}

@media screen and (min-width: 992px) {
  .nav-links-container {
    position: relative;
  }
  span.header-links.navbar-text {
    max-width: 330px;
  }

  a.navbar-action-link {
    position: absolute;
    z-index: 1000; /* fix hovering on absolute positioned elements */
    top: 14px;
  }
  #donate-link {
    right: -70px;
  }
  #email-link {
    right: -180px;
  }
  /* reduce extra space above brand */
  .navbar-brand {
    padding: 10px !important;
  }
}

@media screen and (min-width: 1200px) {
  span.header-links.navbar-text {
    max-width: 400px;
  }
  /* position buttons at far right of nav bar */
  #donate-link {
    right: -95px;
  }
  #email-link {
    right: -205px;
  }
  .navbar-brand a {
    margin-left: -45px;
  }
}

@media screen and (max-width: 576px) {
  /* prevent links from wrapping to two lines on phones */
  .main-navigation .navbar-header .header-links a {
    font-size: 70% !important;
  }
  .container {
    max-width: 100%;
    padding-right: 0.5vw;
    padding-left: 0.5vw;
  }

  .navbar.fixed-top {
    padding-right: 0.5vw;
    padding-left: 0.5vw;
  }
}

@media screen and (max-width: 767px) {
  /* ensure main IMC navigation menu does not have gaps on the left or right */
  nav#site-navigation {
    width: 100% !important;
  }
  /* ensure wordpress navbar stays at top of screen */
  div#wpadminbar {
    position: fixed;
  }
}

@media screen and (max-width: 992px) {
  span.header-links {
    padding-top: 0px !important;
  }
}
@media screen and (max-width: 1200px) {
  /* keep some space between header links */
  .main-navigation .navbar-header .header-links a.navbar-link {
    font-size: 90%;
  }
}
