/* ── Foreclosure Decoded — Courthouse Finder ────────────────────────────────
   Page-specific styles. All global vars and resets live in styles.css.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Action bar ───────────────────────────────────────────────────────────── */
.learn-action-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 80;
}
.learn-action-bar__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  gap: 1rem;
}
@media (max-width: 1024px) { .learn-action-bar__inner { padding: 0 24px; } }
@media (max-width: 640px)  { .learn-action-bar__inner { padding: 0 16px; } }

.learn-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-shrink: 0;
}
.learn-meta__title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}
.learn-meta__count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
@media (max-width: 480px) { .learn-meta__title { display: none; } }

/* ── Search ───────────────────────────────────────────────────────────────── */
.learn-search-wrap {
  position: relative;
  flex: 1;
  max-width: 340px;
}
.learn-search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  stroke: #9ca3af;
  pointer-events: none;
}
.learn-search {
  width: 100%;
  padding: 0.38rem 0.75rem 0.38rem 1.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--navy);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.learn-search:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,122,114,.12); }
.btn-reset-filter {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 10px;
  height: 34px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.12s, color 0.12s;
}
.btn-reset-filter:hover { border-color: var(--navy); color: var(--navy); }
.btn-reset-filter.hidden { display: none; }

/* ── Page layout ──────────────────────────────────────────────────────────── */
.learn-page {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 32px 4rem;
}
@media (max-width: 1024px) { .learn-page { padding: 1.25rem 24px 3rem; } }
@media (max-width: 640px)  { .learn-page { padding: 1rem 16px 2.5rem; } }

.learn-columns {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 1024px) { .learn-columns { grid-template-columns: 1fr 240px; gap: 1.5rem; } }
@media (max-width: 800px)  { .learn-columns { grid-template-columns: 1fr; } }

.learn-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.learn-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 68px;
}
@media (max-width: 800px) { .learn-sidebar { position: static; } }

/* ── County card ──────────────────────────────────────────────────────────── */
.courthouse-entry-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--navy);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.courthouse-entry-card:hover {
  border-left-color: var(--teal);
  box-shadow: 0 3px 12px rgba(30,43,74,.1);
}

.courthouse-details-pane {
  padding: 14px 18px;
  min-width: 0;
}

/* ── Court identity ───────────────────────────────────────────────────────── */
.court-identity {
  margin-bottom: 10px;
}
.court-county-name {
  display: block;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.court-full-name {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Data blocks ──────────────────────────────────────────────────────────── */
.court-data-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 8px;
}
.data-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.data-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
}
.data-value {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.4;
}
.data-value a { color: var(--navy); }
.data-value a:hover { text-decoration: underline; }

/* ── Filing info ──────────────────────────────────────────────────────────── */
.court-filing-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* ── Website link ─────────────────────────────────────────────────────────── */
.court-web-anchor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  transition: color 0.12s;
}
.court-web-anchor:hover { color: var(--navy); }
.court-web-anchor svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

/* ── Loading state ────────────────────────────────────────────────────────── */
.ch-loading {
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.search-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 2rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  gap: 0.75rem;
}
.search-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-empty-icon svg { width: 20px; height: 20px; stroke: var(--text-muted); }
.search-empty-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.search-empty-text strong { color: var(--text); }
.search-empty-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 14px;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.12s;
}
.search-empty-link:hover { border-color: var(--navy); }

/* ── Sidebar coverage badge ───────────────────────────────────────────────── */
.coverage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border-bottom: 1px solid var(--surface-alt);
  font-size: 0.78rem;
  color: var(--text);
}
.coverage-row:last-child { border-bottom: none; }
.coverage-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}
.coverage-badge.auto {
  background: rgba(31,122,114,.1);
  color: #145f58;
  border: 1px solid rgba(31,122,114,.22);
}
.coverage-badge.manual {
  background: rgba(184,134,11,.1);
  color: #7a6008;
  border: 1px solid rgba(184,134,11,.25);
}

/* ── Mobile card adjustments ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .courthouse-details-pane { padding: 12px 14px; }
  .court-county-name { font-size: 0.85rem; }
}
