/* =============================================================
   DEWAS LEGAL HUB — find-lawyers.css
   Search results (grid + list view); requires style.css first
   ============================================================= */

/* ── Breadcrumb (shared look with profile.css) ─────────────── */
.breadcrumb-nav {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-600);
}
.breadcrumb a { color: var(--gray-600); transition: color var(--ease); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; }

/* ── Page Head ──────────────────────────────────────────────── */
.page-head { padding: 24px 0 20px; }
.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.page-title { font-size: 28px; font-weight: 800; color: var(--text); margin-top: 4px; }
.results-count { font-size: 13.5px; color: var(--gray-600); margin-top: 6px; }

.view-sort-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.view-toggle {
  display: flex;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.view-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--white);
  transition: all var(--ease);
}
.view-btn:hover { color: var(--navy); }
.view-btn.active {
  background: var(--gold-light);
  color: var(--gold-hover);
  box-shadow: inset 0 0 0 1.5px var(--gold);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
}
.sort-box label { color: var(--gray-600); font-weight: 500; }
.sort-box select {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

/* ── Search / Filter Bar ────────────────────────────────────── */
.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.search-filter-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px;
}
.sfb-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 9px 13px;
  background: var(--white);
  transition: border-color var(--ease);
}
.sfb-field:focus-within { border-color: var(--navy); }
.sfb-field--grow { flex: 1; }
.sfb-field--loc { min-width: 150px; flex-shrink: 0; }
.sfb-field input, .sfb-field select {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  width: 100%;
}
.sfb-field input::placeholder { color: var(--gray-400); }
.sfb-field select { cursor: pointer; }
.sfb-submit { flex-shrink: 0; height: 42px; }

.clear-filters-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: #2563EB;
  white-space: nowrap;
  flex-shrink: 0;
}
.clear-filters-link:hover { text-decoration: underline; }
.clear-filters-link svg { transition: transform 0.4s ease; }
.clear-filters-link:hover svg { transform: rotate(-90deg); }

/* ── Results Layout ─────────────────────────────────────────── */
.results-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 24px;
  padding-bottom: 56px;
  align-items: start;
}

/* ── Filter Sidebar ─────────────────────────────────────────── */
.filter-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 20px;
  position: sticky;
  top: 84px;
}
.filter-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.filter-card-title { font-size: 15.5px; font-weight: 700; color: var(--text); }
.filter-clear-all { font-size: 12.5px; font-weight: 600; color: #2563EB; }
.filter-clear-all:hover { text-decoration: underline; }

.filter-group { padding: 16px 0; border-bottom: 1px solid var(--gray-200); }
.filter-group:first-of-type { padding-top: 10px; }
.filter-group:last-of-type { border-bottom: none; padding-bottom: 4px; }

.filter-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin-bottom: 12px;
}
.filter-group-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
}
.filter-group-chevron { color: var(--gray-600); transition: transform var(--ease); flex-shrink: 0; }
.filter-group.collapsed .filter-group-chevron { transform: rotate(-90deg); }
.filter-group.collapsed .filter-group-body { display: none; }

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 8px 11px;
  margin-bottom: 10px;
}
.filter-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  color: var(--text);
}
.filter-search input::placeholder { color: var(--gray-400); }

.filter-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
}
.filter-check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text);
}
.filter-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}
.filter-count { font-size: 12.5px; color: var(--gray-400); flex-shrink: 0; }

.filter-viewmore {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: #2563EB;
  margin-top: 8px;
}
.filter-viewmore:hover { text-decoration: underline; }

.filter-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn-apply { flex: 1.4; }
.btn-reset {
  flex: 1;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--text);
}
.btn-reset:hover { border-color: var(--navy); }

/* ── Result Card — Grid view ───────────────────────────────── */
.lawyer-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.result-card {
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  transition: box-shadow var(--ease), transform var(--ease);
}
.result-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.result-photo { position: relative; height: 190px; background: var(--gray-100); overflow: hidden; }
.result-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.result-card:hover .result-photo img { transform: scale(1.04); }

