/* BlindWoW: a WoW-like look in our own artwork, with a plain look and
   high-contrast options chosen on the Accessibility settings page.
   Colours are checked for contrast: body text on the dark background is
   above 12 to 1, gold headings above 9 to 1. */

:root {
  --bg: #0d0b09;
  --bg-2: #1a1510;
  --panel: #1f1912;
  --panel-edge: #6b4f1d;
  --gold: #e9c46a;
  --gold-bright: #f6dc8d;
  --text: #f3eadb;
  --muted: #cfc2ab;
  --link: #8fd3ff;
  --focus: #ffffff;
  --button-text: #1a1206;
  --line: 1.5;
  --base-size: 1rem;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  font-size: var(--base-size);
  line-height: var(--line);
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(233, 196, 106, 0.18), transparent 60%),
    radial-gradient(ellipse at 10% 110%, rgba(70, 90, 140, 0.25), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: "Cinzel", Georgia, serif;
  color: var(--gold);
  line-height: 1.25;
  letter-spacing: 0.02em;
}
h1 { font-size: 2em; margin: 0 0 0.5em; }
h2 { font-size: 1.5em; margin: 1.4em 0 0.5em; }
h3 { font-size: 1.17em; margin: 1.2em 0 0.4em; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--gold-bright); }

/* a clear outline around whatever has keyboard focus: a light line with a dark
   ring outside it, so it shows on every background and in every contrast setting */
:focus-visible, input:focus, select:focus, textarea:focus, [tabindex="-1"]:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #000000;
  border-radius: 4px;
}
body.contrast-dark-on-light :focus-visible, body.contrast-dark-on-light input:focus,
body.contrast-dark-on-light select:focus, body.contrast-dark-on-light textarea:focus,
body.contrast-dark-on-light [tabindex="-1"]:focus { box-shadow: 0 0 0 6px #ffff00; }

/* skip link and accessibility link: first things on every page */
.skip-link, .a11y-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--button-text);
  font-weight: 700;
  border-radius: 6px;
}
.skip-link:focus, .a11y-link:focus { top: 1rem; }
.a11y-link {
  position: static;
  display: inline-block;
  margin: 0.5rem 1rem 0;
  background: transparent;
  color: var(--link);
  font-weight: 400;
  padding: 0.25rem 0.5rem;
}

/* header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 2px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(31, 25, 18, 0.95), rgba(13, 11, 9, 0.9));
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-name {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 800;
  font-size: 1.5em;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(233, 196, 106, 0.35);
}
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
nav a, .link-button { font-size: 1em; }
nav a[aria-current="page"] { color: var(--gold-bright); font-weight: 700; text-decoration-thickness: 3px; }
form.inline { display: inline; }
.link-button {
  background: none; border: 0; padding: 0; color: var(--link);
  text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; font: inherit;
}

main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
main#main:focus { outline: none; box-shadow: none; }

/* hero */
.hero { text-align: center; padding: 2.5rem 1rem 1.5rem; }
.hero h1 {
  font-size: 2.75em;
  text-shadow: 0 2px 0 #3a2a0c, 0 0 24px rgba(233, 196, 106, 0.35);
}
.lead { font-size: 1.125em; max-width: 38rem; margin: 0 auto 1.25rem; }
.small { font-size: 0.875em; color: var(--muted); }

/* panels: parchment-dark cards with a gold frame */
.panel {
  position: relative;
  margin: 1.5rem 0;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(180deg, rgba(45, 36, 25, 0.95), rgba(28, 22, 15, 0.95));
  border: 2px solid var(--panel-edge);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(246, 220, 141, 0.15), 0 8px 24px rgba(0, 0, 0, 0.5);
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid var(--gold);
  pointer-events: none;
}
.panel::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.panel > :first-child { margin-top: 0; }

.notice {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--gold);
  background: rgba(233, 196, 106, 0.08);
}

/* buttons */
.button, button.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-weight: 700;
  color: var(--button-text);
  background: linear-gradient(180deg, var(--gold-bright), #c99a35);
  border: 2px solid #8a6420;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(233, 196, 106, 0.25);
  transition: box-shadow 0.2s, transform 0.2s;
}
.button:hover { color: var(--button-text); box-shadow: 0 0 22px rgba(233, 196, 106, 0.55); transform: translateY(-1px); }
.button.small { padding: 0.35rem 0.8rem; font-size: 0.95em; }
.button.secondary { background: #3b3125; color: var(--text); border-color: var(--panel-edge); box-shadow: none; }

/* tables: real data tables, readable by screen readers */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
caption {
  text-align: left;
  font-family: "Cinzel", Georgia, serif;
  color: var(--gold);
  font-size: 1.1em;
  padding-bottom: 0.5rem;
}
th, td { padding: 0.55rem 0.75rem; border-bottom: 1px solid rgba(107, 79, 29, 0.6); text-align: left; vertical-align: top; }
thead th { color: var(--gold-bright); border-bottom: 2px solid var(--panel-edge); }
tbody th { font-weight: 700; }
input[type="checkbox"], input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--gold); }

