/* ==========================================================================
   PETZ DIRECTORY — Listing pages for Organizations, Service Providers, Members
   ========================================================================== */

/* --- Hero Section --- */
.petz-directory-hero {
  background: linear-gradient(
    135deg,
    var(--petz-bg-green-soft, #e8f5e9) 0%,
    var(--petz-bg-blue-soft, #e3f2fd) 100%
  );
  border-radius: 20px;
  padding: 48px 32px 40px;
  text-align: center;
  margin-bottom: 32px;
}

.petz-directory-hero-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--petz-text-primary, #263238);
  margin: 0 0 8px;
  line-height: 1.2;
}

.petz-directory-hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--petz-text-secondary, #546e7a);
  margin: 0 0 28px;
}

/* --- Search Bar --- */
.petz-directory-search {
  max-width: 540px;
  margin: 0 auto;
}

.petz-directory-search-inner {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 6px 6px 6px 16px;
  gap: 8px;
}

.petz-directory-search-inner i {
  color: var(--petz-text-muted, #90a4ae);
  font-size: 1rem;
  flex-shrink: 0;
}

.petz-directory-search-inner .form-control {
  border: none;
  box-shadow: none;
  font-size: 0.95rem;
  padding: 8px 4px;
  background: transparent;
  flex: 1;
  min-width: 0;
}

.petz-directory-search-inner .form-control:focus {
  outline: none;
  box-shadow: none;
}

.petz-directory-search-inner .btn {
  border-radius: 8px;
  padding: 8px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* --- Icon Box Tabs --- */
.petz-directory-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 8px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.petz-directory-tabs::-webkit-scrollbar {
  display: none;
}

.petz-directory-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 12px;
  min-width: 110px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--petz-text-secondary, #546e7a);
  text-decoration: none;
  border-radius: 16px;
  background: #fff;
  border: 2px solid #eef2f5;
  transition: all 0.25s ease;
  flex-shrink: 0;
  position: relative;
}

.petz-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f5f7fa;
  transition: all 0.25s ease;
  overflow: hidden;
}

