/* ==============================================
   PetFi Profile & Utility Styles
   Foundation/rescuer profiles, social buttons,
   placeholders, and search & filter components
   ============================================== */

/* ==============================================
   FOUNDATION/RESCUER PROFILE
   ============================================== */

.profile-banner {
  position: relative;
  padding: 48px 24px 80px;
  background: var(--gradient-purple);
  overflow: hidden;
}

.profile-banner__paw {
  position: absolute;
  right: -20px;
  bottom: -20px;
  opacity: 0.1;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  border: 4px solid white;
  overflow: hidden;
  margin: -50px auto 0;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-200);
}

.profile-stat {
  text-align: center;
}

.profile-stat__value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--gray-900);
}

.profile-stat__label {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
}

.profile-stat__divider {
  width: 1px;
  background: var(--gray-200);
}

/* ==============================================
   SOCIAL BUTTONS
   ============================================== */

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.social-btn--instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn--facebook {
  background: #1877F2;
}

.social-btn--website {
  background: var(--gray-700);
}

/* ==============================================
   PLACEHOLDERS
   ============================================== */

.placeholder {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder--square {
  aspect-ratio: 1;
}

.placeholder--wide {
  aspect-ratio: 16/9;
}

/* ==============================================
   SEARCH & FILTERS
   ============================================== */

/* Mobile scroll strip (hide scrollbar) */
.mobile-scroll-strip {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mobile-scroll-strip::-webkit-scrollbar {
  display: none;
}

/* Mobile: compact chips */
@media (max-width: 767.98px) {
  .filter-chip {
    padding: 6px 12px !important;
    font-size: 13px !important;
    gap: 5px !important;
  }

  .filter-count {
    min-width: 17px;
    height: 17px;
    font-size: 10px;
    padding: 0 4px;
  }

  .filter-chip .text-base {
    font-size: 15px !important;
  }
}

/* Mobile filters toggle */
.mobile-filters-toggle:hover {
  background: #E5E7EB !important;
}

.mobile-filters-toggle--active {
  background: var(--petfi-purple-50) !important;
  color: var(--petfi-purple-600) !important;
}

.filter-chip {
  cursor: pointer;
  user-select: none;
  border: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  letter-spacing: 0.01em;
}

.filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(150, 56, 235, 0.12);
  background: var(--petfi-purple-50) !important;
  color: var(--petfi-purple-600) !important;
}

.filter-chip:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 100ms;
}

.filter-chip--active {
  background: linear-gradient(135deg, #9638EB 0%, #7C3AED 100%) !important;
  color: white !important;
  box-shadow: 0 3px 12px rgba(150, 56, 235, 0.35);
}

.filter-chip--active:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(150, 56, 235, 0.4);
}

.filter-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(150, 56, 235, 0.25);
}

/* Clear filters button */
.clear-filters-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(150, 56, 235, 0.35);
  opacity: 0.95;
}

.clear-filters-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Filter count badge inside chips */
.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.07);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-left: 2px;
  color: inherit;
}

.filter-chip--active .filter-count {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Active filter summary bar */
#active-filters-summary {
  animation: slideDown 200ms ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--petfi-purple-50);
  border: none;
  color: var(--petfi-purple-700);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}

.active-filter-tag:hover {
  background: var(--petfi-purple-100);
  color: var(--petfi-purple-800);
}

.tag-close {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.6;
}

.active-filter-tag:hover .tag-close {
  opacity: 1;
}

.active-filter-clear-all {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: none;
  border: 1px dashed var(--gray-300);
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}

.active-filter-clear-all:hover {
  border-color: var(--petfi-purple-400);
  color: var(--petfi-purple-600);
  background: var(--petfi-purple-50);
}

/* Hide match badges when filters are active (filtering ≠ matching) */
#pets-grid.filtering .match-badge,
#pets-grid.filtering .match-reason {
  display: none !important;
}

/* Hidden pet cards during filtering */
.pet-card-container[style*="display: none"] {
  display: none !important;
}

/* No results message */
#no-search-results {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
