/***************************************************************************************************
****************************************************************************************************

Project..... Vaughan Memorial Library website
Date........ Q2-2023
Developer... vincent.grovestine@acadiau.ca

****************************************************************************************************
***************************************************************************************************/



/*******************************************************************************
********************************************************************************
** BENTO SEARCH: Uber-form and container thereof
********************************************************************************
*******************************************************************************/

#bento_search {
  background: var(--vml-color-bento_search-background) url("../images/bg_bento_search_form-2560x360-color.jpg") center center no-repeat;
  background-size: cover;
  border-bottom: 1px solid var(--vml-color-bento_search-border);
  padding: 3em 0;
}

#bento_search,
#bento_search * {
  line-height: 1em !important;
}

#bento_search h2 {
  display: none !important;
}

#bento_search form {
  background-color: var(--vml-color-bento_search-form-background);
  padding: 0.625rem 1.25rem;
  white-space: nowrap;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  border-radius: 0.25rem;
}

#bento_search div.row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25em;
}

#bento_search div.row.empty {
  height: 0.75em;
}

#bento_search_form input {
  flex-shrink: 1;
  flex-grow: 1;
}

#bento_search_form ul.row {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375em 1.5em;
  margin: 0;
  padding: 0.375em 0 0 0.125em;
}

#bento_search_form ul.row li {
  flex-shrink: 0;
  flex-grow: 0;
  font-size: 0.75em;
  margin: 0;
  padding: 0;
}

#bento_search_form a {
  text-decoration: underline;
  color: var(--vml-color-bento_search-form-a-text);
}

#bento_search_form a:hover,
#bento_search_form a:active {
  color: var(--vml-color-bento_search-form-a-active-text);
}

#bento_search form input {
  border: 1px solid var(--vml-color-bento_search-form-input-border);
  background-color: var(--vml-color-bento_search-form-input-background);
  color: var(--vml-color-bento_search-form-input-text);
  width: 99%;
  font-size: 2em;
  padding: 0.4375em;
  border-radius: 0.25rem;
}

#bento_search form ::placeholder {
  color: var(--vml-color-bento_search-form-input-placeholder-text);
}

#bento_search form button {
  color: var(--vml-color-bento_search-form-button-text);
  background-color: var(--vml-color-bento_search-form-button-background);
  border: 1px solid var(--vml-color-bento_search-form-button-border);
  font-size: 2em;
  padding: 0.5em 1em;
  border-radius: 0.25rem;
}

#bento_search form button:hover,
#bento_search form button:active {
  background-color: var(--vml-color-bento_search-form-button-active-background);
  border-color: var(--vml-color-bento_search-form-button-active-border);
}

form#bento_search_form.empty button,
form#bento_search_form.ready button {
  cursor: pointer;
}

@media all and (max-width: 1200px) {
  #bento_search {
    padding: 2em 0;
  }

  #bento_search form input,
  #bento_search form button {
      font-size: 1.5em;
  }
}

@media all and (max-width: 720px) {
  #bento_search {
    padding: 1.5em 0;
  }

  #bento_search form input,
  #bento_search form button {
      font-size: 1em;
  }
}



/*******************************************************************************
********************************************************************************
** BENTO "Did you mean...?": Container
********************************************************************************
*******************************************************************************/

#bento_did_you_mean {
  background-color: var(--vml-color-bento_did_you_mean-background);
  border-top: 1px solid var(--vml-color-bento_did_you_mean-border);
  border-right: 1px solid var(--vml-color-bento_did_you_mean-border);
  border-bottom: 1px solid var(--vml-color-bento_did_you_mean-border);
  border-left: 0.3125rem solid var(--vml-color-bento_did_you_mean-border);
  display: inline-block;
  padding: 0.5em 2em 0.5em 6px;
  font-size: 1em;
  line-height: 1.1em;
  margin: 1em 0;
}

#bento_did_you_mean p {
  display: inline;
  margin: 0;
  padding: 0;
}

#bento_did_you_mean p:after {
  content: "?";
  font-style: italic;
}

#bento_did_you_mean a {
  font-weight: bold;
  font-style: italic;
}



/*******************************************************************************
********************************************************************************
** BENTO RESULTS: Container
********************************************************************************
*******************************************************************************/

#bento_results {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: flex-start;
  margin-right: -2em;
}

#bento_results h2 {
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 100%;
  display: none !important;
}

#bento_results h2 span.search_phrase {
  font-weight: normal;
  background-color: var(--vml-color-bento_results-h2-phrase-background);
  padding: 3px;
  margin: -3px;
  display: inline-block;
  border-bottom: 1px solid var(--vml-color-bento_results-h2-phrase-border);
  box-sizing: border-box;
}



/*******************************************************************************
********************************************************************************
** BENTO RESULTS: Boxed content
********************************************************************************
*******************************************************************************/

.bento {
  box-sizing: border-box;
  flex-grow: 1;
  flex-shrink: 1;
}

@media all and (min-width: 1081px) {
  .bento {
    flex-basis: 30%;
    margin: 1em 2em 1em 0;
  }
}

@media all and (min-width: 721px) and (max-width: 1080px) {
  .bento {
    flex-basis: 45%;
    margin: 1em 2em 1em 0;
  }
}

@media all and (max-width: 720px) {
  #bento_results {
    margin-right: 0;
  }

  .bento {
    flex-basis: 100%;
    margin: 1em 0;
  }
}

