/* ==========================================================================
   ARRØ header search — matches the Shopify (Dawn) search modal + predictive results.
   Markup: inc/arro-search.php   Behaviour: js/arro-search.js
   ========================================================================== */
/* Flatsome's own search dropdown is replaced by the modal */
#header li.header-search>.nav-dropdown,
#header li.header-search-dropdown>ul.nav-dropdown {
  display: none !important;
}

html.arro-search-open {
  overflow: hidden;
}

.arro-search {
  position: fixed;
  inset: 0;
  z-index: 100000;
  font-family: var(--font-text-regular, "text_regular", sans-serif);
  letter-spacing: .6px;
  color: rgba(18, 18, 18, .75);
}

.arro-search[hidden] {
  display: none;
}

.arro-search *,
.arro-search *::before,
.arro-search *::after {
  box-sizing: border-box;
}

.arro-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, .5);
  z-index: 0;
}

.arro-search__bar {
  position: relative;
  z-index: 2;
  background: #fff;
  height: 127px;
  border-bottom: 1px solid rgba(18, 18, 18, .08);
}

.arro-search__row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 26px;
  padding-top: 40px;
}

.arro-search__form {
  position: relative;
  width: 742px;
  max-width: calc(100% - 100px);
}

.arro-search__field {
  position: relative;
  height: 47px;
  border: 1px solid #121212;
  background: #fff;
  display: flex;
  align-items: center;
}

.arro-search__label {
  position: absolute;
  left: 20px;
  top: 7px;
  font-size: 11px;
  line-height: 14px;
  color: rgba(18, 18, 18, .75);
  pointer-events: none;
  margin: 0;
  letter-spacing: .4px;
}

.arro-search__input {
  flex: 1;
  width: 100%;
  height: 45px;
  margin: 0;
  padding: 22px 98px 8px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.2;
  color: #121212;
  letter-spacing: .6px;
}

.arro-search__input::-webkit-search-cancel-button,
.arro-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.arro-search__clear {
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: var(--arro-blue, #00a1e9);
  display: grid;
  place-items: center;
  cursor: pointer;
  min-height: 0;
}

.arro-search__clear[hidden] {
  display: none;
}

.arro-search__submit {
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 45px;
  padding: 0;
  margin: 0;
  border: 0;
  border-left: 1px solid rgba(18, 18, 18, .12);
  background: transparent;
  color: #121212;
  display: grid;
  place-items: center;
  cursor: pointer;
  min-height: 0;
  line-height: 1;
}

.arro-search__submit:hover {
  color: var(--arro-blue, #00a1e9);
}

.arro-search__close {
  width: 44px;
  height: 44px;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--arro-blue, #00a1e9);
  display: grid;
  place-items: center;
  cursor: pointer;
  min-height: 0;
}

.arro-search__close:hover {
  opacity: .7;
}

/* ------------------------------ predictive results ------------------------ */
.arro-ps {
  position: absolute;
  z-index: 5;
  top: calc(100% + 1px);
  left: -1px;
  width: calc(100% + 2px);
  max-height: calc(100vh - 150px);
  overflow: hidden;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(18, 18, 18, .1);
  border-top: 0;
  box-shadow: 0 4px 5px rgba(18, 18, 18, .05);
}

.arro-ps[hidden] {
  display: none;
}

.arro-ps.is-loading {
  opacity: .6;
}

.arro-ps__groups {
  display: flex;
  border-bottom: 1px solid rgba(18, 18, 18, .08);
  padding-bottom: 10px;
}

.arro-ps__group {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.arro-ps__group--left {
  flex: 0 0 264px;
}

.arro-ps__groups.is-single .arro-ps__group--left {
  flex: 1 1 auto;
}

.arro-ps__group--right {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 20px;
}

.arro-ps__group-title {
  margin: 0 20px;
  padding: 15px 0 7.5px;
  border-bottom: 1px solid rgba(18, 18, 18, .08);
  color: rgba(18, 18, 18, .7);
  font-family: var(--font-text-medium, "text_medium", sans-serif);
  font-size: 10px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.arro-ps__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.arro-ps__li {
  margin: 0;
}

.arro-ps__item {
  display: flex;
  padding: 10px 20px;
  width: 100%;
  text-align: left;
  color: #121212;
  text-decoration: none;
}

.arro-ps__item--thumb {
  display: grid;
  grid-template-columns: 50px 1fr;
  column-gap: 20px;
  align-items: center;
}

.arro-ps__image {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

.arro-ps__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.arro-ps__heading {
  margin: 0;
  font-family: var(--font-text-medium, "text_medium", sans-serif);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: .6px;
  color: #121212;
  text-transform: none;
}

.arro-ps__heading.is-query mark {
  background: transparent;
  color: rgba(18, 18, 18, .75);
}

.arro-ps__heading.is-query span {
  font-weight: bolder;
}

.arro-ps__li:hover>.arro-ps__item,
.arro-ps__li.is-active>.arro-ps__item,
.arro-ps__item.is-active,
.arro-ps__item:hover {
  background: rgba(18, 18, 18, .04);
  color: #121212;
}

.arro-ps__li:hover .arro-ps__heading,
.arro-ps__li.is-active .arro-ps__heading {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.arro-ps__item--term {
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  font-family: var(--font-text-medium, "text_medium", sans-serif);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .6px;
  word-break: break-word;
}

.arro-ps__item--term svg {
  flex-shrink: 0;
  margin-left: 20px;
  color: var(--arro-blue, #00a1e9);
  transition: transform .2s;
}

.arro-ps__item--term:hover svg {
  transform: translateX(4px);
}

@media (max-width: 749px) {
  .arro-search__bar {
    height: 86px;
  }

  .arro-search__row {
    padding-top: 20px;
    gap: 6px;
    padding-left: 12px;
    padding-right: 4px;
  }

  .arro-search__form {
    width: 100%;
    max-width: none;
  }

  .arro-ps {
    max-height: calc(100vh - 100px);
  }

  .arro-ps__groups {
    flex-direction: column;
    gap: 10px;
  }

  .arro-ps__group--left {
    flex: 0 0 auto;
  }
}

/* beat Flatsome / base input styles */
html body .arro-search .arro-search__input {
  height: 45px;
  padding: 22px 98px 8px 20px;
  margin: 0;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent;
  font-size: 16px;
  line-height: 1.2;
  color: #121212;
  letter-spacing: .6px;
}

html body .arro-search .arro-search__field {
  border: 1px solid #121212;
  border-radius: 0;
}

html body .arro-search .arro-search__label {
  top: 6px;
}

.arro-ps__searchfor {
  position: sticky;
  bottom: 0;
  background: #fff;
}

/* search clear (x) button: perfect circle (theme forced min-width:24px) */
html body .arro-search__clear {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  aspect-ratio: 1 / 1;
  flex: none;
  line-height: 1;
  box-sizing: border-box;
}