/* Item ids: small and quiet, still searchable. */
.md-typeset small.iid { color: var(--md-default-fg-color--light); font-size: .7em; margin-left: .15em; white-space: nowrap; }

/* Collapsible shop / enchant lists (Material's details styling, plus an item count). */
.md-typeset details.shop > summary .count { font-weight: 400; color: var(--md-default-fg-color--light); font-size: .85em; margin-left: .4em; }
.md-typeset details.shop table:not([class]) { font-size: .72rem; }

/* Home page poster. */
.md-typeset .posters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: 1rem; max-width: 34rem; margin: 1.2em auto 1.6em; }
.md-typeset .posters p { display: contents; }
.md-typeset .posters a { display: block; border-radius: .5rem; overflow: hidden; box-shadow: 0 .3rem 1.2rem rgba(0,0,0,.35); transition: transform .15s; }
.md-typeset .posters a:hover { transform: translateY(-3px); }
.md-typeset .posters img { display: block; width: 100%; height: auto; }

/* Home page cards. */
.md-typeset .grid.cards > ul > li { border-radius: .4rem; }

/* Key/value tables written with an empty header row: hide that row. */
.md-typeset table:not([class]) thead:not(:has(th:not(:empty))) { display: none; }

/* Database pages (assets/db.js). */
.db-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1em 0 .4em; }
.db-bar input, .db-bar select { font: inherit; font-size: .8rem; padding: .45em .7em; border-radius: .3rem;
  border: 1px solid var(--md-default-fg-color--lighter); background: var(--md-default-bg-color); color: var(--md-default-fg-color); }
.db-bar input { flex: 1 1 16rem; min-width: 0; font-size: .85rem; padding: .6em .8em; border-width: 2px; border-color: var(--md-primary-fg-color); }
.md-typeset .db-bar .db-go { margin: 0; padding: .5em 1.4em; font-size: .8rem; cursor: pointer; }
.md-typeset .db-count, .md-typeset .db-loading { color: var(--md-default-fg-color--light); font-size: .75rem; margin: .2em 0; }
.md-typeset .db-list table { font-size: .74rem; }
.md-typeset .db-list td:first-child { font-variant-numeric: tabular-nums; color: var(--md-default-fg-color--light); }
.md-typeset .db-chip { display: inline-block; font-size: .68rem; padding: .05em .5em; margin: .1em 0; border-radius: 1em;
  background: var(--md-default-fg-color--lightest); white-space: nowrap; }
.md-typeset .db-chip.db-mvp { background: var(--md-accent-fg-color); color: var(--md-accent-bg-color); font-weight: 700; }
.md-typeset .db-facts { display: grid; grid-template-columns: max-content 1fr; gap: .35em 1.2em; margin: 1em 0; font-size: .78rem; }
.md-typeset .db-facts dt { font-weight: 700; color: var(--md-default-fg-color--light); }
.md-typeset .db-facts dd { margin: 0; min-width: 0; font-variant-numeric: tabular-nums; }
.md-typeset .db-script { font-size: .72rem; white-space: pre-wrap; }
.md-typeset .db-script code { white-space: pre-wrap; word-break: break-word; }
.md-typeset .db-fx { margin: .4em 0 .6em; }
.md-typeset .db-fx .db-fx { margin: .2em 0 .3em; }
.md-typeset .db-fx li { margin: .15em 0; }
.md-typeset .db-fx .ico { vertical-align: middle; }
.md-typeset .db-fx-code { font-size: .72rem; white-space: pre-wrap; word-break: break-word; }
.md-typeset details.db-script-box { margin: .2em 0 1em; padding: 0; border: 0; box-shadow: none; background: none; font-size: .7rem; }
.md-typeset details.db-script-box > summary { padding: 0; margin: 0; background: none; border: 0; font-weight: 400; cursor: pointer; color: var(--md-default-fg-color--light); }
.md-typeset details.db-script-box > summary::before, .md-typeset details.db-script-box > summary::after { display: none; }
.md-typeset details.db-script-box > summary:hover { color: var(--md-accent-fg-color); }
.md-typeset details.db-script-box[open] > summary { margin-bottom: .3em; }
@media (max-width: 30em) { .md-typeset .db-facts { grid-template-columns: 1fr; } .md-typeset .db-facts dd { margin-bottom: .4em; } }

