/* Modal Container */
.bw-search-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9990;
}

/* Backdrop escuro e borrado */
.bw-search-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Caixa principal da Busca */
.bw-search-container {
  position: absolute;
  /* top e right inseridos dinamicamente via JS */
  width: 480px;
  max-width: 90vw;
  background: var(--ink, #121212);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  animation: bwSearchFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Cabeçalho do Modal (Input e botões) */
.bw-search-header {
  display: flex;
  align-items: center;
  padding: 6px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bw-search-header svg {
  flex-shrink: 0;
}

#bw-search-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--f, 'Inter', sans-serif);
  font-size: 16px;
  font-weight: 400;
  padding: 0 12px;
  height: 32px;
  line-height: 32px;
  margin: 0 8px;
}

#bw-search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  line-height: 32px;
}

#bw-search-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bw-search-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Área de resultados */
.bw-search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 10px 0;
}

/* Barra de rolagem customizada */
.bw-search-results::-webkit-scrollbar {
  width: 6px;
}
.bw-search-results::-webkit-scrollbar-track {
  background: transparent;
}
.bw-search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}
.bw-search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Mensagem de Empty State */
.bw-search-empty {
  padding: 40px 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--f, 'Inter', sans-serif);
  font-size: 15px;
}

/* Item de resultado */
.bw-search-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 13px 24px;
  text-decoration: none;
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.bw-search-item:last-child {
  border-bottom: none;
}

.bw-search-item:hover, .bw-search-item:focus {
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.bw-search-tag {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--f, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 100px;
  flex-shrink: 0;
  margin-top: 2px;
}

.bw-search-item-content {
  flex-grow: 1;
}

.bw-search-item-content h3 {
  color: #fff;
  font-family: var(--f, 'Inter', sans-serif);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 6px 0;
}

.bw-search-item-content p {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--f, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animação de entrada */
@keyframes bwSearchFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsivo para mobile */
@media (max-width: 600px) {
  .bw-search-container {
    position: fixed !important;
    top: 68px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vh - 68px);
    border-radius: 0;
    border: none;
  }
  .bw-search-results {
    max-height: calc(100vh - 140px);
  }
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    z-index: 2147483646 !important; /* Apenas abaixo do cursor customizado */
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    box-shadow: 0px 8px 24px rgba(37, 211, 102, 0.4);
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateZ(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s;
}
.whatsapp-float:hover {
    transform: scale(1.1) translateZ(0);
    background-color: #1EBE5D;
    color: #FFF;
}
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}
