/* Colour scheme picker (Profile > Colours) and the few per-scheme touches the recolouring can't do.
   Not recoloured itself, so everything here is built from currentColor and the scheme attributes
   set on <html> by _Layout (data-color-scheme, data-scheme-tone). */

.color-scheme-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.85rem;
}

.color-scheme-option {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.6rem 0.6rem 0.8rem;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, currentColor 4%, transparent);
  color: inherit;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.color-scheme-option:hover {
  border-color: color-mix(in srgb, currentColor 45%, transparent);
  transform: translateY(-1px);
}

.color-scheme-option.is-active {
  border-color: currentColor;
  box-shadow: 0 0 0 1px currentColor;
}

.color-scheme-option__preview {
  display: block;
  height: 86px;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid rgba(127, 127, 127, 0.25);
}

.color-scheme-option__card {
  position: relative;
  display: block;
  height: 100%;
  padding: 10px;
  border-radius: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.color-scheme-option__line {
  display: block;
  width: 72%;
  height: 6px;
  margin-bottom: 7px;
  border-radius: 3px;
  opacity: 0.9;
}

.color-scheme-option__line--short {
  width: 46%;
  opacity: 0.6;
}

.color-scheme-option__accent {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 14px;
  border-radius: 7px;
}

.color-scheme-option__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.color-scheme-option__check {
  margin-left: auto;
}

.color-scheme-option__description {
  font-size: 0.85rem;
  opacity: 0.75;
  line-height: 1.35;
}

/* Native controls and scrollbars follow the scheme (standard is left exactly as it was). */
html[data-scheme-tone="light"] {
  color-scheme: light;
}

html[data-scheme-tone="dark"]:not([data-color-scheme="standard"]) {
  color-scheme: dark;
}

/* Tír na nÓg: the wiki's book-like serif for headings. */
html[data-color-scheme="tirnanog"] h1,
html[data-color-scheme="tirnanog"] h2,
html[data-color-scheme="tirnanog"] h3,
html[data-color-scheme="tirnanog"] .module-shell__brand-module {
  font-family: "EB Garamond", "Libre Baskerville", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Tír na nÓg wiki: the palette menu in the header (its own scheme, see _TirNaNogWikiLayout). */
.tnw-schemes .tnw-schemes__button {
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--tnw-line);
  border-radius: 10px;
  background: var(--tnw-paper);
  color: var(--tnw-ink-soft);
}

/* The wiki hides header menu icons at mid widths; this button is only an icon. */
.tnw-top .tnw-schemes .tnw-menu__button.tnw-schemes__button > i:first-child {
  display: inline-block;
  font-size: 0.95rem;
}

.tnw-schemes .tnw-menu__panel {
  min-width: 200px;
}

.tnw-schemes__swatch {
  position: relative;
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid;
  border-radius: 50%;
  overflow: hidden;
}

.tnw-schemes__swatch > span {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 50%;
  height: 50%;
}
