/* ==========================================================================
   Avezz Advanced Search Page (css/pages/search.css)
   Apple-minimalist filters, all-categories rail, universal card grid & pagination
   ========================================================================== */

.srch-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.srch-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.srch-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 3px;
  color: var(--text);
}

.srch-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Search Bar & Filters Card */
.srch-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.srch-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.srch-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.srch-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}

.srch-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  min-width: 0;
}

/* Content Type Pills */
.srch-type-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.srch-type-bar::-webkit-scrollbar { display: none; }

.srch-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.srch-type-pill:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.srch-type-pill.is-active {
  background: var(--pill-active-bg, #1c1f24);
  color: var(--pill-active-text, #ffffff);
  border-color: transparent;
}

.srch-pill-cnt {
  font-size: 11px;
  opacity: 0.78;
}

/* Advanced Filters Grid */
.srch-filters-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.srch-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 138px;
}

.srch-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.srch-select,
.srch-filter-input {
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
}

.srch-select:focus,
.srch-filter-input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.srch-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

/* All Categories Section */
.srch-cats-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.srch-cats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.srch-cats-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.srch-cat-filter {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  outline: none;
  width: 180px;
}

.srch-cat-filter:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.srch-cats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 118px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.srch-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.srch-cat-chip:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.srch-cat-chip.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.srch-cat-cnt {
  font-size: 10.5px;
  opacity: 0.72;
}

/* Empty State */
.srch-empty {
  text-align: center;
  padding: 48px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.srch-empty h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.srch-empty p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Pagination */
.srch-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 26px;
}

.srch-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.srch-page-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.srch-page-btn.is-active {
  background: var(--pill-active-bg, #1c1f24);
  color: var(--pill-active-text, #ffffff);
  border-color: transparent;
}

.srch-page-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.srch-page-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .srch-bar-row { flex-direction: column; align-items: stretch; }
  .srch-filter-field { flex: 1 1 45%; min-width: 120px; }
  .srch-cat-filter { width: 100%; }
}
