/* --- Search Form Anchored to Header --- */

/* Search active state styling */
body.search-active {
  overflow: hidden;
}

body.search-active #block-anusearch {
  opacity: 1;
  transform: none;
  pointer-events: all;
  width: 100%;
}

/* Prevents pointer events for control in search active state */
body.search-active .control {
  cursor: default;
}

/* --- Search Button and Expansion Background --- */

body.search-active .control .btn-material {
  background: white;
  transform: scaleX(70);
  height: 70px;
  width: 70px;
}

/* Default search button styling */
.control {
  cursor: pointer;
  text-align: right;
}

.control i {
  color: white !important;
  margin-top: 10px;
}

.control .btn-material {
  position: absolute;
  right: 0;
  outline: 0;
  transform-origin: 50%;
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

body.search-active .control .icon-material-search {
  opacity: 0;
}

/* --- Search Input and Label Styling --- */

body.search-active #anusearch .label-icon.active {
  opacity: 0;
}

.search-input input {
  color: #fff;
  font-size: 54px;
  border: 0;
  background: transparent;
  -webkit-appearance: none; /* Hides the search bar */
  box-sizing: border-box;
  outline: 0;
  font-weight: 200;
}

/* --- Search Container Styling --- */

#block-anusearch {
  height: 80px;
  position: absolute;
  margin-top: -40px;
  pointer-events: none;
  opacity: 0;
  transform: translate(40px, 0);
  transition: all 0.3s ease-in-out;
}

#block-anusearch input {
  color: #000;
  font-size: 40px;
  border: 0;
  background: transparent;
  -webkit-appearance: none;
  box-sizing: border-box;
  outline: 0;
  font-weight: 200;
  margin-top: 5px;
  height: 60px;
}

/* --- Close Button Styling --- */

.icon-close {
  position: absolute;
  top: 0;
  right: 0;
  color: #000;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.icon-close.material-icons {
  font-size: 70px;
}

body.search-active .icon-close {
  opacity: 1;
  transform: rotate(-90deg);
}

.icon-close:hover {
  transform: rotate(0);
}

/* --- Mobile Menu Hidden When Search is Active --- */

body.search-active .region-we-mega-menu {
  opacity: 0;
}

/* --- Search Trigger and Suggestions --- */

.anu-wf-search-trigger > i {
  font-size: 1.5em;
  cursor: pointer;
}

.anu-wf-search-trigger-placeholder {
  display: none;
}

.anu-wf-search-field > input {
  width: calc(100% - 64px);
}

/* Suggestion group styling */
.anu-wf-suggestion-group .anu-wf-suggestion-title {
  font-weight: bold;
}

.anu-wf-suggestion-group .anu-wf-suggestion-result > a {
  display: block;
  padding: 0 0.5rem !important;
}

/* --- Overlay and Search Field Container --- */

.anu-wf-search .anu-wf-search-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  width: 25px;
  border: none;
  background: none;
}

.anu-wf-search .overlay {
  cursor: pointer;
  z-index: 3;
  padding-top: 109px;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7) !important;
}

.anu-wf-search .w100 {
  width: 100%;
}

/* Search field container styling within overlay */
.anu-wf-search .overlay .container-fluid .anu-wf-search-field {
  display: flex;
  gap: 20px;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  height: 100px;
}

/* Search input styling within container */
.anu-wf-search .overlay .container-fluid .anu-wf-search-field .anu-wf-search-input {
  position: relative;
  border-bottom: 1px solid #000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.anu-wf-search .overlay .container-fluid .anu-wf-search-field .anu-wf-search-input input {
  background-color: transparent;
  border: 0;
  padding-bottom: 2px !important;
  outline: none;
}

/* Blinking cursor animation for search input */
.anu-wf-search .overlay .container-fluid .anu-wf-search-field .anu-wf-search-input .anu-wf-search-cursor {
  position: absolute;
  left: 0;
  bottom: 7px;
  background-color: #be830e;
  width: 2px;
  height: 1.05em;
  animation: blink-animation 1s steps(5, start) infinite;
}

/* Close button styling within search overlay */
.anu-wf-search .overlay .container-fluid .close {
  background-color: #be830e;
  width: 40px;
  height: 40px;
  opacity: 1;
  position: relative;
}

.anu-wf-search .overlay .container-fluid .close::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  content: "✕";
  font-size: 20px;
  color: #000;
  line-height: 40px;
  text-align: center;
}

/* --- Search Options Styling --- */

.anu-wf-search .overlay .anu-wf-search-options {
  margin-bottom: 1rem;
}

.anu-wf-search .overlay .anu-wf-search-options > a {
  border: 1px solid #000;
  padding: 6px 10px !important;
  border-radius: 4px;
  margin-right: 0.5rem;
  margin-bottom: 1rem !important;
  background: #fff;
}