fieldset { border: 1px solid var(--panel-edge); border-radius: 8px; margin: 1rem 0; padding: 0.75rem 1rem; }
legend { color: var(--gold); font-weight: 700; padding: 0 0.4rem; }
.choice { margin: 0.35rem 0; display: flex; align-items: center; gap: 0.6rem; }

.site-footer {
  border-top: 2px solid var(--panel-edge);
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875em;
}

/* phones: tables become stacked cards so nothing is cut off */
@media (max-width: 40rem) {
  h1 { font-size: 1.6em; }
  .hero h1 { font-size: 2.1em; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -10000px; }
  tr { border: 1px solid var(--panel-edge); border-radius: 8px; margin-bottom: 0.75rem; padding: 0.5rem; }
  th, td { border: 0; }
}

/* ---------- accessibility settings ---------- */

/* plain look: no decoration, calm and simple */
body.plain {
  background: var(--bg);
}
body.plain h1, body.plain h2, body.plain h3, body.plain .brand-name, body.plain caption {
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  text-shadow: none;
  letter-spacing: 0;
}
body.plain .panel { background: var(--bg); box-shadow: none; border-width: 1px; padding: 1rem 0; border-left: 0; border-right: 0; border-radius: 0; }
body.plain .panel::before, body.plain .panel::after { display: none; }
body.plain .button { background: var(--gold); box-shadow: none; transition: none; }
body.plain .site-header { background: var(--bg); }
body.plain .hero { text-align: left; padding: 1rem 0; }
body.plain .lead { margin-left: 0; }

/* text size */
body.size-large { --base-size: 1.25rem; }
body.size-larger { --base-size: 1.5rem; }
body.size-largest { --base-size: 2rem; }

/* contrast */
body.contrast-light-on-dark {
  --bg: #000000; --bg-2: #000000; --panel: #000000; --panel-edge: #ffffff;
  --gold: #ffff00; --gold-bright: #ffff00; --text: #ffffff; --muted: #ffffff; --link: #00ffff;
  background: #000;
}
body.contrast-dark-on-light {
  --bg: #ffffff; --bg-2: #ffffff; --panel: #ffffff; --panel-edge: #000000;
  --gold: #000000; --gold-bright: #000000; --text: #000000; --muted: #000000; --link: #0000cc;
  --focus: #000000; --button-text: #ffffff;
  background: #fff;
}
body.contrast-light-on-dark .panel, body.contrast-dark-on-light .panel,
body.contrast-light-on-dark .site-header, body.contrast-dark-on-light .site-header { background: var(--bg); box-shadow: none; }
body.contrast-dark-on-light .button { background: #000; color: #fff; border-color: #000; box-shadow: none; }
body.contrast-light-on-dark .button { background: #ffff00; color: #000; border-color: #ffff00; box-shadow: none; }
body.contrast-light-on-dark .brand-name, body.contrast-dark-on-light .brand-name,
body.contrast-light-on-dark .hero h1, body.contrast-dark-on-light .hero h1 { text-shadow: none; }

/* spacing */
body.wide-spacing { --line: 2; }
body.wide-spacing p, body.wide-spacing li { margin-bottom: 0.9em; }

/* motion: the setting, and the system preference */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  transition: none !important; animation: none !important;
}
body.reduce-motion .button:hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .button:hover { transform: none; }
}

/* the operating system's own high contrast mode */
@media (forced-colors: active) {
  .panel::before, .panel::after { display: none; }
  .button { border: 2px solid ButtonText; }
}

