/* =====================================================
   Influencers PT — Filtros Archive
   Adiciona em: child-theme/pessoa-filters.css
   E enqueue no functions.php (ver instruções)
   ===================================================== */

/* ---------- Reset / Base ---------- */
.ip-archive-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 60px;
  font-family: inherit;
}

/* ---------- Hero ---------- */
.ip-hero {
  text-align: center;
  padding: 52px 20px 40px;
}
.ip-hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -1px;
  color: var(--ip-text, #111);
}
.ip-hero__sub {
  font-size: 1.05rem;
  color: var(--ip-muted, #777);
  margin: 0 0 28px;
}

/* Search bar */
.ip-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 50px;
  padding: 10px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: border-color .2s, box-shadow .2s;
}
.ip-search-bar:focus-within {
  border-color: #111;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.ip-search-bar svg {
  width: 18px; height: 18px;
  color: #aaa;
  flex-shrink: 0;
}
.ip-search-bar input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  width: 100%;
  color: #111;
}
.ip-search-bar input::placeholder { color: #bbb; }

/* ---------- Filters Bar ---------- */
.ip-filters-bar {
  background: #fff;
  border: 1.5px solid #ebebeb;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.05);
}
.ip-filters-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}
.ip-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 150px;
  min-width: 130px;
}
.ip-filter-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
}

/* Select */
.ip-select-wrap { position: relative; }
.ip-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: .75rem;
  color: #aaa;
  pointer-events: none;
}
.ip-select {
  width: 100%;
  appearance: none;
  background: #f7f7f7;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  padding: 9px 32px 9px 12px;
  font-size: .88rem;
  color: #222;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.ip-select:focus {
  outline: none;
  border-color: #111;
  background: #fff;
}

/* Range inputs */
.ip-range-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ip-range-input {
  width: 60px;
  background: #f7f7f7;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  padding: 9px 8px;
  font-size: .88rem;
  color: #222;
  text-align: center;
  transition: border-color .2s;
}
.ip-range-input:focus {
  outline: none;
  border-color: #111;
  background: #fff;
}
.ip-range-sep { color: #bbb; font-weight: 600; }

/* Reset button */
.ip-btn-reset {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: .84rem;
  color: #888;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  align-self: flex-end;
}
.ip-btn-reset svg { width: 15px; height: 15px; }
.ip-btn-reset:hover {
  border-color: #111;
  color: #111;
  background: #f5f5f5;
}

/* ---------- Results meta ---------- */
.ip-results-meta {
  font-size: .85rem;
  color: #aaa;
  margin-bottom: 18px;
  padding-left: 2px;
}
#ip-count-label strong { color: #111; }

/* ---------- Grid ---------- */
.ip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

/* ---------- Card ---------- */
.ip-card {
  background: #fff;
  border: 1.5px solid #ebebeb;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
  cursor: pointer;
  position: relative;
}
.ip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.1);
  border-color: #ccc;
}
.ip-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Thumbnail */
.ip-card__thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #f0f0f0;
}
.ip-card__thumb-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ccc;
}

/* Card body */
.ip-card__body {
  padding: 14px 16px 16px;
}
.ip-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ip-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.ip-card__tag {
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: #f3f3f3;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ip-card__tag--prof { background: #f0f4ff; color: #3b5bdb; }
.ip-card__tag--signo { background: #fff4e6; color: #e67700; }
.ip-card__tag--pais { background: #ebfbee; color: #2f9e44; }

/* Stats row */
.ip-card__stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ip-card__stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: #666;
  font-weight: 500;
}
.ip-card__stat svg {
  width: 13px; height: 13px;
  flex-shrink: 0;
}
.ip-card__stat--yt { color: #c00; }
.ip-card__stat--age { color: #555; }
.ip-card__stat--city { color: #555; }

/* Subs badge */
.ip-card__yt-badge {
  font-weight: 700;
  color: #c00;
}

/* ---------- Loading ---------- */
.ip-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #aaa;
}
.ip-spinner {
  width: 36px; height: 36px;
  border: 3px solid #eee;
  border-top-color: #111;
  border-radius: 50%;
  animation: ip-spin .7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes ip-spin { to { transform: rotate(360deg); } }

/* ---------- No results ---------- */
.ip-no-results {
  text-align: center;
  padding: 80px 20px;
  color: #aaa;
}
.ip-no-results svg {
  width: 52px; height: 52px;
  margin-bottom: 16px;
  opacity: .4;
}
.ip-no-results p { font-size: 1rem; margin-bottom: 20px; }

.ip-btn-primary {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.ip-btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

/* ---------- Pagination ---------- */
.ip-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.ip-page-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  font-size: .88rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all .18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ip-page-btn:hover { border-color: #111; color: #111; }
.ip-page-btn.active {
  background: #111;
  border-color: #111;
  color: #fff;
}
.ip-page-btn.prev-next {
  width: auto;
  padding: 0 14px;
  border-radius: 20px;
}

/* ---------- Skeleton animation ---------- */
.ip-card--skeleton .ip-card__thumb {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: ip-shimmer 1.4s infinite;
}
.ip-card--skeleton .ip-card__name,
.ip-card--skeleton .ip-card__tag,
.ip-card--skeleton .ip-card__stat {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: ip-shimmer 1.4s infinite;
  color: transparent;
  border-radius: 6px;
}
@keyframes ip-shimmer {
  to { background-position: -200% 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .ip-filters-inner { gap: 12px; }
  .ip-filter-group { flex: 1 1 calc(50% - 12px); min-width: 120px; }
  .ip-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
}
@media (max-width: 480px) {
  .ip-filter-group { flex: 1 1 100%; }
  .ip-hero { padding: 30px 16px 24px; }
}

/* ---------- Dark mode (optional) ---------- */
@media (prefers-color-scheme: dark) {
  .ip-filters-bar,
  .ip-card { background: #1a1a1a; border-color: #2a2a2a; }
  .ip-hero__title { color: #f0f0f0; }
  .ip-select, .ip-range-input { background: #222; border-color: #333; color: #eee; }
  .ip-card__name { color: #f0f0f0; }
}
