/* Soleil header controls the compact FiboSearch field. */
.soleil-site-header .dgwt-wcas-search-wrapp {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  background: transparent !important;
}

.soleil-site-header .dgwt-wcas-search-form {
  margin: 0;
}

/* Pirx includes its own padded background: keep the field visually compact. */
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp {
  position: relative;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: var(--soleil-search-radius) !important;
  box-shadow: none !important;
}

.soleil-site-header .dgwt-wcas-search-wrapp .dgwt-wcas-search-form .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
  box-sizing: border-box;
  height: var(--soleil-search-height) !important;
  min-height: var(--soleil-search-height) !important;
  padding: 0 44px 0 56px !important;
  border: 1px solid var(--soleil-search-border) !important;
  border-radius: var(--soleil-search-radius) !important;
  background: var(--soleil-search-bg) !important;
  color: var(--soleil-search-text) !important;
  font-family: var(--soleil-font-family) !important;
  font-size: var(--soleil-search-font-size) !important;
  font-weight: 400;
  line-height: 1.3;
  box-shadow: none !important;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.soleil-site-header .dgwt-wcas-search-wrapp .dgwt-wcas-search-form .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
  color: var(--soleil-search-placeholder) !important;
  font-size: var(--soleil-search-font-size) !important;
  font-weight: 400 !important;
  opacity: 1;
}

.soleil-site-header .dgwt-wcas-search-wrapp .dgwt-wcas-search-form .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
  border-color: var(--soleil-search-focus-border) !important;
  background: var(--soleil-search-bg) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* FiboSearch applies additional styles through its search-focused state. */
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-search-focused .dgwt-wcas-search-form .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
  border-color: var(--soleil-search-focus-border) !important;
  border-radius: var(--soleil-search-radius) !important;
  background: var(--soleil-search-bg) !important;
  box-shadow: none !important;
  outline: none !important;
}

.soleil-site-header .dgwt-wcas-search-wrapp .dgwt-wcas-search-form .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus-visible {
  outline: none !important;
}

/* FiboSearch owns the submit icon's horizontal placement entirely; only
   center it vertically without a horizontal transform, offset or padding. */
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit {
  top: 50% !important;
  transform: translateY(-50%);
  border: 0 !important;
  background: transparent !important;
  color: var(--soleil-search-icon);
  box-shadow: none !important;
}

.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx .dgwt-wcas-search-submit svg path,
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx .dgwt-wcas-preloader.dgwt-wcas-close svg path {
  fill: var(--soleil-search-icon) !important;
}

.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx .dgwt-wcas-search-submit:hover svg path,
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx .dgwt-wcas-close:hover svg path {
  fill: var(--soleil-search-icon-hover) !important;
}

.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx:focus-within .dgwt-wcas-search-submit,
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx.dgwt-wcas-search-focused .dgwt-wcas-search-submit {
  color: var(--soleil-search-focus-icon) !important;
}

.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx:focus-within .dgwt-wcas-search-submit svg path,
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx:focus-within .dgwt-wcas-preloader.dgwt-wcas-close svg path,
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx.dgwt-wcas-search-focused .dgwt-wcas-search-submit svg path,
.soleil-site-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx.dgwt-wcas-search-focused .dgwt-wcas-preloader.dgwt-wcas-close svg path {
  fill: var(--soleil-search-focus-icon) !important;
}

/* The reference's mobile input is slightly shorter. Keep the plugin's own
   mobile overlay and left/right icon movement untouched. */
@media (max-width: 767px) {
  .soleil-site-header .soleil-mobile-header .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp {
    padding: 5px 0 !important;
  }

  .soleil-site-header .soleil-mobile-header .dgwt-wcas-search-wrapp .dgwt-wcas-search-form .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
    height: 42px !important;
    min-height: 42px !important;
    font-size: 16px !important;
  }

  .soleil-site-header .soleil-mobile-header .dgwt-wcas-search-wrapp .dgwt-wcas-search-form .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
    font-size: 14px !important;
  }
}

/* FiboSearch moves its autocomplete under <body> and sets inline positioning.
   Unlike a focus-driven override, this stable layout cannot jump in width
   when users click a suggestion or the white area surrounding the results. */
body:has(.soleil-site-header) > .dgwt-wcas-suggestions-wrapp,
body:has(.soleil-site-header) > .dgwt-wcas-details-wrapp {
  border: 0 !important;
  border-radius: 0 !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
}

body:has(.soleil-site-header) > .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion,
body:has(.soleil-site-header) > .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores {
  padding-inline: 1rem !important;
  font-family: var(--soleil-font-family);
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
}

/* Original product images: never depend on FiboSearch's missing 64px files. */
body:has(.soleil-site-header) .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-si {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px !important;
  min-width: 64px;
  height: 64px;
  overflow: hidden;
  vertical-align: middle;
}

body:has(.soleil-site-header) .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-si img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  object-fit: contain;
}

/* Give the variable-price range a real right-hand column on desktop.
   No forced line breaks between the two prices or the currency. */
@media (min-width: 768px) {
  body:has(.soleil-site-header) .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-content-wrapp {
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    gap: 24px;
    min-width: 0;
  }

  body:has(.soleil-site-header) .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-st {
    flex: 1 1 auto;
    min-width: 0;
  }

  body:has(.soleil-site-header) .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-meta {
    box-sizing: border-box;
    flex: 0 0 260px;
    width: 260px;
    min-width: 260px;
    max-width: none !important;
    margin: 0 0 0 auto;
    text-align: right;
    white-space: nowrap;
  }

  body:has(.soleil-site-header) .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-sp {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px;
    width: 100%;
    min-width: max-content;
    white-space: nowrap !important;
  }

  body:has(.soleil-site-header) .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-sp > :not(.screen-reader-text) {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  body:has(.soleil-site-header) .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-sp .woocommerce-Price-amount bdi {
    white-space: nowrap !important;
  }
}

.dgwt-wcas-open-pirx-compact .dgwt-wcas-suggestions-wrapp,
.dgwt-wcas-open-pirx-compact .dgwt-wcas-details-wrapp {
  margin-top: 0;
}

@media (min-width: 768px) {
html:not(.dgwt-wcas-overlay-mobile-on) body:has(.soleil-main-header__search) > .dgwt-wcas-suggestions-wrapp {
  box-sizing: border-box;
  top: 120px !important;
  left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  border-inline: 0 !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
}

html:not(.dgwt-wcas-overlay-mobile-on) body:has(.soleil-main-header__search) > .dgwt-wcas-suggestions-wrapp > * {
  box-sizing: border-box;
  width: min(calc(100% - 2 * var(--soleil-padding-desktop)), var(--soleil-container-width)) !important;
  margin-inline: auto !important;
}
}

@media (max-width: 767px) {
  body:has(.soleil-site-header) > .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion,
  body:has(.soleil-site-header) > .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores {
    padding-inline: 12px !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  html:not(.dgwt-wcas-overlay-mobile-on) body:has(.soleil-main-header__search) > .dgwt-wcas-suggestions-wrapp > * {
    width: min(calc(100% - 2 * var(--soleil-padding-tablet)), var(--soleil-container-width)) !important;
  }
}
