/* ==========================================================================
   Search Page Styles - Refactored & Modernized
   ========================================================================== */

.search-results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 4px;
  background: white;
  border: 1px solid rgba(17, 92, 191, 0.12);
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
  /* margin-top: 45px; */ /* Removido para consistência */
}


@media (max-width: 768px) {
  .main-content-section {
    width: 100%;
  }
}

.price-range-slider-container {
  position: relative;
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
}

.slider-track,
.slider-range {
  position: relative;
  border-radius: 3px;
  height: 8px;
  width: 100%;
  top: -7px
}

.slider-track {
  background-color: #B9BDC6;
  /* Cinza T2S */
  z-index: 1;
}

.slider-range {
  background-color: #0357b8;
  /* Azul T2S */
  z-index: 2;
}

.price-range-slider-container input[type="range"] {
  position: absolute;
  width: 100%;
  height: 6px;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  z-index: 3;
  top: 58%;
  transform: translateY(-50%);
  margin: 0;
  left: 4px; /* Mover slider para a esquerda */
}

.price-range-slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #ffd700;
  /* Gold */
  border: 2px solid #0a192f;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.price-range-slider-container input[type="range"]::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #ffd700;
  /* Gold */
  border: 2px solid #0a192f;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Garantir que o slider mínimo fique acima do máximo */
.price-range-slider-container #slider-min {
  z-index: 5;
}

.price-range-slider-container #slider-max {
  z-index: 4;
}

