/* ===========================================================================
   Page helpers. Brand colours live in theme.css.
   =========================================================================== */

/* "Last updated" line under a page title:  *Last updated: ...*{ .last-updated } */
.md-typeset .last-updated {
  display: block;
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
  font-style: normal;
  font-size: 0.7rem;
  color: var(--md-default-fg-color--light);
}

/* Item icon next to a name:  ![](../img/items/coin.svg){ .item-icon } Poring Coin */
.md-typeset img.item-icon {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
  margin-right: 0.3rem;
  position: relative;
  top: -0.1rem;
}

/* Tables: top-align cells so an item name lines up with the first line of its description */
.md-typeset table:not([class]) td {
  vertical-align: top;
}

.md-typeset table:not([class]) th {
  white-space: nowrap;
}

/* Small tags for patch notes:  **Added**{ .tag .tag-added } */
.md-typeset .tag {
  display: inline-block;
  padding: 0 0.4rem;
  border-radius: 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.md-typeset .tag-added   { background: rgba(46, 204, 113, 0.18); color: #2ecc71; }
.md-typeset .tag-changed { background: rgba(52, 152, 219, 0.18); color: #3498db; }
.md-typeset .tag-fixed   { background: rgba(241, 196, 15, 0.18);  color: #d4a60a; }
.md-typeset .tag-removed { background: rgba(231, 76, 60, 0.18);   color: #e74c3c; }

/* Screenshots:  ![...](...){ .wiki-screenshot } */
.md-typeset img.wiki-screenshot {
  display: block;
  max-width: 37.5rem;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  border: 0.0625rem solid var(--md-default-fg-color--lightest);
}

/* Feedback line appended to every page by overrides/main.html */
.wiki-feedback {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 0.0625rem solid var(--md-default-fg-color--lightest);
  font-size: 0.7rem;
  color: var(--md-default-fg-color--light);
}

/* Click-to-copy inline code (js/copy.js) */
.md-typeset code.copyable {
  cursor: pointer;
}

.md-typeset code.copyable:hover,
.md-typeset code.copyable:focus-visible {
  background: var(--md-accent-fg-color--transparent);
  outline: none;
}

.copy-tip {
  position: absolute;
  transform: translate(-50%, -125%);
  padding: 0.2rem 0.5rem;
  border-radius: 0.2rem;
  background: var(--md-default-fg-color);
  color: var(--md-default-bg-color);
  font-size: 0.65rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}

.copy-tip--visible {
  opacity: 1;
}

/* ---------------------------------------------------------------------------
   Database pages (generated by tools/generate_database.py)
   --------------------------------------------------------------------------- */

/* Sprite or icon inside a table row */
.md-typeset img.sprite {
  max-height: 2.5rem;
  max-width: 3.5rem;
  vertical-align: middle;
}

/* Full-size sprite on a monster page */
.md-typeset img.monster-sprite {
  display: block;
  max-height: 10rem;
  margin: 0 0 1rem;
}

/* Crown next to boss names */
.md-typeset .boss {
  color: var(--brand-gold);
  vertical-align: -0.15em;
}

/* Wordmark on the welcome page */
.md-typeset img.wiki-hero {
  display: block;
  max-width: 26rem;
  width: 100%;
  margin: 0.5rem 0 1.5rem;
}

/* Sortable tables (js/tablesort.js) */
.md-typeset table:not([class]) th[role="columnheader"] {
  cursor: pointer;
  user-select: none;
}

.md-typeset table:not([class]) th[role="columnheader"]:not(.no-sort)::after {
  content: "";
  display: inline-block;
  margin-left: 0.4em;
  border: 0.3em solid transparent;
  border-top-color: currentcolor;
  opacity: 0.3;
  vertical-align: 0.05em;
}

.md-typeset table:not([class]) th[aria-sort="ascending"]:not(.no-sort)::after {
  border-top-color: transparent;
  border-bottom-color: currentcolor;
  vertical-align: 0.4em;
  opacity: 1;
}

.md-typeset table:not([class]) th[aria-sort="descending"]:not(.no-sort)::after {
  opacity: 1;
}

/* NPC sprite in a table cell (Main Office and similar pages) */
.md-typeset img.npc {
  max-height: 4rem;
  max-width: 5rem;
  vertical-align: middle;
  margin-right: 0.6rem;
}

/* NPC table: sprite on the left, name and role stacked beside it */
.md-typeset .npc-table td:first-child {
  white-space: nowrap;
  min-width: 12rem;
}

.md-typeset .npc-table img.npc {
  float: left;
  margin: 0 0.75rem 0 0;
}

/* Pet cards on the Cute Pet System page */
.md-typeset img.pet-sprite {
  max-height: 6rem;
  max-width: 8rem;
}

.md-typeset h3 img.sprite {
  max-height: 1.6rem;
  vertical-align: middle;
  margin-right: 0.3rem;
}
