/* Busca no header: trigger (ícone + "Busca") e campo expandido */

#main-header .right-actions .header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

#main-header .right-actions .action-search {
  display: inline-flex;
  align-items: center;
  border: none;
  height: auto;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: #fff;
  font-size: 14rem;
  font-weight: 600;
  transition: color 0.2s;
}

#main-header .right-actions .action-search span {
  margin-left: 8rem;
  margin-top: 2px;
}

#main-header .right-actions .action-search img {
  display: block;
}

/* Header escuro: ícone branco; single/sticky: ícone roxo (mesmo search-icon.svg do overlay) */
#main-header .right-actions .action-search .header-search-trigger-icon {
  filter: brightness(0) invert(1);
}

#main-header.single:not(.submenu-open) .right-actions .action-search .header-search-trigger-icon,
#main-header.sticky:not(.submenu-open) .right-actions .action-search .header-search-trigger-icon {
  filter: none;
}




#main-header .right-actions .action-search:hover img {
  opacity: 1;
}

/* Header single/sticky (bg white): cor do trigger */
#main-header.single:not(.submenu-open) .right-actions .action-search,
#main-header.sticky:not(.submenu-open) .right-actions .action-search {
  color: #9900FF;
}

/* Form wrap: escondido por padrão, aparece ao abrir */
#main-header .header-search-form-wrap {
  display: none;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 320px;
  z-index: 10;
  right: -160px;
}

#main-header.header-search-open .header-search-form-wrap {
  display: block;
}

/* Form: campo branco, cantos arredondados */
#main-header .header-search-form {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 0 12px 0 16px;
  height: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#main-header .header-search-icon {
  flex-shrink: 0;
  margin-right: 10px;
  opacity: 0.7;
}

#main-header .header-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  font-size: 14rem;
  color: #1d1434;
  background: transparent;
  outline: none;
}

#main-header .header-search-input::placeholder {
  color: #9ca3af;
}

#main-header .header-search-input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

#main-header .header-search-clear {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

#main-header .header-search-clear:hover {
  color: #1d1434;
  background: #f3f4f6;
}

/* Ajuste nth-child: primeiro filho agora é .header-search-wrap; Portal = 2º, Acesso = 3º */
#main-header .right-actions .action:nth-child(2) a {
  border: 1px solid #acbec7;
  height: 32rem;
  padding: 0 16rem;
  border-radius: 8px;
  transition: none;
}

#main-header .right-actions .action:nth-child(2) a span {
  color: #fff;
}

/* Portal do Corretor: nenhum hover — igual ao estado normal */
#main-header .right-actions .action:nth-child(2) a:hover,
#main-header .right-actions .action:nth-child(2) a:focus {
  background-color: transparent !important;
  border-color: #acbec7 !important;
  box-shadow: none !important;
  color: inherit !important;
}

#main-header .right-actions .action:nth-child(2) a:hover span,
#main-header .right-actions .action:nth-child(2) a:focus span {
  color: #fff !important;
}

#main-header .right-actions .action:nth-child(2) a:hover svg path,
#main-header .right-actions .action:nth-child(2) a:focus svg path {
  fill: #fff !important;
}

#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a:hover,
#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a:focus,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a:hover,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a:focus {
  background-color: transparent !important;
  border-color: #acbec7 !important;
  box-shadow: none !important;
}

#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a:hover span,
#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a:focus span,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a:hover span,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a:focus span {
  color: #9900FF !important;
}

#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a:hover svg path,
#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a:focus svg path,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a:hover svg path,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a:focus svg path {
  fill: #9900FF !important;
}

#main-header .right-actions .action:nth-child(3) a {
  border: none;
  height: unset;
  padding: 0;
}

#main-header .right-actions .action:nth-child(3) a:hover span {
  color: #9900FF;
}

#main-header .right-actions .action:nth-child(3) a:hover svg path {
  fill: #9900FF;
}

/* Single/sticky: cores dos botões Portal e Acesso */
#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a {
  border-color: #acbec7;
}

#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a svg path,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a svg path {
  fill: #9900FF;
}

#main-header.single:not(.submenu-open) .right-actions .action:nth-child(2) a span,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(2) a span {
  color: #9900FF;
}

#main-header.single:not(.submenu-open) .right-actions .action:nth-child(3) svg path,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(3) svg path {
  fill: #9900FF;
}

#main-header.single:not(.submenu-open) .right-actions .action:nth-child(3) span,
#main-header.sticky:not(.submenu-open) .right-actions .action:nth-child(3) span {
  color: #9900FF;
}

@media (max-width: 1023px) {
  #main-header .header-search-form-wrap {
    width: 260px;
  }
}