/* Item icons and monster pictures (hotlinked from Divine Pride; missing ones remove themselves). */
.md-typeset img.ico { height: 1.5em; width: auto; vertical-align: -.4em; margin-right: .25em; image-rendering: pixelated; }
.md-typeset img.mob-sm { height: 2.2em; width: auto; vertical-align: -.8em; margin-right: .3em; image-rendering: pixelated; }
.md-typeset img.mob-lg { max-height: 7em; width: auto; image-rendering: pixelated; display: block; margin: .2em 0 .6em; }
.md-typeset .db-pic { max-height: 9em; width: auto; image-rendering: pixelated; float: right; margin: 0 0 .6em 1em; }
.md-typeset .db-list img.ico, .md-typeset .db-list img.mob-sm { margin-right: .2em; }
/* Item and skill icons drawn from the sprite sheets in img/sheets/ (tools/pack_icons.py). */
.md-typeset .spr { display: inline-block; background-repeat: no-repeat; image-rendering: pixelated; }
.md-typeset .spr.ico { width: 1.5em; height: 1.5em; vertical-align: -.4em; margin-right: .25em; }
.md-typeset .db-list .spr.ico { margin-right: .2em; }
.md-typeset .spr.db-pic { width: 3em; height: 3em; float: right; margin: 0 0 .6em 1em; }

/* Database filters, sortable headers and element colours. */
.db-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem .8rem; margin: .4em 0 .8em; align-items: end; }
.db-filter { display: flex; flex-direction: column; gap: .2rem; font-size: .68rem; color: var(--md-default-fg-color--light); min-width: 0; }
.db-filter select, .db-filter input { font: inherit; font-size: .78rem; padding: .35em .5em; border-radius: .3rem; min-width: 0; width: 100%;
  border: 1px solid var(--md-default-fg-color--lighter); background: var(--md-default-bg-color); color: var(--md-default-fg-color); }
.db-range { display: flex; gap: .3rem; align-items: center; }
.db-range input { width: 0; flex: 1 1 0; }
.db-reset { font: inherit; font-size: .72rem; padding: .45em .7em; border-radius: .3rem; cursor: pointer;
  border: 1px solid var(--md-default-fg-color--lighter); background: transparent; color: var(--md-accent-fg-color); }
.md-typeset .db-sort { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; white-space: nowrap; }
.md-typeset .db-sort.on { color: var(--md-accent-fg-color); }
.md-typeset .db-chip.db-boss { background: #7e57c2; color: #fff; }
.md-typeset .db-el { color: #fff; background: #78909c; }
.md-typeset .db-el-fire { background: #e53935; }
.md-typeset .db-el-water { background: #1e88e5; }
.md-typeset .db-el-wind { background: #43a047; }
.md-typeset .db-el-earth { background: #8d6e63; }
.md-typeset .db-el-holy { background: #f9a825; color: #222; }
.md-typeset .db-el-dark { background: #4a148c; }
.md-typeset .db-el-ghost { background: #9575cd; }
.md-typeset .db-el-undead { background: #455a64; }
.md-typeset .db-el-poison { background: #7cb342; }
.md-typeset .db-el-neutral { background: #9e9e9e; }
.md-typeset .db-bar .db-desc { flex: 1 0 100%; display: flex; align-items: center; gap: .4em; font-size: .75rem; color: var(--md-default-fg-color--light); cursor: pointer; }
.md-typeset .db-bar .db-desc input { flex: none; width: auto; margin: 0; padding: 0; }
.md-typeset blockquote.db-desc-text { font-size: .76rem; }