.status-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--white);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.status-chip--verified { color: #16A34A; }
.status-chip--available { color: #2563EB; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot--verified { background: #16A34A; }
.status-dot--available { background: #2563EB; }

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  box-shadow: var(--shadow-sm);
  transition: all var(--ease);
}
.fav-btn:hover { color: #EF4444; }
.fav-btn.is-saved { color: #EF4444; }
.fav-btn.is-saved svg { fill: #EF4444; }

.result-body { padding: 14px 16px 16px; }
.result-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.result-rating .star { color: #F59E0B; }
.result-rating .rcount { font-size: 12px; color: var(--gray-400); font-weight: 400; }

.result-name { font-size: 16.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.result-type { font-size: 13px; color: var(--gray-600); margin-bottom: 6px; }
.result-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--gray-600);
  margin-bottom: 3px;
}

.result-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.tag {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.tag--more { color: var(--gray-400); background: transparent; border-style: dashed; }

.card-actions { display: flex; gap: 6px; }
.card-actions .btn { flex: 1; padding: 8px 6px; font-size: 12px; gap: 4px; }
.btn-call { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); }
.btn-call:hover { background: var(--navy); color: var(--white); }
.btn-wa { background: transparent; border: 1.5px solid #25D366; color: #128C4A; }
.btn-wa:hover { background: #25D366; color: var(--white); }

/* ── Result Row — List view ────────────────────────────────── */
.lawyer-results-list { display: flex; flex-direction: column; gap: 16px; }

.list-row {
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr 220px 150px;
  gap: 22px;
  align-items: start;
  padding: 20px 52px 20px 20px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  transition: box-shadow var(--ease);
}
.list-row:hover { box-shadow: var(--shadow-md); }

.list-row-photo { position: relative; width: 140px; height: 150px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--gray-100); }
.list-row-photo img { width: 100%; height: 100%; object-fit: cover; }

.list-row-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.list-row-name { font-size: 17px; font-weight: 700; color: var(--text); }
.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ECFDF5;
  color: #16A34A;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.list-row-type { font-size: 13.5px; color: var(--gray-600); margin-bottom: 8px; }

.list-row-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.list-row-rating .star { color: #F59E0B; }
.list-row-rating .rcount { font-size: 12.5px; color: var(--gray-400); font-weight: 400; }

.list-row-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.list-row-line strong { color: var(--text); font-weight: 600; }
.line-sep { color: var(--gray-400); }

.list-row-areas-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.list-row-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.list-row-actions { display: flex; flex-direction: column; gap: 8px; width: 150px; flex-shrink: 0; }
.list-row-actions .btn { width: 100%; font-size: 13px; }

.list-row-fav {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: color var(--ease);
}
.list-row-fav:hover { color: #EF4444; }
.list-row-fav.is-saved { color: #EF4444; }
.list-row-fav.is-saved svg { fill: #EF4444; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.pagination { display: flex; align-items: center; gap: 6px; }
.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  transition: all var(--ease);
}
.page-btn:hover { border-color: var(--navy); }
.page-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { width: 36px; text-align: center; color: var(--gray-400); font-size: 13.5px; }
.pagination-count { font-size: 13px; color: var(--gray-600); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .lawyer-results-grid { grid-template-columns: repeat(2, 1fr); }
  .list-row { grid-template-columns: 120px 1fr; }
  .list-row-areas { grid-column: 1 / -1; }
  .list-row-actions { grid-column: 1 / -1; flex-direction: row; width: 100%; }
}

@media (max-width: 900px) {
  .results-layout { grid-template-columns: 1fr; }
  .filter-card { position: static; }
}

@media (max-width: 768px) {
  .page-head-row { flex-direction: column; align-items: flex-start; }
  .search-filter-bar { flex-direction: column; align-items: stretch; }
  .search-filter-box { flex-direction: column; align-items: stretch; }
  .sfb-submit { width: 100%; }
  .clear-filters-link { align-self: flex-start; }

  .lawyer-results-grid { grid-template-columns: 1fr; }

  .list-row { grid-template-columns: 1fr; padding: 16px; }
  .list-row-photo { width: 100%; height: 180px; }
  .list-row-fav { top: 16px; right: 16px; }

  .pagination-row { flex-direction: column; align-items: flex-start; }
  .pagination { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .view-sort-row { width: 100%; justify-content: space-between; }
}
