/* Shared catalog tables and controls for laws and regulations. */
body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) :is(#mley-home-laws, #mley-home-regulations) {
  margin-top: 1.25rem;
  border: 1px solid var(--result-border);
  border-radius: 24px;
  background: var(--bg-surface);
  box-shadow: 0 4px 16px rgba(22, 56, 62, .04);
}

:is(#mley-home-laws, #mley-home-regulations) > .card-body { padding: clamp(1.25rem, 3vw, 2.25rem); }
body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) :is(#mley-home-laws, #mley-home-regulations):focus-visible { outline: 2px solid var(--result-accent); outline-offset: 3px; }
body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) :is(#mley-home-catalog-heading, #mley-home-regulations-heading) { margin: 0 0 1.25rem; font-size: 1.45rem; }

:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-toolbar { gap: 1rem; margin-bottom: 1.25rem; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-title { color: var(--result-ink); font: 600 .85rem/1.5 var(--result-font); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-summary { margin-top: .35rem; color: var(--result-muted); font-size: .8rem; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-input-shell { min-height: 50px; border-color: var(--result-border); border-radius: 12px; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-input-shell i { color: var(--result-muted); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-input-shell .form-control { color: var(--result-ink); font: .95rem/1.5 var(--result-font); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-input-shell .form-control::placeholder { color: var(--result-muted); opacity: 1; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-input-shell:focus-within { outline-color: var(--result-accent); }

:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-form .btn,
:is(#mley-home-laws, #mley-home-regulations) .mley-home-pagination .page-link {
  min-height: 44px;
  padding: .6rem .9rem;
  border: 1px solid var(--result-border) !important;
  border-radius: 10px !important;
  background: var(--bg-surface) !important;
  color: var(--result-accent) !important;
  font: 600 .8rem/1.5 var(--result-font);
  box-shadow: none;
}
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-form button[type="submit"],
:is(#mley-home-laws, #mley-home-regulations) .mley-home-pagination .active .page-link {
  border-color: var(--result-accent) !important;
  background: var(--result-accent) !important;
  color: var(--bg-surface) !important;
}
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-form button[type="submit"] { min-height: 50px; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-pagination .disabled .page-link { color: var(--result-muted) !important; opacity: .6; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-pagination-summary { color: var(--result-muted); font: .8rem/1.6 var(--result-font); }

:is(#mley-home-laws, #mley-home-regulations) :is(#mley-home-laws-table, #mley-home-regulations-table) thead th { padding-bottom: .8rem; color: var(--result-muted); font: 600 .65rem/1.6 var(--result-font); letter-spacing: .07em; }
:is(#mley-home-laws, #mley-home-regulations) :is(#mley-home-laws-table, #mley-home-regulations-table) tbody td { padding-block: 1rem; border-color: var(--result-border); color: var(--result-ink); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-link { line-height: 1.55; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-title { font: 600 .95rem/1.55 var(--result-font); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-link:hover { color: var(--result-accent); text-decoration: underline; text-underline-offset: .2em; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-key { color: var(--result-muted); font: 500 .73rem/1.6 var(--result-font); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-metadata { margin-top: .4rem; color: var(--result-muted); font: .75rem/1.6 var(--result-font); }
:is(#mley-home-laws, #mley-home-regulations) :is(.mley-home-law-rank-chip, .mley-home-law-views-pill) { color: var(--result-muted); font: .75rem/1.6 var(--result-font); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-regulation-tag { border: 1px solid var(--result-border); border-radius: 8px; background: var(--result-tint); color: var(--result-accent); font: 500 .75rem/1.5 var(--result-font); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-action { width: 40px; height: 44px; border: 1px solid var(--result-border); border-radius: 10px !important; background: var(--bg-surface); color: var(--result-accent); box-shadow: none; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-action:hover { background: var(--result-tint); border-color: var(--result-accent); }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-graph-action { width: auto; flex-shrink: 0; gap: .5rem; padding: .6rem .75rem !important; background: var(--result-tint); color: var(--result-accent); font: 600 .78rem/1.4 var(--result-font); white-space: nowrap; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-law-graph-action:focus-visible { outline: 2px solid var(--result-accent); outline-offset: 3px; }
:is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-empty { border-color: var(--result-border); background: var(--result-tint); color: var(--result-muted); }
:is(#mley-home-laws, #mley-home-regulations) .mley-inline-brand { color: var(--result-muted) !important; }

@media (max-width: 767.98px) {
  :is(#mley-home-laws, #mley-home-regulations) :is(#mley-home-laws-table, #mley-home-regulations-table) tbody tr { padding: 1rem 0; grid-template-areas: "name name" "views actions"; border-color: var(--result-border); gap: .65rem; }
  #mley-home-regulations #mley-home-regulations-table tbody tr { grid-template-areas: "name name" "parent actions"; }
  :is(#mley-home-laws, #mley-home-regulations) :is(#mley-home-laws-table, #mley-home-regulations-table) tbody td { padding: 0; border: 0; }
  :is(#mley-home-laws, #mley-home-regulations) :is(#mley-home-laws-table, #mley-home-regulations-table) .mley-home-regulation-parent { grid-area: parent; }
  :is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-form { width: 100%; }
}

@media (max-width: 575px) {
  #mley-home-laws #mley-home-laws-table tbody tr { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "views" "actions"; }
  #mley-home-regulations #mley-home-regulations-table tbody tr { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "parent" "actions"; }
  :is(#mley-home-laws, #mley-home-regulations) .mley-home-law-actions-group { justify-content: flex-start; flex-wrap: wrap; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) :is(#mley-home-laws, #mley-home-regulations) { border-radius: 20px; }
  :is(#mley-home-laws, #mley-home-regulations) .mley-home-catalog-toolbar { align-items: stretch; }
}

@media (max-width: 359px) {
  :is(#mley-home-laws, #mley-home-regulations) :is(#mley-home-laws-table, #mley-home-regulations-table) tbody tr { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "views" "actions"; }
  #mley-home-regulations #mley-home-regulations-table tbody tr { grid-template-areas: "name" "parent" "actions"; }
  :is(#mley-home-laws, #mley-home-regulations) .mley-home-law-actions-group { justify-content: flex-start; }
}
