/* =========================================================================
   DER SCHALTER „EN“ NEBEN DER SPRACHWAHL (Renés Wunsch 29.09.2026)
   =========================================================================
   Klassen, Monster, Gegenstände und Karten englisch, der Rest der Seite in
   ihrer Sprache. Der Knopf hat die Form des Sprachknopfes daneben
   (`.langpicker__btn`), eingeschaltet leuchtet er in Gold wie ein aktiver
   Reiter. Der Tooltip erklärt ihn beim Überfahren, beim Tastatur-Fokus und
   nach einem Klick einige Sekunden lang (für das Handy, dort gibt es kein
   Überfahren). Ein- und ausgeblendet wird immer weich.
   ========================================================================= */

.namesswitch {
  position: relative;

  /* Rückt an die Sprachwahl heran, beide gehören zusammen. */
  margin-left: -0.25rem;
}

.namesswitch[hidden] {
  display: none;
}

.namesswitch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(to bottom, var(--glass-light), rgb(255 255 255 / 2%));
  color: rgb(230 232 238 / 62%);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.namesswitch__btn:hover,
.namesswitch__btn:focus-visible {
  border-color: rgb(232 195 122 / 45%);
  background: linear-gradient(to bottom, rgb(232 195 122 / 14%), rgb(255 255 255 / 3%));
  color: var(--ink);
  outline: none;
}

.namesswitch__btn[aria-pressed='true'] {
  border-color: rgb(232 195 122 / 60%);
  background: linear-gradient(to bottom, rgb(232 195 122 / 22%), rgb(232 195 122 / 6%));
  color: var(--gold);
  box-shadow: 0 0 10px rgb(232 195 122 / 18%);
}

.namesswitch__tip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  width: max-content;
  max-width: 17rem;
  padding: 8px 11px;
  background: rgb(18 20 26 / 96%);
  border: 1px solid rgb(214 176 106 / 35%);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 55%);
  color: rgb(230 232 238 / 88%);
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0s linear 0.25s;
}

.namesswitch:hover .namesswitch__tip,
.namesswitch__btn:focus-visible + .namesswitch__tip,
.namesswitch.is-tip .namesswitch__tip {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0s;
}

/*
  Derselbe Schalter als kleiner Knopf auf der Weltkarte, unter J, B, V und W
  (die Karte verdeckt die Kopfleiste). Form der Kleinschalter aus
  weltkarte.css, nur so breit, dass zwei Buchstaben Platz haben; Silber als
  eigene Farbe, keine der Markierungssorten.
*/
.asg-wk-kleinschalter-namen {
  width: auto;
  min-width: 20px;
  padding: 0 3px;
  border-color: rgb(200 208 224 / 70%);
  color: rgb(222 228 240);
}

.asg-wk-kleinschalter-namen[hidden] {
  display: none;
}

/* =========================================================================
   EINZELEINSTELLUNGEN PER RECHTSKLICK (Renés Wunsch 01.10.2026)
   =========================================================================
   Im Tooltip ein zweiter, abgesetzter Absatz, der auf den Rechtsklick
   hinweist. Halb leuchtend, wenn nur einige Arten englisch stehen. Das
   Fenster hat die Farben des Tooltips. Code: names-settings.js
   ========================================================================= */
.namesswitch__absatz {
  display: block;
}

.namesswitch__absatz--mehr {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgb(214 176 106 / 22%);
  color: rgb(232 195 122 / 85%);
}

.namesswitch__btn.is-teil,
.sk-kopf__schalter--namen.is-teil {
  border-color: rgb(232 195 122 / 40%);
  background: linear-gradient(to bottom, rgb(232 195 122 / 10%), rgb(255 255 255 / 2%));
  color: rgb(232 195 122 / 80%);
}

.namesswitch__fenster {
  position: fixed;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 14rem;
  padding: 10px 12px;
  border: 1px solid rgb(214 176 106 / 35%);
  border-radius: 8px;
  background: rgb(18 20 26 / 97%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 55%);
  font-family: var(--font-body);
  font-size: 0.8rem;
  animation: namesswitch-ein 0.2s ease;
}

.namesswitch__fenster[hidden] {
  display: none;
}

@keyframes namesswitch-ein {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.namesswitch__fenstertitel {
  margin: 0 0 4px;
  color: rgb(210 190 150 / 70%);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.namesswitch__art {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 5px 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: rgb(230 232 238 / 80%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.namesswitch__art:hover,
.namesswitch__art:focus-visible {
  outline: none;
  background: rgb(255 255 255 / 6%);
  color: var(--ink);
}

/* Der kleine Schalter je Art: leer aus, golden an, weich überblendet. */
.namesswitch__punkt {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 14px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.namesswitch__punkt::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(230 232 238 / 60%);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.namesswitch__art.is-an {
  color: var(--gold);
}

.namesswitch__art.is-an .namesswitch__punkt {
  border-color: rgb(232 195 122 / 60%);
  background: rgb(232 195 122 / 22%);
}

.namesswitch__art.is-an .namesswitch__punkt::after {
  background: var(--gold);
  transform: translateX(12px);
}

/* Solange das Fenster offen ist, tritt der Tooltip zurück. */
.namesswitch.is-fenster .namesswitch__tip {
  opacity: 0;
  visibility: hidden;
}
