/* O BAHIA POST — FUNDO DO CABEÇALHO FOXIZ */

/* Desktop — Layout 5 com logo centralizada */
@media (min-width: 1025px) {
  .header-5,
  .header-5 .header-inner,
  .header-5 .header-logo,
  .header-5 .logo-wrap,
  .header-5 .logo-area,
  .header-5 .header-brand {
    background-color: #001E5A !important;
  }
}

/* Tablet e celular — cabeçalho independente */
@media (max-width: 1024px) {
  .mobile-header,
  .mobile-header-inner,
  .mobile-header-wrap {
    background-color: #001E5A !important;
  }
}

/* O Bahia Post — linha divisória apenas no desktop */

@media screen and (min-width: 1025px) {
  .header-5 .navbar-wrap {
    border-top: 2px solid rgba(255, 255, 255, 0.65);
  }
}

/* O BAHIA POST — BUSCA FOXIZ 3.2.1 */

:root {
  --obh-blue: #001E5A;
  --obh-text: #111827;
  --obh-border: #D7DFEA;
}

/* CAMPO BRANCO — DESKTOP E CELULAR */

.header-5 .header-search-form .search-form-inner {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 15px;
  background: #fff !important;
  border: 1px solid var(--obh-border) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

.header-5 .header-search-form .search-text {
  flex: 1;
  min-width: 0;
}

.header-5 .header-search-form input.field {
  width: 100%;
  color: var(--obh-text) !important;
  background: transparent !important;
  border: 0 !important;
  outline: none;
  box-shadow: none !important;
  font: 15px "NeoSans", Arial, sans-serif;
}

.header-5 .header-search-form input.field::placeholder {
  color: #687385 !important;
  opacity: 1;
}

/* Lupa azul dentro do campo */

.header-5 .header-search-form .search-icon-svg {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: var(--obh-blue) !important;
  -webkit-mask: url("https://obahiapost.com/wp-content/uploads/2026/11/ICON-DE-BUSCA-O-BAHIA-POST.svg") center / contain no-repeat;
  mask: url("https://obahiapost.com/wp-content/uploads/2026/11/ICON-DE-BUSCA-O-BAHIA-POST.svg") center / contain no-repeat;
}

/* Seta escura */

.header-5 .header-search-form .rbi-cright {
  color: #111 !important;
}

/* DESKTOP */

@media (min-width: 1025px) {

  /* Evita cortes no painel de resultados */

  #site-header.header-5,
  #site-header.header-5 .logo-sec,
  #site-header.header-5 .logo-sec-inner,
  #site-header.header-5 .logo-sec-right,
  #site-header.header-5 .navbar-right {
    overflow: visible !important;
  }

  #site-header.header-5 .logo-sec {
    position: relative;
    z-index: 80;
  }

  /* Espaço para a lupa e Buscar */

  .header-5 .w-header-search {
    position: relative !important;
    width: 112px;
    min-width: 112px;
    overflow: visible !important;
  }

  .header-5 .w-header-search > .search-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    width: 100%;
    color: #fff !important;
    white-space: nowrap;
    text-decoration: none;
  }

  .header-5 .w-header-search > .search-trigger
  .search-icon-svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    filter: brightness(0) invert(1) !important;
  }

  .header-5 .w-header-search > .search-trigger::after {
    content: "Buscar";
    color: #fff !important;
    font: 400 15px "NeoSans", Arial, sans-serif;
  }

  /* Esconde o tooltip Search */

  body:has(.header-5 .search-trigger:hover) .tipsy,
  body:has(.header-5 .search-trigger:focus) .tipsy {
    display: none !important;
  }

  /* Campo abre SOBRE o botão original */

  .header-5 .w-header-search > .header-dropdown {
    position: absolute !important;
    top: 50% !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: min(450px, calc(100vw - 40px)) !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    z-index: 100 !important;
  }

  .header-5 .w-header-search .header-search-form {
    padding: 0 !important;
    background: transparent !important;
  }

  .header-5 .w-header-search .live-search-form {
    position: relative !important;
    width: 100% !important;
  }

  /* Resultados ABAIXO do campo */

  .header-5 .w-header-search .live-search-response {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(430px, 60vh) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    margin: 0 !important;
    transform: none !important;
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 32px rgba(0,0,0,.16);
    z-index: 101 !important;
  }

  /* Títulos escuros */

  .header-5 .live-search-response
  :is(.entry-title, .p-url, a) {
    color: var(--obh-text) !important;
  }

  /* Remove datas */

  .header-5 .live-search-response
  :is(.p-meta, .meta-inner, time) {
    display: none !important;
  }

  /* Imagens arredondadas */

  .header-5 .live-search-response .featured-img {
    border-radius: 9px;
  }

  /* Botão de mais resultados */

  .header-5 .live-search-response .loadmore-trigger {
    color: #fff !important;
    background: var(--obh-blue) !important;
    border-radius: 999px;
  }
}

/* MOBILE — MANTÉM O DESIGN APROVADO */

@media (max-width: 1024px) {

  .header-5 .mobile-search-form .search-form-inner {
    min-height: 52px;
    border-radius: 999px !important;
  }

  .header-5 .mobile-search-icon .search-icon-svg {
    filter: brightness(0) invert(1) !important;
  }
}

/* O BAHIA POST — CORREÇÃO DOS RESULTADOS DESKTOP */

@media (min-width: 1025px) {

  /* A área da busca fica acima do menu azul */
  #site-header.header-5 .logo-sec {
    position: relative !important;
    z-index: 9999 !important;
    overflow: visible !important;
  }

  /* O menu não encobre os resultados */
  #site-header.header-5 #navbar-outer {
    position: relative;
    z-index: 1 !important;
  }

  /* Permite que o painel se estenda abaixo do cabeçalho */
  #site-header.header-5 .logo-sec-inner,
  #site-header.header-5 .logo-sec-right,
  #site-header.header-5 .navbar-right,
  #site-header.header-5 .w-header-search,
  #site-header.header-5 .header-dropdown {
    overflow: visible !important;
  }

  /* Posiciona os resultados abaixo do campo */
  #site-header.header-5
  .live-search-form {
    position: relative !important;
  }

  #site-header.header-5
  .live-search-form .live-search-response {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.15) !important;
    z-index: 10000 !important;
  }

  /* Rolagem mais discreta */
  #site-header.header-5
  .live-search-response {
    scrollbar-width: thin;
    scrollbar-color: #B7C3D5 transparent;
  }

  /* Oculta a lupa e o Buscar originais
     enquanto o visitante digita */
  #site-header.header-5
  .w-header-search:has(.field:focus)
  > .search-trigger {
    opacity: 0 !important;
  }
}