/* Copyright 2018-2026 Preston A. Elder <prez@neuromancy.net>. All rights reserved. */
/* The Reference section (server/reference-pages.mjs): condition browser,
   function reference, WoW API search. Uses the theme tokens of site/themes.css. */
.ref-filters {
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto;
}

.ref-group h2 {
  margin-top: 28px;
}

.ref-table th[scope="row"] {
  font-weight: 600;
  white-space: nowrap;
}

.ref-table th[scope="row"] code {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.ref-label {
  color: var(--gold);
}

.ref-indent {
  margin-left: 24px;
}

.ref-quote {
  font-style: italic;
}

.ref-links {
  columns: 2 260px;
  padding-left: 20px;
}

.ref-usage {
  list-style: none;
  padding: 0;
}

.ref-usage pre {
  margin: 4px 0 12px;
}

.ref-callback h3 code {
  font-size: 16px;
}

.ref-article h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .ref-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ref-filters label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .ref-filters {
    grid-template-columns: minmax(0, 1fr);
  }
  .ref-table th[scope="row"] {
    white-space: normal;
  }
}

.ref-article.prose {
  max-width: 960px;
}

.ref-article section > p {
  max-width: 78ch;
}

.ref-article table th[scope="row"],
.ref-article table thead th {
  white-space: nowrap;
}

.ref-api thead th {
  white-space: nowrap;
}

@media (max-width: 560px) {
  .ref-table thead {
    display: none;
  }
  .ref-table tr,
  .ref-table th,
  .ref-table td {
    display: block;
  }
  .ref-table td {
    border-top: 0;
    padding-top: 0;
  }
}

/* Edition badges (server/reference-pages.mjs editionBadge): the edition's icon at
   24px with its name beneath; a red X, an amber dot or a lock drawn over it. */
.ref-eds {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: flex-start;
}

.ref-editions {
  margin: 4px 0 20px;
}

.ref-editions .ref-eds {
  gap: 8px 18px;
}

.ref-ed {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
  text-align: center;
  vertical-align: top;
}

.ref-ed-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 0;
}

.ref-ed-icon img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  font: 9px/24px var(--mono);
  color: var(--muted);
  overflow: hidden;
  display: block;
}

.ref-ed-sample {
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-sizing: border-box;
}

.ref-ed-name {
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

.ref-ed-no img {
  filter: grayscale(0.8);
  opacity: 0.55;
}

.ref-ed-no .ref-ed-name {
  text-decoration: line-through;
}

.ref-ed-mark {
  position: absolute;
  pointer-events: none;
}

.ref-ed-x {
  inset: -3px;
  width: 30px;
  height: 30px;
  stroke: #e0241b;
  stroke-width: 3.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
}

:root[data-theme="dark"] .ref-ed-x {
  filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ref-ed-x {
    filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000);
  }
}

.ref-ed-dot {
  right: -4px;
  top: -4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f0a400;
  box-shadow: 0 0 0 2px var(--surface);
}

.ref-ed-lock {
  right: -5px;
  bottom: -5px;
  width: 14px;
  height: 14px;
  fill: #b07cf0;
  stroke: #b07cf0;
  stroke-width: 1.6;
  filter: drop-shadow(0 0 1px var(--surface)) drop-shadow(0 0 1px var(--surface));
}

.ref-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 0;
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.ref-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ref-legend .ref-ed {
  min-width: 0;
}

.ref-api th .ref-ed,
.ref-api td .ref-ed {
  min-width: 0;
}

.ref-meta {
  margin-top: 28px;
  font-size: 14px;
}

.ref-table .ref-eds {
  flex-wrap: nowrap;
  gap: 4px;
}

.ref-table .ref-ed {
  width: 58px;
  min-width: 0;
}

.ref-table .ref-ed-name {
  white-space: normal;
  font-size: 10px;
  overflow-wrap: normal;
  hyphens: manual;
}

@media (max-width: 560px) {
  .ref-table .ref-eds {
    flex-wrap: wrap;
  }
}