/* ---------- data pages ---------- */
.sub { display: block; font-size: 1em; color: var(--muted); font-family: "Atkinson Hyperlegible", Verdana, sans-serif; letter-spacing: 0; }
.lead-small { font-size: 1.05em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.75rem 0 1rem; }
.toolbar form { margin: 0; }
.section-nav ul { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; border-bottom: 1px solid var(--panel-edge); padding-bottom: 0.75rem; }
.section-nav a[aria-current="page"] { color: var(--gold-bright); font-weight: 700; text-decoration-thickness: 3px; }
/* the character section menus open over the page, as in the main menu */
.section-nav > ul { align-items: center; }
.section-nav .menu-list { display: block; margin: 0; padding: 0.4rem 0; border: 2px solid var(--panel-edge); }
.avatar { float: right; border: 2px solid var(--gold); border-radius: 50%; margin: 0 0 1rem 1rem; }
.code { word-break: break-all; background: rgba(0, 0, 0, 0.35); padding: 0.15rem 0.4rem; border-radius: 4px; }
.columns { columns: 2 18rem; }
.stat { font-size: 1.15em; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 1rem 0; }
.filters input[type="search"], .filters input[type="text"], .filters select, input[type="file"] {
  font: inherit; padding: 0.4rem 0.6rem; border-radius: 6px; border: 1px solid var(--panel-edge); background: #120e0a; color: var(--text);
}
.inline-fieldset { display: inline-flex; gap: 0.8rem; margin: 0; padding: 0.3rem 0.7rem; }
.inline-fieldset label { display: inline-flex; align-items: center; gap: 0.35rem; }