.petz-tab-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.petz-tab-label {
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* Hover */
.petz-directory-tab:hover {
  text-decoration: none;
  color: var(--petz-text-primary, #263238);
  border-color: #d8dee4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.petz-directory-tab:hover .petz-tab-icon {
  background: #eef2f5;
}

.petz-directory-tab:hover .petz-tab-icon img {
  transform: scale(1.1);
}

/* Active (generic) */
.petz-directory-tab.active {
  color: var(--petz-primary, #4CAF50);
  border-color: var(--petz-primary, #4CAF50);
  background: #fff;
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.12);
}

.petz-directory-tab.active .petz-tab-icon {
  background: rgba(76, 175, 80, 0.08);
}

/* Per-type active accent — matches unified color palette */
.petz-directory-tab.tab-org.active {
  color: #0ca678;
  border-color: #0ca678;
  box-shadow: 0 4px 16px rgba(12, 166, 120, 0.12);
}
.petz-directory-tab.tab-org.active .petz-tab-icon {
  background: rgba(12, 166, 120, 0.08);
}

.petz-directory-tab.tab-service.active {
  color: #2196f3;
  border-color: #2196f3;
  box-shadow: 0 4px 16px rgba(33, 150, 243, 0.12);
}
.petz-directory-tab.tab-service.active .petz-tab-icon {
  background: rgba(33, 150, 243, 0.08);
}

.petz-directory-tab.tab-member.active {
  color: #5c6bc0;
  border-color: #5c6bc0;
  box-shadow: 0 4px 16px rgba(92, 107, 192, 0.12);
}
.petz-directory-tab.tab-member.active .petz-tab-icon {
  background: rgba(92, 107, 192, 0.08);
}

/* --- Results Bar --- */
.petz-directory-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
}

.petz-directory-results-count {
  font-weight: 600;
  color: var(--petz-text-secondary, #546e7a);
  font-size: 0.95rem;
}

.petz-directory-clear-search {
  color: var(--petz-text-muted, #90a4ae);
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.petz-directory-clear-search:hover {
  color: var(--petz-color-danger, #e53935);
  text-decoration: none;
}

/* --- Directory Grid --- */
.petz-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

/* --- Directory Card --- */
.petz-directory-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  position: relative;
}

.petz-directory-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.petz-directory-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.petz-directory-card-link:hover {
  text-decoration: none;
  color: inherit;
}

/* --- Accent Bar (top color strip per type) --- */
.petz-directory-card-accent {
  height: 5px;
  width: 100%;
  border-radius: 16px 16px 0 0;
}

.accent-org .petz-directory-card-accent {
  background: linear-gradient(90deg, #0ca678, #38d9a9);
}

.accent-service .petz-directory-card-accent {
  background: linear-gradient(90deg, #2196f3, #64b5f6);
}

.accent-member .petz-directory-card-accent {
  background: linear-gradient(90deg, #5c6bc0, #9fa8da);
}

/* --- Card Header --- */
.petz-directory-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 0;
}

.petz-directory-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.petz-directory-card-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f5f5f5;
  transition: border-color 0.2s;
}

.petz-directory-card:hover .petz-directory-card-avatar {
  border-color: var(--petz-bg-green-soft, #e8f5e9);
}

.petz-directory-verified-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.petz-directory-verified-badge svg {
  width: 20px;
  height: 20px;
}

.petz-directory-card-name-area {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.petz-directory-card-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--petz-text-primary, #263238);
  margin: 0 0 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Type Badges --- */
.profile-type-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.5;
}

.badge-org {
  background: #e6fcf5;
  color: #0ca678;
}

.badge-service {
  background: #e3f2fd;
  color: #2196f3;
}

.badge-member {
  background: #e8eaf6;
  color: #5c6bc0;
}

/* --- Appointment Badge --- */
.petz-directory-appt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #7b1fa2;
  background: #f3e5f5;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 4px;
  line-height: 1.5;
  white-space: nowrap;
}

.petz-directory-appt-badge i {
  font-size: 0.68rem;
}

/* --- Card Body --- */
.petz-directory-card-body {
  padding: 14px 20px 0;
  flex: 1;
}

.petz-directory-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--petz-text-secondary, #546e7a);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.petz-directory-card-meta i {
  font-size: 0.78rem;
  color: var(--petz-text-muted, #90a4ae);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.petz-directory-card-about {
  font-size: 0.84rem;
  color: var(--petz-text-muted, #78909c);
  line-height: 1.55;
  margin: 10px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Card Footer --- */
.petz-directory-card-footer {
  padding: 14px 20px 18px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.petz-directory-card-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.petz-directory-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--petz-text-muted, #90a4ae);
  font-weight: 600;
}

.petz-directory-stat i {
  font-size: 0.75rem;
}

.petz-directory-rating {
  color: var(--petz-text-primary, #263238);
}

.petz-directory-rating i {
  color: #F5A623;
  font-size: 0.8rem;
}

.petz-rating-count {
  color: var(--petz-text-muted, #90a4ae);
  font-weight: 500;
}

.petz-directory-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--petz-color-primary, #43a047);
  border: 2px solid var(--petz-color-primary, #43a047);
  border-radius: 10px;
  text-align: center;
  transition: all 0.25s ease;
}

.petz-directory-card-cta i {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.petz-directory-card:hover .petz-directory-card-cta {
  background: var(--petz-color-primary, #43a047);
  color: #fff;
}

.petz-directory-card:hover .petz-directory-card-cta i {
  transform: translateX(3px);
}

/* per type CTA — matches profile badge palette */
.accent-org .petz-directory-card-cta {
  color: #0ca678;
  border-color: #0ca678;
}

.accent-org:hover .petz-directory-card-cta {
  background: #0ca678;
  color: #fff;
}

.accent-service .petz-directory-card-cta {
  color: #2196f3;
  border-color: #2196f3;
}

.accent-service:hover .petz-directory-card-cta {
  background: #2196f3;
  color: #fff;
}

.accent-member .petz-directory-card-cta {
  color: #5c6bc0;
  border-color: #5c6bc0;
}

.accent-member:hover .petz-directory-card-cta {
  background: #5c6bc0;
  color: #fff;
}

/* --- Empty State --- */
.petz-directory-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--petz-text-muted, #90a4ae);
}

.petz-directory-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.petz-directory-empty p {
  font-size: 1.1rem;
  margin-bottom: 16px;
}