.price-range-slider-container {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

.price-values {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-family: Arial, sans-serif;
  color: #333;
}

.slider-wrapper {
  position: relative;
  height: 5px;
}

.slider-track {
  position: absolute;
  width: 100%;
  height: 5px;
  background-color: #ddd;
  border-radius: 3px;
  top: 0;
  z-index: 1;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
  margin: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background-color: #3264FF;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  margin-top: -7px;
  /* Centraliza o thumb verticalmente */
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background-color: #3264FF;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
}

.main-content-section {
  flex-grow: 1;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .main-content-section {
    width: 100%;
  }
}

/* Hero Section */
.hero-section--search {
  margin-top: 0;
  padding-bottom: 2rem;
}

.hero-card--compact {
  padding: 2rem;
  gap: 1.5rem;
}

/* Search Main Layout */
.search-main {
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.search-layout {
  display: grid;
  grid-template-columns: 410px 1fr;
  align-items: start;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0; /* Evita overflow horizontal */
}

/* Filters Sidebar */
.search-filters {
  position: sticky;
  top: 72.41px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  max-height: calc(100vh - 72.41px);
  overflow-y: auto;
  overflow-x: hidden;
  align-self: start;
}

.search-filters::-webkit-scrollbar {
  width: 6px;
}

.search-filters::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.search-filters__header {
  display: grid;
  gap: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
}

.search-filters__eyebrow {
  font-size: 0.675rem; /* reduzido de 0.75rem */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a192f;
  font-weight: 700;
  opacity: 0.7;
}

.search-filters__title {
  margin: 0;
  font-size: 1.08rem; /* reduzido de 1.2rem */
  font-weight: 700;
  color: #0a192f;
}

.search-filters__reset {
  justify-self: flex-start;
  border: none;
  background: none;
  color: #d32f2f;
  font-size: 0.765rem; /* reduzido de 0.85rem */
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.search-filters__expand-toggle {
  display: none;
  background: none;
  border: none;
  color: #0a192f;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s;
  padding: 0;
}

.search-filters__content {
  display: contents;
}

.search-filters.collapsed .search-filters__content {
  display: none;
}

.search-filters.collapsed .facet--fieldOptions,
.search-filters.collapsed .facet--status,
.search-filters.collapsed .facet--engagement,
.search-filters.collapsed .facet--recency {
  display: none;
}

@media (max-width: 768px) {
  .search-layout {
    grid-template-columns: 1fr;
  }

  .search-filters {
    position: relative !important;
    max-height: none;
    top: 0;
    order: 1;
    gap: 0;
    padding: 1rem;
  }

  .search-filters__header {
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 1rem;
  }

  .search-filters__expand-toggle {
    display: block;
    justify-self: flex-end;
  }

  .search-filters.collapsed .search-filters__expand-toggle i {
    transform: rotate(0deg);
  }

  .search-filters:not(.collapsed) .search-filters__expand-toggle i {
    transform: rotate(180deg);
  }

  .search-filters.collapsed > div:not(.search-filters__header),
  .search-filters.collapsed .facet--fieldOptions,
  .search-filters.collapsed .facet--status,
  .search-filters.collapsed .facet--engagement,
  .search-filters.collapsed .facet--recency {
    display: none;
  }

  .search-results {
    order: 2;
  }

  .search-main {
    margin-top: 0;
  }
}

/* Facets */
.facet--fieldOptions h4 {
  font-size: 0.81rem; /* reduzido de 0.9rem */
  font-weight: 700;
  text-transform: uppercase;
  color: #0a192f;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.facet--fieldOptions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.facet--fieldOptions li {
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.facet--fieldOptions a {
  text-decoration: none;
  color: #555;
  font-size: 0.855rem; /* reduzido de 0.95rem */
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.facet--fieldOptions a:hover {
  background: #f5f7fa;
  color: #0357b8;
  padding-left: 14px;
}

/* Price Slider */
.price-range-slider-container {
  position: relative;
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.slider-track {
  position: absolute;
  width: 100%;
  height: 6px;
  background-color: #e0e0e0;
  border-radius: 3px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.slider-range {
  position: absolute;
  height: 6px;
  background: #0a192f;
  /* Dark Navy */
  border-radius: 3px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.price-range-slider-container input[type="range"] {
  position: absolute;
  width: 100%;
  height: 6px;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  z-index: 3;
  top: 58%;
  transform: translateY(-50%);
  margin: 0;
  left: 4px; /* Mover slider para a esquerda */
}

.price-range-slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #ffd700;
  /* Gold */
  border: 2px solid #0a192f;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.price-range-slider-container input[type="range"]::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #ffd700;
  /* Gold */
  border: 2px solid #0a192f;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Garantir que o slider mínimo fique acima do máximo */
.price-range-slider-container #slider-min {
  z-index: 5;
}

.price-range-slider-container #slider-max {
  z-index: 4;
}

/* Price Inputs */
.facet__custom {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: end;
  gap: 8px;
}

.price-field {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.price-field input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
}

.btn-apply {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #0a192f;
  color: #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-apply:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Search Results */
.search-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-results__header {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.search-results__title {
  font-size: 1.35rem; /* reduzido de 1.5rem */
  font-weight: 700;
  color: #0a192f;
}

.search-results__caption {
  color: #666;
  margin-top: 0.5rem;
  font-size: 0.95rem; /* reduzido implicitamente com corpo */
}

.search-results__search input {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  border: 1px solid #e0e0e0;
  font-size: 0.9rem; /* reduzido de 1rem */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.3s;
}

.search-results__search input:focus {
  outline: none;
  border-color: #0a192f;
  box-shadow: 0 4px 15px rgba(10, 25, 47, 0.1);
}

/* Lead Cards (Horizontal) */
.lead-list .col {
  display: flex;
}

.lead-card-search {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  padding-left: 3rem !important;
  padding-right: 3rem !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  align-items: stretch;
}

@media (max-width: 500px) {
  .lead-card-search {
    padding: 1.5rem !important;
  }
}

@media (max-width: 400px) {
  .lead-card-search {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

.lead-card__row {
  display: flex;
  align-items: flex-start;
  flex: 1;
}

.lead-card__button-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Hover Effect - Static Glow */
.lead-card-search:hover {
  box-shadow: 0 0 25px rgba(10, 25, 47, 0.1), 0 0 0 1px rgba(10, 25, 47, 0.05);
  border-color: transparent;
}

.lead-card__left {
  flex: 0 0 auto;
  margin-right: 1.5rem;
}

.lead-item-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lead-card__center {
  flex: 1 1 auto;
  min-width: 0;
}

.lead-title {
  font-size: 1.20rem; /* reduzido de 1.2rem */
  font-weight: 700;
  color: #0a192f;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  text-wrap: auto;
  gap: 0.5rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.status-badge {
  font-size: 0.80rem; 
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lead-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem; 
}

.lead-mapped-fields-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-pill-field {
  font-size: 0.72rem; /* reduzido de 0.8rem */
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.card-pill-demand {
  background: #e8f5e9 !important;
  color: #2e7d32 !important;
  border: 1px solid #c8e6c9;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.765rem; /* reduzido de 0.85rem */
  line-height: 1.4;
}

/* Mapped Fields Grid */
.lead-mapped-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.lead-card__right {
  flex: 0 0 auto;
  margin-left: 1.5rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: anchor-center;
  margin-top: 1rem;
}

/* Buy Button - Premium Style */
.btn-buy-lead-premium {
  background: #0a192f;
  /* Dark Navy */
  color: #ffd700;
  /* Gold */
  border: 1px solid #ffd700;
  padding: 1rem 2rem; /* Aumentado para não ficar "fino" */
  border-radius: 50px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  text-decoration: none;
  min-height: 50px; /* Garante altura mínima */
}

.btn-buy-content {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-buy-price {
  font-size: 0.99rem; /* reduzido de 1.1rem */
}

.btn-buy-text {
  text-transform: uppercase;
  font-size: 0.72rem; /* reduzido de 0.8rem */
  letter-spacing: 1px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  padding-left: 0.6rem;
  margin-left: 0.2rem;
}

.btn-buy-lead-premium:hover .btn-buy-text {
  border-left-color: rgba(10, 25, 47, 0.3);
}

/* ==========================================================================
   Exclusive Lead Styles - Cyberpunk Gold Edition
   ========================================================================== */

.lead-card-search.exclusive {
  position: relative;
  border: 2px solid rgba(255, 215, 0, 0.6);
  animation: exclusiveGlow 3s ease-in-out infinite alternate;
}

.lead-card-search.exclusive::before {
  content: 'EXCLUSIVO';
  position: absolute;
  top: 12px;
  right: -32px;
  background: linear-gradient(45deg, #E59F24, #FFD700);
  color: #3F3F3F;
  padding: 6px 36px;
  transform: rotate(45deg);
  font-weight: bold;
  font-size: 11px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(229, 159, 36, 0.5);
  letter-spacing: 0.5px;
}

@keyframes exclusiveGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.02);
    border-color: rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.02);
    border-color: rgba(255, 215, 0, 0.8);
  }
}

/* Lead com demanda - destaque visual */
.lead-card-search.has-demand {
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.lead-card-search.has-demand:hover {
  border-color: rgba(234, 179, 8, 0.6);
}

/* Responsividade para exclusive badge em mobile */
@media (max-width: 768px) {
  .lead-card-search.exclusive::before {
    top: 8px;
    right: -28px;
    padding: 4px 28px;
    font-size: 9px;
  }
}

.lead-title {
  padding: 1rem 1rem 1rem 0;
}

.btn-buy-lead-premium {
  max-width: 300px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.active-filters-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f8f9fa;  /* Fundo sutil cinza claro */
  border-radius: 8px;
  border-left: 3px solid #2196f3;  /* Barra lateral azul para ênfase leve */
  animation: fadeIn 0.3s ease-in;  /* Animação de entrada suave */
  max-width: 100%;
}

.active-filter-badge {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
}

.active-filter-badge .badge {
  transition: all 0.2s ease;  /* Transição suave para hover */
  box-shadow: 0 1px 3px rgba(33, 150, 243, 0.1);  /* Sombra sutil */
}

.active-filter-badge .badge:hover {
  transform: scale(1.02);  /* Leve zoom no hover */
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.15);
}

.active-filter-badge .btn-close {
  color: #2196f3;  /* Azul para consistência */
  font-size: 1rem;
  margin-left: 0.5rem;
  transition: color 0.2s ease;
}

.active-filter-badge .btn-close:hover {
  color: #1976d2;  /* Azul mais escuro no hover */
}

/* Responsivo: Em mobile, centraliza e full-width se necessário */
@media (max-width: 768px) {
  .active-filters-section {
    justify-content: center;
    padding: 1rem;
    border-left: none;  /* Remove barra em mobile para simplicidade */
    border: 1px solid #dee2e6;
  }
  
  .active-filter-badge .badge {
    flex-grow: 1;
    text-align: center;
    margin: 0;
  }
}
@media(max-width: 460px){
  .lead-mapped-fields-grid{
    grid-template-columns: 1fr 1fr;
  }
  .lead-card__right {
    margin-left: 0.5rem;
  }
}

.selected_niche{
  background-color: #0f172a;
  color: #fbbf24;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}
.selected_niche:empty {
  display: none;
}



