/* ===================================================
   FiboSearch — Customização visual Laboraltec
   =================================================== */

/* --- Header sempre acima do dropdown --- */
.elementor-location-header {
  position: relative !important;
  z-index: 10000 !important;
}

/* --- Ao abrir busca no mobile: wrapper cobre todo o header --- */
@media (max-width: 1024px) {
  .elementor-location-header.lbr-search-aberto * {
    z-index: auto !important;
  }
  .elementor-location-header.lbr-search-aberto .dgwt-wcas-search-wrapp.lbr-aberto {
    z-index: 99999 !important;
  }
}

/* --- Largura do widget --- */
.dgwt-wcas-search-wrapp {
  width: 100% !important;
}

/* --- Fechado: bloqueia cliques na área invisível --- */
.dgwt-wcas-search-wrapp:not(.lbr-aberto) {
  pointer-events: none !important;
}

/* --- Ícone da lupa: sempre clicável, fade ao abrir busca --- */
.searchicon {
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: opacity 0.15s ease !important;
}

/* --- Esconde wrapper até JS inicializar (evita flash) --- */
.dgwt-wcas-search-wrapp:not(.lbr-ready) {
  visibility: hidden !important;
}
.dgwt-wcas-search-wrapp.lbr-ready {
  visibility: visible !important;
}

/* --- Reset estilos padrão do FiboSearch (borda/fundo/sombra do form) --- */
.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp,
.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp:focus-within,
.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp:hover {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  border: none !important;
  border-bottom: 1.5px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 10px 10px 10px 10px !important;
}

/* --- Desktop only --- */
@media (min-width: 1025px) {
  .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp,
  .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp:focus-within,
  .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp:hover {
    padding: 8px 0px !important;
  }

  .dgwt-wcas-search-wrapp.lbr-aberto .dgwt-wcas-sf-wrapp,
  .dgwt-wcas-search-wrapp.lbr-aberto .dgwt-wcas-sf-wrapp:focus-within,
  .dgwt-wcas-search-wrapp.lbr-aberto .dgwt-wcas-sf-wrapp:hover {
    border-bottom-color: #0A366F !important;
  }

  .dgwt-wcas-cancelar {
    margin-top: 9px !important;
    margin-bottom: -4px !important;
    padding: 0 !important;
  }

  .dgwt-wcas-search-input {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #222222 !important;
  }
}

/* Label acessível: fora do fluxo visual */
.dgwt-wcas-sf-wrapp .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
}

/* Voice search: oculto */
.dgwt-wcas-voice-search {
  display: none !important;
}

/* --- Input --- */
.dgwt-wcas-search-input {
  font-family: 'Libre Franklin', sans-serif !important;
  font-size: 12px !important;
  color: #0A366F !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  flex: 1 !important;
  order: 2 !important;
  min-width: 0 !important;
  padding: 10px 10px 0px 0px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  max-width: 0 !important;
}

.dgwt-wcas-search-wrapp.lbr-aberto .dgwt-wcas-search-input {
  opacity: 1 !important;
  pointer-events: auto !important;
  width: auto !important;
  max-width: none !important;
}

.dgwt-wcas-search-input::placeholder {
  color: #0A366F !important;
  opacity: 0.5 !important;
  font-size: 12px !important;
  padding: 10px 10px 0px 0px !important;
}

/* --- Botão submit (lupa) — extrema esquerda --- */
.dgwt-wcas-search-submit {
 display:none !Important}

/* --- Preloader/X --- */
.dgwt-wcas-preloader {
  display:none !important;
}

/* --- Lupa customizada: oculta globalmente, visível só no mobile quando aberto --- */
.lbr-lupa-icon {
  display: none !important;
}

/* --- Botão Cancelar — extrema direita, só com texto --- */
.dgwt-wcas-cancelar {
  display: none;
  background: transparent;
  border: none;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #9B9B9B;
  cursor: pointer;
  padding: 0 0 0 8px;
  white-space: nowrap;
  order: 4;
  flex-shrink: 0;
  margin-bottom: 0;
}

.dgwt-wcas-search-wrapp.dgwt-wcas-search-filled .dgwt-wcas-cancelar,
.dgwt-wcas-search-wrapp.lbr-aberto .dgwt-wcas-cancelar {
  display: inline-block;
}

