/* Grupo d: CSS propio de las pantallas de este grupo. Usar solo tokens de styles.css. */

/* ---- legal_cases (listado) ---- */
.legal-cases-estado { flex: 0 1 160px; }
.legal-cases-table .legal-cases-caratula { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legal-cases-table td:last-child { text-align: right; }

/* ---- legal_case_detail (ficha de causa) ---- */
.page-header-main h1 { overflow-wrap: anywhere; }
.legal-obs { max-width: 70ch; margin: 0; color: var(--text-3); line-height: 1.6; white-space: pre-line; }
.section-title h2 { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--fs-h3); }
.section-title .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.section > .table-responsive { margin-top: 0; }
.section > .collapsible-panel { margin: 0 0 var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-12); }
.section .btn.is-open { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-ink); }
.legal-w-sm { width: 100px; }
.legal-w-md { width: 130px; }
.legal-w-lg { width: 150px; }
.legal-w-xl { width: 220px; }
.legal-doc-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section td.nowrap { display: table-cell; }
.section td.nowrap > * { vertical-align: middle; }

/* ---- legal_case_form ---- */
.legal-form { max-width: 880px; }

/* ---- listado_igj ---- */
.igj-search { margin: 0 0 var(--space-8); }
.igj-ids { max-width: 600px; margin: 0 0 var(--space-4); }
.igj-ids textarea { width: 100%; font-family: var(--font-mono); }
.igj-search .filter-bar .form-group { margin: 0; }
.igj-search .filter-bar input { max-width: none; width: 180px; }
.igj-col-check { width: 40px; }
/* Header de tabla ordenable (button dentro del th, submit del form de busqueda) */
.th-sort { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 32px; margin: 0; padding: 0; background: none; border: 0; border-radius: var(--radius-8); font: inherit; font-weight: var(--fw-medium); color: inherit; white-space: nowrap; cursor: pointer; transition: color var(--duration-quick) var(--ease-smooth-out); }
.th-sort:hover { color: var(--navy); }
.th-sort:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.th-sort-mark { font-size: 10px; line-height: 1; color: var(--text-2); }
.th-sort.is-sorted { color: var(--navy); }
.th-sort.is-sorted .th-sort-mark { color: var(--primary); }
/* Primer renglon de cada contrato: divisor mas marcado */
tr.igj-row-start > td { border-top: 1px solid var(--border-strong); }
.section-title .result-count { margin: 0; font-weight: var(--fw-regular); }
@media (max-width: 760px) {
  .igj-search .filter-bar input { width: 100%; flex-basis: 100%; }
  .legal-cases-estado { flex-basis: 100%; max-width: none; }
}
