
/* LMDB SEARCH RESPONSIVE V1
   Suggestions AWS dans body, popup Elementor 7738.
   Ne jamais imposer la largeur AWS sur desktop.
*/

/* Desktop : composition V3 */
body.lmdb-search-popup-open > .aws-search-result {
  box-sizing: border-box !important;
  border: 1px solid #e9e5df !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(24,23,21,.11) !important;
  overflow: hidden !important;
  font-family: "Manrope",system-ui,sans-serif !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_scroll {
  max-height: min(55vh,480px) !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #c9c3bb transparent;
  overscroll-behavior: contain;
}

body.lmdb-search-popup-open > .aws-search-result
.aws_results .aws_result_item {
  box-sizing: border-box !important;
  display: block !important;
  min-height: 104px !important;
  padding: 14px 16px !important;
  background: #fff !important;
  border-bottom: 1px solid #f0ece6 !important;
}

body.lmdb-search-popup-open > .aws-search-result
.aws_result_item:hover,
body.lmdb-search-popup-open > .aws-search-result
.aws_result_item.hovered {
  background: #faf8f5 !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_image {
  display: block !important;
  float: left !important;
  width: 78px !important;
  height: 76px !important;
  margin: 0 15px 0 0 !important;
  padding: 0 !important;
  border-radius: 9px !important;
  background: #f7f5f1 !important;
  overflow: hidden !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  object-fit: contain !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_content {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  min-width: 0 !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_title {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  color: #1d1c1a !important;
  font-family: "Manrope",system-ui,sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
  line-height: 1.5 !important;
  overflow-wrap: anywhere !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_title strong {
  color: #946b3c !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_price {
  display: block !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 83px !important;
  margin: 0 !important;
  color: #181715 !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.5 !important;
  text-align: right !important;
}

body.lmdb-search-popup-open > .aws-search-result
.aws_result_price > .woocommerce-Price-amount {
  white-space: nowrap !important;
}

body.lmdb-search-popup-open > .aws-search-result
.aws_result_price .woocommerce-price-suffix {
  display: block !important;
  margin-top: 4px !important;
  color: #8a8176 !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

body.lmdb-search-popup-open > .aws-search-result .aws_result_excerpt {
  display: none !important;
}

/* Mobile : structure V5 */
@media (max-width: 767px) {
  #elementor-popup-modal-7738 {
    z-index: 2147483000 !important;
  }

  #elementor-popup-modal-7738 .dialog-widget-content {
    position: fixed !important;
    inset: 0 !important;
    transform: none !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: hidden !important;
    resize: none !important;
  }

  #elementor-popup-modal-7738 .dialog-message {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: calc(76px + env(safe-area-inset-top)) 16px 16px !important;
    resize: none !important;
  }

  #elementor-popup-modal-7738 .dialog-message::before {
    content: "RECHERCHER UN PRODUIT";
    position: absolute;
    top: calc(30px + env(safe-area-inset-top));
    left: 16px;
    color: #97734c;
    font-family: "Manrope",system-ui,sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
  }

  #elementor-popup-modal-7738 .dialog-close-button {
    position: absolute !important;
    top: calc(17px + env(safe-area-inset-top)) !important;
    right: 16px !important;
    width: 40px !important;
    height: 40px !important;
    z-index: 10 !important;
  }

  #elementor-popup-modal-7738 .elementor-element-7d7a353,
  #elementor-popup-modal-7738 .elementor-element-7d7a353 > .e-con-inner,
  #elementor-popup-modal-7738 .elementor-element-9b73d11,
  #elementor-popup-modal-7738 .elementor-widget-container,
  #elementor-popup-modal-7738 .aws-container,
  #elementor-popup-modal-7738 .aws-wrapper,
  #elementor-popup-modal-7738 .aws-search-form {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  #elementor-popup-modal-7738 .elementor-element-7d7a353,
  #elementor-popup-modal-7738 .elementor-element-7d7a353 > .e-con-inner,
  #elementor-popup-modal-7738 .elementor-element-9b73d11,
  #elementor-popup-modal-7738 .elementor-widget-container,
  #elementor-popup-modal-7738 .aws-container,
  #elementor-popup-modal-7738 .aws-wrapper {
    padding: 0 !important;
    margin: 0 !important;
  }

  #elementor-popup-modal-7738 .elementor-element-7d7a353 {
    min-height: 0 !important;
    align-items: stretch !important;
  }

  #elementor-popup-modal-7738 .aws-search-form {
    height: 56px !important;
  }

  #elementor-popup-modal-7738 .aws-search-field {
    height: 54px !important;
    min-height: 54px !important;
    font-size: 16px !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result {
    position: fixed !important;
    top: var(--lmdb-search-top) !important;
    left: var(--lmdb-search-left) !important;
    right: auto !important;
    width: var(--lmdb-search-width) !important;
    max-width: none !important;
    max-height: var(--lmdb-search-height) !important;
    margin: 0 !important;
    border: 1px solid #e9e5df !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: hidden !important;
    z-index: 2147483001 !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result .aws_result_scroll {
    max-height: var(--lmdb-search-height) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  body.lmdb-search-mobile-open > .aws-search-result
  .aws_results .aws_result_item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 84px !important;
    padding: 11px 12px !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result .aws_result_image {
    display: block !important;
    float: none !important;
    flex: 0 0 62px !important;
    width: 62px !important;
    height: 64px !important;
    margin: 0 !important;
    border-radius: 8px !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result .aws_result_image img {
    padding: 7px !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result .aws_result_content {
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result .aws_result_head {
    display: block !important;
    width: 100% !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result .aws_result_title {
    display: block !important;
    width: 100% !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result .aws_result_price {
    display: block !important;
    min-width: 0 !important;
    width: auto !important;
    margin-top: 6px !important;
    text-align: left !important;
    font-size: 12px !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result
  .woocommerce-price-suffix {
    display: inline !important;
    margin-top: 0 !important;
    color: #898177 !important;
    font-size: 10px !important;
    font-weight: 450 !important;
  }

  body.lmdb-search-mobile-open .lmdb-search-float-hidden {
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 359px) {
  body.lmdb-search-mobile-open > .aws-search-result .aws_result_image {
    flex-basis: 54px !important;
    width: 54px !important;
    height: 58px !important;
  }

  body.lmdb-search-mobile-open > .aws-search-result .aws_result_title {
    font-size: 12px !important;
  }
}

/* LMDB_SEARCH_NAVIGATION_FINISH_V1
   Evite le retour furtif aux styles natifs AWS.
*/
body.lmdb-search-navigating > .aws-search-result {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}


/* ======================================================
   LMDB_AWS_ORPHAN_PORTAL_GUARD_V3

   AWS place ses suggestions directement sous BODY.

   Ne jamais afficher cette liste native sur une
   page catalogue si le popup de recherche est ferme.

   Lorsque le popup est ouvert, les styles habituels
   desktop et mobile reprennent normalement.
   ====================================================== */

body:is(
    .single-product,
    .search,
    .tax-product_cat,
    .post-type-archive-product
):not(.lmdb-search-popup-open) > .aws-search-result {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: none !important;
}

/* Priorite a la navigation en cours, meme si le
   popup n'a pas encore totalement disparu. */

body.lmdb-search-navigating > .aws-search-result {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: none !important;
}