.dgwt-wcas-cancelar:hover,
.dgwt-wcas-cancelar:focus,
.dgwt-wcas-cancelar:active {
  color: #9B9B9B !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

/* --- Overlay: cobre página abaixo do header, atrás do dropdown --- */
.lbr-search-overlay {
  position: fixed;
  top: 67px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

/* --- Dropdown: full-width fixo abaixo do header --- */
.dgwt-wcas-suggestions-wrapp {
  position: fixed !important;
  top: 69px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  background: #fff !important;
  border: none !important;
  border-top: 1px solid #F3F4F5 !important;
  border-radius: 0 !important;
  
  z-index: 9999 !important;
  padding: 20px 0 !important;
}

/* --- Título "Resultado" --- */
.dgwt-wcas-suggestions-wrapp::before {
  content: 'Resultado';
  display: block;
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 0 20px;
  font-family: 'Libre Franklin', sans-serif;
  font-weight: 400;
  font-size: 32px;
  color: #0A366F;
  box-sizing: border-box;
}

/* --- Cada item resultado: encaixotado a 1200px --- */
.dgwt-wcas-suggestion-product {
  display: flex !important;
  align-items: center !important;
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid #e5e5e5 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-decoration: none !important;
  gap: 16px !important;
  box-sizing: border-box !important;
}

.dgwt-wcas-suggestion-product:last-of-type {
  border-bottom: none !important;
}

.dgwt-wcas-suggestion-product:hover,
.dgwt-wcas-suggestion-product.dgwt-wcas-suggestion--active {
  background: transparent !important;
}

/* --- Thumbnail --- */
.dgwt-wcas-si {
  flex-shrink: 0 !important;
  width: 70px !important;
  height: 70px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: transparent !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dgwt-wcas-si img {
  background: transparent !important;
  border: none !important;
  border-radius: 10px !important;
  display: block !important;
  margin: auto !important;
  padding: 0 !important;
  height: auto !important;
  width: auto !important;
  max-height: 100% !important;
  max-width: 100% !important;
}

/* --- Nome do produto --- */
.dgwt-wcas-st-title {
  font-family: 'Libre Franklin', sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  color: #222222 !important;
  display: block !important;
}

/* --- SKU --- */
.dgwt-wcas-sku {
  font-family: 'Libre Franklin', sans-serif !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #4B4B4B !important;
  display: block !important;
  margin-top: 4px !important;
}

/* --- Nenhum resultado: centralizado --- */
.dgwt-wcas-suggestion-nores {
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
  font-family: 'Libre Franklin', sans-serif !important;
  font-size: 16px !important;
  color: #4B4B4B !important;
}

/* --- Mobile: barra abre em fullwidth cobrindo o header --- */
@media (max-width: 1024px) {
  /* Placeholder mobile: 14px regular #4B4B4B */
  .dgwt-wcas-search-input {
    font-size: 14px !important;
    color: #4B4B4B !important;
  }
  .dgwt-wcas-search-input::placeholder {
    font-size: 14px !important;
    color: #4B4B4B !important;
    opacity: 1 !important;
  }

  .dgwt-wcas-search-wrapp.lbr-aberto {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 75px !important;
    z-index: 10001 !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }

  .dgwt-wcas-search-wrapp.lbr-aberto .dgwt-wcas-sf-wrapp {
    padding: 10px 0 !important;
    width: 100% !important;
  }

  /* Lupa customizada no mobile — visível só quando aberto */
  .dgwt-wcas-search-wrapp.lbr-aberto .lbr-lupa-icon {
    display: flex !important;
    align-items: center !important;
    padding: 10px 8px 0 0 !important;
    flex-shrink: 0 !important;
  }

  /* Overlay no mobile começa abaixo da barra (que cobre o header) */
  .lbr-search-overlay.lbr-mobile {
    top: 75px !important;
  }

  /* Dropdown mobile: altura dinâmica para scroll interno (dvh desconta barra do Safari) */
  .dgwt-wcas-suggestions-wrapp {
    height: calc(100vh - 75px) !important;
    height: calc(100dvh - 75px) !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: env(safe-area-inset-bottom, 20px) !important;
  }
}

/* --- Padding esquerdo do input (evita corte do placeholder) --- */
#dgwt-wcas-search-input-1 {
  padding-left: 3px !important;
  margin-bottom: 0 !important;
  color: #222222 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

/* --- Wrapper do botão "ver todos" --- */
.dgwt-wcas-suggestion-more {
  display: flex !important;
  justify-content: flex-start !important;
  max-width: 1200px !important;
  margin: 24px auto !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
}

/* --- Botão pill "Ver produtos" --- */
.dgwt-wcas-st-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 100px !important;
  border: 1px solid #0063B9 !important;
  background: #fff !important;
  font-family: 'Lato', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0063B9 !important;
  padding: 12px 28px !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.dgwt-wcas-st-more:hover {
  background: #f0f6ff !important;
  text-decoration: none !important;
}

.dgwt-wcas-suggestion-more:hover,
.dgwt-wcas-suggestion-more.dgwt-wcas-suggestion--active {
  background: transparent !important;
}

#cd-search:focus { outline: none; border-color: transparent !important; }

@media (min-width: 1025px) {
  #dgwt-wcas-search-input-1 {
    margin-top: 4px !important;
  }
  #dgwt-wcas-search-input-1::placeholder {
    font-family: 'Libre Franklin', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #4B4B4B !important;
    opacity: 1 !important;
  }
}
