/* Mobile Visibility Start */

.InHouseSearchEngine {
display: none;
visibility: hidden;
}
@media only screen and (max-width: 640px) {
.InHouseSearchEngine {
display: block;
visibility: visible;
width: 100% !important;
height: 70px !important;
margin-top: 20px;
margin-bottom: 20px;
background-color: rgba(255,255,255,0.75);
border-radius: 6px;
border: 0px;
z-index: 1000000;
}
}
/* Mobile Visibility End */


#searchBox {

background: rgba(255,255,255,0.15);
background-image: url(images/search.svg);
background-size: 26px 26px;
background-repeat: no-repeat;
background-position: 7px center; 

width: 300px;
height: 36px;

border: 1px solid rgba(255,255,255,0.4);
border-radius: 18px;
color: white;
font-family: "BodyFont";
font-size: 16pt;
padding-left: 45px;
padding-right: 36px;
}

#searchBox:focus {
outline: none transparent !important;
outline-width: 0 transparent !important;
box-shadow: none;
border: 1px solid rgba(255,255,255,0.9);
background: rgba(255,255,255,0.25);
background-image: url(images/search.svg);
background-size: 26px 26px;
background-repeat: no-repeat;
background-position: 7px center; 
}

.LibrarySearchContainer {
width: 50%;
max-width: 600px;
padding: 0px;
}


.LibrarySearch {
width: 100% !important;
height: 44px !important;
border-radius: 22px !important;
backdrop-filter: blur(6px);
}
@media only screen and (max-width: 640px) {
.LibrarySearch {
visibility: hidden;
display: none;
}
}


::placeholder {
color: rgba(255,255,255,0.7);
}



.search-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(0,0,0,0.2);
  border-top-color: #4caf50;
  border-radius: 50%;
  animation: search-spin 0.8s linear infinite;
  margin: 12px auto;
}

@keyframes search-spin {
  to { transform: rotate(360deg); }
}



#searchResults {
  position: absolute;
  margin-top: 5px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ccc;
  z-index: 99999;
  display: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
font-family: "BodyFont";
font-size: 16pt;
text-align: left;
  
    overflow-y: auto;
  overscroll-behavior: contain;
  max-height: calc(100vh - 60px);
  
}

#searchResults a {
  display: block;
  padding: 8px;
  text-decoration: none;
  color: #0070c9;
  border-radius: 6px;
  text-align: left;
}

#searchResults a:hover {
  background-image: linear-gradient(to top, rgba(0,0,0,0.2) 0%, rgba(255,255,255,1) 40%);
  border-radius: 6px;
  text-decoration: underline !important;
}

#searchResults {
  background: #fff;
  border: 1px solid #ccc;
  text-align: left;
}

.search-item {
  padding: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.4);
  text-align: left;
}

.search-item:last-child {
  border-bottom: none;
}

.search-snippet {
  font-size: 0.85em;
  color: #555;
  margin-top: 4px;
  text-align: left;
}

.search-title {
  display: block;
  font-weight: bold;
  text-decoration: none;
  color: #0066cc;
  text-align: left;
}
 
.noSearchResults, .emptySearchMessage {
  padding: 20px;
  color: rgba(0,0,0,1) !important;
  text-align: left;
  font-family: "BodyFont" !important;
  font-size: 16pt !important;
  text-decoration: none !important;
  background: none !important;
  text-align: left;
}

a.NoResultsLinks {
  display: inline !important;
  padding: 0px !important;
  font-family: "BodyFont" !important;
  font-size: 16pt !important;
  font-weight: bold;
  text-decoration: none !important;
  background: none !important;
  color: #0070c9 !important;
}
a.NoResultsLinks:hover {
  text-decoration: underline !important;
}

.search-snippet strong {
  font-weight: 700;
  color: rgba(255,0,0,1);
}

.search-relevance-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-relevance {
  flex: none;
  width: 40% !important;
  height: 10px;
  background: #ddd;
  border-radius: 5px;
  overflow: hidden;
  margin: 6px 0;
}

.search-relevance-fill {
  height: 100%;
  width: 0%;
  transition: width 0.25s ease;
}

/* Relevance color bands */
.relevance-low {
  background: #e53935; /* red */
}

.relevance-midlow {
  background: #fb8c00; /* orange */
}

.relevance-mid {
  background: #fbc02d; /* yellow-orange */
}

.relevance-high {
  background: #43a047; /* green */
}


/* Clear (×) button */
.search-clear {
  position: absolute;
  right: 7px;
  top: 49%;
  width: 25px;
  height: 25px;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  display: none;
  z-index: 100000;
}

.search-clear:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.4);
}


.best-match {
  display: inline-block;
  margin-left: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 3px;
  border-radius: 4px;
  vertical-align: middle;
}