/* Find a Case — search + full case-detail overlay. Namespaced under .fc- to
   avoid clashing with the mirrored site's Tailwind build. */
:root {
  --fc-navy: #1b2a4e;
  --fc-navy-dark: #132039;
  --fc-red: #b31942;
  --fc-red-dark: #8f1235;
  --fc-grey: #e9ebf0;
  --fc-line: #e2e6ee;
  --fc-text: #1f2733;
  --fc-muted: #5b6472;
  --fc-serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
}

.fc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 33, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px 16px;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease;
}
.fc-overlay.fc-open { opacity: 1; visibility: visible; }

.fc-modal {
  background: #fff;
  width: 100%;
  max-width: 620px;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 0.18s ease;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fc-text);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.fc-overlay.fc-open .fc-modal { transform: translateY(0); }

.fc-head {
  background: var(--fc-navy);
  color: #fff;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}
.fc-head h2 { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.fc-close {
  background: transparent; border: 0; color: #fff; font-size: 1.6rem;
  line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 6px;
}
.fc-close:hover { background: rgba(255, 255, 255, 0.15); }

.fc-body { padding: 20px; overflow-y: auto; }

/* ---- search form ---- */
.fc-form { display: flex; gap: 8px; }
.fc-input {
  flex: 1; min-width: 0; border: 1px solid #b7becb; border-radius: 6px;
  padding: 11px 12px; font-size: 1rem; color: var(--fc-text);
}
.fc-input:focus { outline: 2px solid var(--fc-navy); outline-offset: 1px; border-color: var(--fc-navy); }
.fc-submit {
  background: var(--fc-red); color: #fff; border: 0; border-radius: 6px;
  padding: 0 20px; font-size: 1rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.fc-submit:hover { background: var(--fc-red-dark); }
.fc-submit:disabled { opacity: 0.6; cursor: default; }
.fc-hint { margin: 10px 2px 0; font-size: 0.82rem; color: var(--fc-muted); }

.fc-results { margin-top: 16px; }
.fc-status { font-size: 0.95rem; color: var(--fc-muted); padding: 6px 0; }
.fc-status.fc-error { color: var(--fc-red-dark); font-weight: 600; }
.fc-count { font-size: 0.85rem; color: var(--fc-muted); margin: 0 0 10px; }

/* ---- multi-result list ---- */
.fc-result {
  display: block; width: 100%; text-align: left; background: #fbfcfe;
  border: 1px solid var(--fc-line); border-left: 4px solid var(--fc-navy);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer;
}
.fc-result:hover { background: #f2f5fb; }
.fc-result-title { display: block; font-weight: 700; color: var(--fc-navy); }
.fc-result-meta { display: block; font-size: 0.82rem; color: var(--fc-muted); margin-top: 2px; letter-spacing: 0.02em; }

/* ---- full case detail ---- */
.fc-detail { }
.fc-section { padding: 4px 0 14px; border-bottom: 1px solid var(--fc-line); margin-bottom: 16px; }
.fc-section:last-child { border-bottom: 0; }
.fc-section h3 {
  font-family: var(--fc-serif); font-size: 1.35rem; font-weight: 700;
  color: #111827; margin: 0 0 14px;
}

.fc-summary { display: flex; flex-direction: column; gap: 12px; }
.fc-sfield { }
.fc-slabel {
  font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fc-muted); font-weight: 600; margin-bottom: 2px;
}
.fc-svalue { font-size: 0.98rem; color: var(--fc-text); }

.fc-desc { margin: 16px 0 0; font-size: 0.95rem; line-height: 1.5; color: #374151; }

.fc-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 2px 10px; border-radius: 4px; vertical-align: middle;
}
.fc-badge-active  { background: #e2f3e7; color: #1a7a3c; }
.fc-badge-pending { background: #fdecca; color: #8a5a00; }
.fc-badge-other   { background: var(--fc-grey); color: #465067; }

.fc-party { margin: 0 0 6px; font-size: 0.95rem; }
.fc-charge { margin: 0 0 8px; font-size: 0.95rem; line-height: 1.45; }
.fc-charge-detail { color: var(--fc-muted); }

.fc-event { display: grid; grid-template-columns: 110px 1fr; gap: 12px; margin-bottom: 12px; font-size: 0.93rem; }
.fc-event:last-child { margin-bottom: 0; }
.fc-edate { color: var(--fc-muted); }
.fc-ebody strong { color: var(--fc-text); }
.fc-ebody > div { color: #374151; margin-top: 2px; }

.fc-doc { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.93rem; }
.fc-doc svg { flex: 0 0 auto; color: var(--fc-navy); }
.fc-doc-date { color: var(--fc-muted); }

.fc-nextevent {
  border: 1px solid var(--fc-line); border-radius: 10px; padding: 16px 18px;
  margin: 4px 0 18px; background: #fbfcfe;
}
.fc-nextevent h3 { font-family: var(--fc-serif); font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; color: #111827; }
.fc-ne-date { margin: 0; font-size: 0.98rem; }
.fc-ne-note { margin: 4px 0 0; font-size: 0.88rem; color: var(--fc-muted); }

.fc-back {
  background: transparent; border: 0; color: var(--fc-navy); font-weight: 600;
  font-size: 0.95rem; cursor: pointer; padding: 6px 0;
}
.fc-back:hover { text-decoration: underline; }

.fc-spinner {
  display: inline-block; width: 16px; height: 16px; border: 2px solid #c7ccd8;
  border-top-color: var(--fc-navy); border-radius: 50%;
  animation: fc-spin 0.7s linear infinite; vertical-align: -3px; margin-right: 8px;
}
@keyframes fc-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .fc-form { flex-direction: column; }
  .fc-submit { padding: 11px 20px; }
  .fc-event { grid-template-columns: 1fr; gap: 2px; }
  .fc-edate { font-weight: 600; }
}

/* ============ full-page mode (find-a-case/index.html) ============ */
.fc-page {
  max-width: 860px; margin: 0 auto; padding: 26px 16px 64px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fc-text);
}
.fc-crumbs { font-size: 0.8rem; color: var(--fc-muted); margin-bottom: 12px; }
.fc-crumbs a { color: var(--fc-navy); text-decoration: none; }
.fc-crumbs a:hover { text-decoration: underline; }
.fc-crumbs span { margin: 0 6px; color: #9aa2b1; }
.fc-page-title { font-family: var(--fc-serif); font-size: 2.1rem; margin: 2px 0 6px; color: #111827; }
.fc-page-sub { color: var(--fc-muted); margin: 0 0 22px; font-size: 1rem; }

.fc-card {
  border: 1px solid var(--fc-line); border-radius: 12px; background: #fff;
  padding: 24px 26px; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}
.fc-searchcard { padding: 22px 24px; }

.fc-case-head { border-bottom: 1px solid var(--fc-line); padding-bottom: 14px; margin-bottom: 18px; }
.fc-case-title { font-family: var(--fc-serif); font-size: 1.5rem; font-weight: 700; color: #111827; margin: 0 0 4px; line-height: 1.25; }
.fc-case-sub { color: var(--fc-muted); font-size: 0.9rem; margin: 0; }

/* In page mode the results/detail sit on the page, not in a scroll box. */
.fc-page .fc-results { margin-top: 18px; }
.fc-page .fc-back { margin-top: 18px; font-size: 1rem; }
.fc-page .fc-nextevent { margin-top: 18px; }

@media (max-width: 560px) {
  .fc-page-title { font-size: 1.6rem; }
  .fc-card { padding: 18px 16px; }
}
