/* Incident table filters (docs/assets/incidents.js). Colors come from the theme, so light and dark both work. */
.md-typeset .inc-filters { margin: 1em 0 .6em; scroll-margin-top: 4rem; }
.md-typeset .inc-filters:empty { display: none; }
.inc-f-grid {
  display: grid; gap: .55em .8em;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  padding: .75em .85em; border: .05rem solid var(--md-default-fg-color--lightest); border-radius: .2rem;
  background: var(--md-default-fg-color--lightest);
}
.inc-f { display: flex; flex-direction: column; gap: .2em; min-width: 0; margin: 0; }
.inc-f-wide { grid-column: span 2; }
.inc-f-date { grid-column: span 2; }
.md-typeset .inc-f-label { font-size: .62rem; font-weight: 700; letter-spacing: .02em; color: var(--md-default-fg-color--light); }
.inc-f input, .inc-f select {
  font: inherit; font-size: .68rem; line-height: 1.3; min-width: 0; width: 100%; box-sizing: border-box;
  padding: .32em .45em; border: .05rem solid var(--md-default-fg-color--lighter); border-radius: .15rem;
  background: var(--md-default-bg-color); color: var(--md-default-fg-color);
}
.inc-f input:focus, .inc-f select:focus { outline: .1rem solid var(--md-accent-fg-color); outline-offset: -.05rem; border-color: transparent; }
.inc-f-range { display: flex; align-items: center; gap: .4em; }
.inc-f-range input { flex: 1 1 0; }
.md-typeset .inc-f-dash { font-size: .64rem; color: var(--md-default-fg-color--light); }
.inc-f-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .35em .45em; margin-top: .55em; }
.md-typeset .inc-f-bar .inc-f-label { margin-right: .15em; }
.md-typeset .inc-chip, .md-typeset .inc-f-reset {
  font: inherit; font-size: .64rem; line-height: 1.2; cursor: pointer;
  padding: .25em .7em; border-radius: 1em; border: .05rem solid var(--md-default-fg-color--lighter);
  background: var(--md-default-bg-color); color: var(--md-default-fg-color);
}
.md-typeset .inc-chip:hover, .md-typeset .inc-f-reset:hover { border-color: var(--md-accent-fg-color); color: var(--md-accent-fg-color); }
.md-typeset .inc-chip[aria-pressed="true"] { background: var(--md-primary-fg-color); border-color: var(--md-primary-fg-color); color: var(--md-primary-bg-color); }
.md-typeset .inc-f-count { margin-left: auto; font-size: .66rem; font-weight: 700; }
.md-typeset .inc-f-reset[hidden] { display: none; }
.md-typeset .inc-f-toggle {
  display: none; align-items: center; gap: .3em; margin-bottom: .5em; cursor: pointer;
  font: inherit; font-size: .7rem; font-weight: 700; padding: .35em .9em; border-radius: .2rem;
  border: .05rem solid var(--md-default-fg-color--lighter); background: var(--md-default-bg-color); color: var(--md-default-fg-color);
}
.md-typeset .inc-f-toggle::after { content: "\25BE"; font-size: .9em; }
.md-typeset .inc-filters.is-open .inc-f-toggle::after { content: "\25B4"; }
.md-typeset #inc-table .inc-why { color: var(--md-default-fg-color--light); }
.md-typeset .inc-empty td { text-align: center; padding: 1.2em; color: var(--md-default-fg-color--light); }

/* The table: full width with fixed column shares, so it does not jump around while filtering */
.md-typeset .md-typeset__table:has(> #inc-table) { display: block; }
.md-typeset #inc-table { display: table; width: 100%; table-layout: fixed; }
.md-typeset #inc-table col.c-date { width: 6.6em; }
.md-typeset #inc-table col.c-sev { width: 6.4em; }
.md-typeset #inc-table col.c-title { width: 36%; }
.md-typeset #inc-table col.c-vendor { width: 13%; }
.md-typeset #inc-table col.c-ev { width: 13%; }
.md-typeset #inc-table col.c-sc { width: 24%; }
.md-typeset #inc-table td { overflow-wrap: anywhere; vertical-align: top; }
.md-typeset #inc-table td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.md-typeset #inc-table tr[hidden] { display: none; }
.md-typeset #inc-table th { padding: 0; }
.md-typeset #inc-table .inc-sort {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .3em; width: 100%;
  padding: .9375em 1.25em; cursor: pointer; font-weight: 700;
}
.md-typeset #inc-table .inc-sort:hover { color: var(--md-accent-fg-color); }
.md-typeset #inc-table .inc-sort:focus-visible { outline: .1rem solid var(--md-accent-fg-color); outline-offset: -.15rem; }
.md-typeset #inc-table .inc-sort-mark::after { content: "\2195"; opacity: .35; font-size: .9em; }
.md-typeset #inc-table th[aria-sort="ascending"] .inc-sort-mark::after { content: "\25B2"; opacity: .9; font-size: .7em; }
.md-typeset #inc-table th[aria-sort="descending"] .inc-sort-mark::after { content: "\25BC"; opacity: .9; font-size: .7em; }
.md-typeset .inc-cal-grid td.sel { outline: .12rem solid var(--md-accent-fg-color); outline-offset: -.06rem; }

@media screen and (max-width: 44.9375em) {
  .md-typeset .inc-f-toggle { display: inline-flex; }
  .inc-filters:not(.is-open) .inc-f-grid { display: none; }
  .inc-f-wide, .inc-f-date { grid-column: auto; }
  .md-typeset #inc-table { table-layout: auto; min-width: 40rem; }
  .md-typeset .md-typeset__table:has(> #inc-table) { display: inline-block; }
}