.bento h3 {
  color: var(--vml-color-bento-h3-text);
  background-color: var(--vml-color-bento-h3-background);
  border-top: 1px solid var(--vml-color-bento-h3-border);
  border-right: 1px solid var(--vml-color-bento-h3-border);
  border-bottom: none;
  border-left: 0.3125rem solid var(--vml-color-bento-h3-border);
  display: block;
  padding: 0.5em 3px 0.5em 6px;
  font-weight: bold;
  font-size: 1em;
  margin: 0;
}

.bento ul {
  font-size: 0.875em;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--vml-color-border);
}

.bento ul li {
  border-top: 1px solid var(--vml-color-border);
  border-right: 1px solid var(--vml-color-border);
  border-bottom: none;
  border-left: 1px solid var(--vml-color-border);
  padding: 0.5em 3px 0.5em 8px;
}

.bento ul li mark,
.bento ul li .highlight {
  background-color: var(--vml-color-bento-highlight-background);
}

.bento.empty ul li,
.bento.failure ul li {
  font-style: italic;
  min-height: 4.125rem;
}

.bento.success ul li:hover {
  background-color: var(--vml-color-bento-success-li-hover-background);
  border-left: 0.1875rem solid var(--vml-color-bento-success-li-hover-border);
  padding-left: 6px;
}

.bento li span.title {
  display: block;
  font-weight: bold;
  padding-left: 0;
}

.bento li span.info {
  display: block;
  padding-left: 4em;
}

.bento li span.info span.label {
  color: var(--vml-color-bento-info-label-text);
  display: inline-block;
  width: 5em;
  margin-left: -5em;
  font-size: 0.8em;
  line-height: 1.25em;
}

.bento li span.info.match {
  padding-left: 0;
}

.bento li span.info.match:before,
.bento li span.info.match:after {
  content: "\2026";
}

.bento li span.info.match span.label {
  display: none;
}

.bento li span.info.match span.highlight {
  font-weight: bold;
  color: var(--vml-color-bento-info-match-highlight);
}

.bento.empty li span,
.bento li span.no_result,
.bento li span.failed_search {
  padding-left: 0;
  display: block;
}

.bento a {
  text-decoration: none !important;
}

.bento li div.basic_info {
  display: block;
}
.bento li div.extra_info {
  display: none;
}

.bento p.all_results {
  font-size: 0.75em;
  padding: 3px 6px;
  margin: 0;
  border-top: none;
  border-right: 1px solid var(--vml-color-border);
  border-bottom: 1px solid var(--vml-color-border);
  border-left: 1px solid var(--vml-color-border);
}

.bento p.all_results a:before {
  font-family: "Font Awesome 5 Free",FontAwesome;
  font-weight: 900;
  content: "\f00e\00a0";
  display: inline;
}

.bento p.all_results a.float_right:before,
.bento.empty p.all_results a:before,
.bento.failure p.all_results a:before {
  content: "\f002\00a0";
}

.bento.failure ul li:last-child {
  border-bottom: none;
}

.bento h3:after {
  margin-left: 1em;
}

.bento.loading h3:after {
  animation-name: bento_loading_indicator;
  animation-timing-function: ease-in-out;
  animation-delay: 0s;
  animation-duration: 1.5s;
  animation-direction: alternate;
  animation-iteration-count: infinite;
  animation-play-state: running;

  line-height: initial;
  text-align: right;
  display: block;
  float: right;

  font-family: "Font Awesome 5 Free",FontAwesome;
  font-weight: 900;
  content: "\f013";
  color: var(--vml-color-bento-loading-h3-after-text);
  text-shadow: var(--vml-color-text-shadow) 0 0 2px;
}

.bento.loaded h3:after {
  line-height: initial;
  text-align: right;
  display: block;
  float: right;
  padding-right: 0.25em;

  font-family: "Font Awesome 5 Free",FontAwesome;
  font-weight: 900;
  text-shadow: var(--vml-color-text-shadow) 0 0 2px;
}

.bento.loaded.success h3:after {
  color: var(--vml-color-bento-loaded-success-h3-after-text);
  content: "\f058";
}

.bento.loaded.empty h3:after {
  color: var(--vml-color-bento-loaded-empty-h3-after-text);
  content: "\f056";
}

.bento.loaded.failure h3:after {
  color: var(--vml-color-bento-loaded-failure-h3-after-text);
  content: "\f057";
}

@keyframes bento_loading_indicator {
  from {
    transform:rotate(0deg);
  }
  to {
    transform:rotate(360deg);
  }
}

.bento span.indicator:after {
  border: 1px solid var(--vml-color-border);
  padding: 0.5em 3px 0.5em 8px;
  display: block;
  font-size: 0.875em;
  font-style: italic;
  content: "Please wait. Loading results..."
}
.bento.loaded span.indicator {
  display: none;
}



/*******************************************************************************
********************************************************************************
** BENTO RESULTS: Boxed external content
********************************************************************************
*******************************************************************************/

#bento_external ul li span.title a:after {
  font-family: "Font Awesome 5 Free",FontAwesome;
  font-weight: 900;
  content: "\00a0\00a0\f08b";
  display: inline;
  font-size: 0.75em;
  opacity: 0.2;
}

#bento_external ul li span.title a:hover:after,
#bento_external ul li span.title a:active:after {
  opacity: 1;
}

#bento_external ul li:last-child {
  border-bottom: none;
}



/***************************************************************************************************
***************************************************************************************************/