/* charts */
.chart { margin: 1rem 0 1.5rem; }
.chart figcaption { font-family: "Cinzel", Georgia, serif; color: var(--gold); font-size: 1.2em; margin-bottom: 0.5rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart details { margin-top: 0.5rem; }
.chart summary { cursor: pointer; color: var(--link); }
.bar { fill: url(#none); fill: #c99a35; }
.bar-label, .bar-value, .axis { fill: var(--text); font-family: "Atkinson Hyperlegible", Verdana, sans-serif; font-size: 15px; }
.bar-value { fill: var(--gold-bright); font-weight: 700; }
.line { fill: none; stroke: var(--gold); stroke-width: 3; }
.line-dot { fill: var(--gold-bright); }
.bar.kill { fill: #3fa35b; } .bar.wipe { fill: #b5473a; }
.bar.cls-mage { fill: #3fc7eb; } .bar.cls-warrior { fill: #c69b6d; } .bar.cls-paladin { fill: #f48cba; } .bar.cls-hunter { fill: #aad372; }
.bar.cls-rogue { fill: #fff468; } .bar.cls-priest { fill: #e6e6e6; } .bar.cls-death-knight { fill: #c41e3a; } .bar.cls-shaman { fill: #0070dd; }
.bar.cls-warlock { fill: #8788ee; } .bar.cls-monk { fill: #00ff98; } .bar.cls-druid { fill: #ff7c0a; } .bar.cls-demon-hunter { fill: #a330c9; } .bar.cls-evoker { fill: #33937f; }

/* progress bars */
.progress { margin: 0.75rem 0 1rem; }
.progress-label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.progress-track { display: block; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--panel-edge); overflow: hidden; }
.progress-fill { display: block; height: 100%; background: linear-gradient(90deg, #c99a35, var(--gold-bright)); }

/* item quality, as in the game (always with the word too) */
.quality { font-weight: 700; }
.q-poor { color: #b0b0b0; } .q-common { color: #ffffff; } .q-uncommon { color: #4cd964; } .q-rare { color: #4aa3ff; }
.q-epic { color: #c77dff; } .q-legendary { color: #ff9a2e; } .q-artifact { color: #e6cc80; } .q-heirloom { color: #00ccff; }

/* upload */
.upload-status { min-height: 1.6em; }
progress { width: 100%; height: 1.2rem; accent-color: var(--gold); }

body.plain .chart figcaption { font-family: "Atkinson Hyperlegible", Verdana, sans-serif; }
body.contrast-light-on-dark .bar, body.contrast-dark-on-light .bar { fill: var(--gold); }

/* text for screen readers only, such as "Copied" announcements */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.copy-button { margin-left: 0.5rem; }

/* notifications at the top of the page */
.notifications { border: 2px solid var(--gold); border-radius: 8px; padding: 0.75rem 1rem; margin: 0 0 1.25rem; background: var(--panel); }
.notifications h2 { margin: 0 0 0.4rem; font-size: 1.17em; }
.notifications ul { margin: 0 0 0.4rem; padding-left: 1.2rem; }

/* main menu: disclosures that open small menus */
.site-header nav > ul { align-items: center; }
.menu { position: relative; }
.menu-button {
  display: inline-block; list-style: none; color: var(--link); cursor: pointer;
  border: 1px solid var(--panel-edge); border-radius: 6px; padding: 0.3rem 0.75rem;
}
.menu-button::-webkit-details-marker { display: none; }
.menu-button:hover, .menu-details[open] > .menu-button { color: var(--gold-bright); border-color: var(--gold); }
.menu-current .menu-button { color: var(--gold-bright); font-weight: 700; }
.menu-list {
  position: absolute; top: calc(100% + 0.35rem); left: 0; z-index: 20; min-width: 14rem;
  list-style: none; margin: 0; padding: 0.4rem 0; background: var(--panel); border: 2px solid var(--panel-edge);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.menu-list li { display: block; }
.menu-list a, .menu-list .link-button { display: block; width: 100%; text-align: left; padding: 0.45rem 1rem; text-decoration: none; }
.menu-list a:hover, .menu-list .link-button:hover { background: rgba(233, 196, 106, 0.12); }
.menu-list form { margin: 0; }
@media (max-width: 40rem) {
  .menu-list { position: static; box-shadow: none; margin-top: 0.35rem; }
}

/* Discord chat in the full view */
.chat { list-style: none; padding: 0; margin: 0; }
.chat-message { padding: 0.5rem 0.75rem; border-bottom: 1px solid rgba(107, 79, 29, 0.5); }
.chat-message.is-new { border-left: 3px solid var(--gold); }
.chat-head { margin-bottom: 0.15rem; }
.new-marker { color: var(--gold-bright); margin: 0.75rem 0 0.25rem; list-style: none; }

/* small icon buttons, such as copy */
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin-left: 0.35rem;
  padding: 0.2rem; background: transparent; color: var(--link); border: 1px solid transparent; border-radius: 4px; cursor: pointer;
}
.icon-button:hover { color: var(--gold-bright); border-color: var(--panel-edge); }

/* auction house: groups of toggle buttons; a pressed button is gold and outlined */
.toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.75rem 0; }
.toggles legend { margin-bottom: 0.3rem; }
.toggles .button[aria-pressed="true"] { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.filters input[type="number"] { font: inherit; width: 6rem; padding: 0.4rem 0.6rem; border-radius: 6px; border: 1px solid var(--panel-edge); background: #120e0a; color: var(--text); }

/* the BlindWoW logo: in the corner of every page, and the compass and name on the front page */
.brand-logo { display: block; height: 36px; width: auto; }
.brand-text { display: none; font-family: "Cinzel", Georgia, serif; font-weight: 800; font-size: 1.5em; }
body.contrast-dark-on-light .brand-logo { display: none; }
body.contrast-dark-on-light .brand-text { display: inline; color: var(--text); }
.hero-logo { display: block; max-width: 100%; height: auto; margin: 0 auto 0.75rem; border-radius: 12px; }
.hero h1 .hero-logo { margin-bottom: 0; }

/* the calendar: a real table, styled as a month */
table.calendar { table-layout: fixed; width: 100%; border-collapse: separate; border-spacing: 4px; }
table.calendar th[scope="col"] { text-align: center; color: var(--gold-bright); padding: 0.4rem 0; }
table.calendar .week-head { width: 0; padding: 0; border: 0; }
table.calendar td { vertical-align: top; height: 6.5rem; padding: 0.4rem; background: rgba(31, 25, 18, 0.85); border: 1px solid var(--panel-edge); border-radius: 8px; }
table.calendar td.other-month { opacity: 0.55; }
table.calendar td.today { border: 2px solid var(--gold-bright); box-shadow: 0 0 14px rgba(233, 196, 106, 0.35); }
table.calendar .day-num { display: block; font-weight: 700; color: var(--gold); margin-bottom: 0.25rem; }
table.calendar ul { list-style: none; margin: 0; padding: 0; font-size: 0.9em; }
table.calendar li { margin: 0.15rem 0; padding: 0.1rem 0.35rem; border-left: 3px solid var(--gold); border-radius: 3px; background: rgba(0, 0, 0, 0.25); }
table.calendar li.ev-darkmoon { border-left-color: #b57edc; }
table.calendar li.ev-bonus { border-left-color: #6fb7ff; }
table.calendar li.ev-guild { border-left-color: #7fd18b; }
table.calendar li.ev-raid { border-left-color: #ff8a65; }
body.plain table.calendar td, body.contrast-light-on-dark table.calendar td, body.contrast-dark-on-light table.calendar td { background: var(--bg); box-shadow: none; }
@media (max-width: 700px) {
  table.calendar td { height: auto; font-size: 0.85em; padding: 0.25rem; }
}
