/* Los componentes conservan su ancho y las referencias largas pueden ocupar varias líneas. */
:is(.main, dialog, .login-panel) :is(.button, .link-more, .badge) {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
:is(.main, dialog, .login-panel) :is(input, textarea, select, fieldset) {
  min-inline-size: 0;
  max-inline-size: 100%;
}
/* WebKit puede proyectar el texto de un selector nativo fuera de su caja. */
.filter-bar .filter-select {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow: clip;
}
.filter-bar .filter-select > svg { flex: none; }
.filter-bar .filter-select > select {
  flex: 1 1 auto;
  max-inline-size: 210px;
  text-overflow: ellipsis;
}
@media (max-width: 740px) {
  .matter-catalogue-filters > .filter-select { flex-basis: 100%; }
  .matter-catalogue-filters > .filter-select > select {
    flex-basis: 0;
    max-inline-size: 100%;
  }
  .filter-bar .filter-select > select,
  :is(.matter-catalogue-filters, .dossier-ga-catalogue-filters) .searchbox input { font-size: 16px; }
}
dialog, .login-panel { overflow-wrap: anywhere; }
.dialog-heading > :is(h1, h2, h3) { min-inline-size: 0; overflow-wrap: anywhere; }
:is(.main, dialog) pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.utility { max-inline-size: 100%; }
.main .breadcrumb, .main .list-footer, .main .pagination { flex-wrap: wrap; }
.table-scroll > table { min-inline-size: 0; }
.table-scroll :is(th, td) { white-space: normal; overflow-wrap: anywhere; }

.document-origin-list > li { align-items: start; }
.document-origin-path { line-height: 1.45; overflow-wrap: anywhere; }
.document-origin-details { margin-top: 7px; }
.document-origin-details summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: .88rem; }
.document-origin-list :is(.pdf-actions, .button.small) { margin-top: 6px; }
.document-origin-file { flex-wrap: wrap; }
.document-origin-file > div { flex: 1 1 12rem; }

.movement-operational, .movement-reply-project {
  min-inline-size: 0;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper, #fff);
}
.movement-operational summary small { margin-inline-start: .35rem; }
.movement-reply-project .study-form { margin-block-start: .6rem; }
.movement-reply-project textarea { inline-size: 100%; }
.movement-transcript:not(:has(.movement-turn)) { min-height: 0; }
@media (max-width: 740px) {
  .movement-conversation :is(.movement-input textarea, .movement-reply-project input[type="text"], .movement-reply-project textarea) {
    font-size: 16px;
  }
}

/* En contenedores estrechos, los resultados conservan sus datos y etiquetas por registro. */
.table-scroll:has(> table[data-stacked-table]) { container-type: inline-size; }
@container (max-width: 42rem) {
  .table-scroll > table[data-stacked-table] { display: block; width: 100%; table-layout: auto; }
  [data-stacked-table] thead tr { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
  [data-stacked-table] thead th { padding: 5px 7px; border-radius: 6px; }
  [data-stacked-table] thead th:not(:has(:is(a, button, input, select))) {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%);
  }
  [data-stacked-table] tbody { display: grid; gap: 6px; width: 100%; }
  [data-stacked-table] tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px 8px;
  }
  [data-stacked-table] tbody :is(td, th) {
    min-width: 0;
    width: auto;
    min-height: 0;
    padding: 4px;
    border: 0;
    white-space: normal;
  }
  [data-stacked-table] tbody :is(:first-child, [colspan]):is(td, th) { grid-column: 1 / -1; }
  [data-stacked-table] [data-column-label]:not([data-column-label=""])::before {
    display: block;
    margin-bottom: 2px;
    content: attr(data-column-label);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 560;
  }
}
