/* Neurovexa — Sprachumschalter im Header (Website + Panel)
   Knopf: gleiche Optik wie Warenkorb-Kreis und Login-Button daneben.
   Menü: ruhige Navy-Fläche mit Suchfeld, kleinen Flaggen und Häkchen an der aktiven Sprache.
*/

.nvx-lang {
  --nvx-lang-bg: rgba(12, 21, 48, 0.98);
  --nvx-lang-line: rgba(238, 240, 245, 0.1);
  --nvx-lang-text: rgba(231, 235, 244, 0.86);
  --nvx-lang-muted: rgba(188, 198, 223, 0.5);
  --nvx-lang-hover: rgba(238, 240, 245, 0.06);
  --nvx-lang-accent: #3de0f5;
  --nvx-lang-accent-soft: rgba(61, 147, 245, 0.14);
  position: relative;
  display: inline-block;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.nvx-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 45px;
  padding: 0 14px 0 12px;
  border-radius: 15px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  background: rgba(6, 7, 34, 0.9);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nvx-lang-btn::-webkit-details-marker {
  display: none;
}

.nvx-lang-btn::marker {
  content: "";
}

.nvx-lang-btn:hover,
.nvx-lang[open] .nvx-lang-btn,
.nvx-lang-btn:focus-visible {
  border-color: rgba(61, 224, 245, 0.7);
  box-shadow: 0 0 0 1px rgba(61, 224, 245, 0.2), 0 0 18px rgba(61, 224, 245, 0.18);
  outline: none;
}

.nvx-lang-flag {
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.nvx-lang-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.nvx-lang-code {
  letter-spacing: 0.04em;
}

.nvx-lang-caret {
  font-size: 9px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nvx-lang[open] .nvx-lang-caret {
  transform: rotate(180deg);
}

@media (max-width: 575.98px) {
  .nvx-lang-btn {
    height: 40px;
    padding: 0 10px;
    gap: 6px;
    border-radius: 12px;
  }

  .nvx-lang-caret {
    display: none;
  }
}

/* ---------------------------------------------------------------- Menü */

.nvx-lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  width: 264px;
  max-width: calc(100vw - 24px);
  border-radius: 14px;
  border: 1px solid var(--nvx-lang-line);
  background: var(--nvx-lang-bg);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.55), 0 2px 6px rgba(2, 6, 23, 0.35);
  overflow: hidden;
  text-align: start;
  transform-origin: top right;
}

.nvx-lang-menu,
.nvx-lang-menu * {
  box-sizing: border-box;
}

/* Kopf: Überschrift + Suchfeld */
.nvx-lang-head {
  flex: none;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--nvx-lang-line);
}

.nvx-lang .nvx-lang-title {
  display: block;
  margin: 0 2px 8px;
  color: var(--nvx-lang-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.nvx-lang-search {
  position: relative;
  display: block;
  margin: 0;
}

.nvx-lang .nvx-lang-search i {
  position: absolute;
  top: 50%;
  inset-inline-start: 11px;
  transform: translateY(-50%);
  color: var(--nvx-lang-muted);
  font-size: 12px;
  pointer-events: none;
}

.nvx-lang input.nvx-lang-filter {
  display: block;
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0 10px 0 32px;
  padding-inline: 32px 10px;
  border: 1px solid var(--nvx-lang-line);
  border-radius: 9px;
  background: rgba(238, 240, 245, 0.04);
  box-shadow: none;
  color: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 34px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nvx-lang input.nvx-lang-filter::placeholder {
  color: var(--nvx-lang-muted);
  opacity: 1;
}

.nvx-lang input.nvx-lang-filter:focus {
  border-color: rgba(61, 147, 245, 0.6);
  background: rgba(238, 240, 245, 0.06);
}

.nvx-lang input.nvx-lang-filter::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* Liste: einspaltig, schlanke Scrollleiste, Verläufe zeigen weitere Einträge an
   (Klassen has-more-top/-bottom setzt das Skript im Umschalter) */
.nvx-lang-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: min(300px, calc(calc(var(--nvx-vh, 1vh) * 100) - 220px));
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scroll-padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(238, 240, 245, 0.16) transparent;
  --nvx-lang-fade-top: 0px;
  --nvx-lang-fade-bottom: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--nvx-lang-fade-top), #000 calc(100% - var(--nvx-lang-fade-bottom)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--nvx-lang-fade-top), #000 calc(100% - var(--nvx-lang-fade-bottom)), transparent 100%);
}

.nvx-lang-list.has-more-top {
  --nvx-lang-fade-top: 18px;
}

.nvx-lang-list.has-more-bottom {
  --nvx-lang-fade-bottom: 24px;
}

.nvx-lang-list::-webkit-scrollbar {
  width: 4px;
}

.nvx-lang-list::-webkit-scrollbar-track {
  margin: 6px 0;
  background: transparent;
}

.nvx-lang-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(238, 240, 245, 0.16);
}

.nvx-lang-list::-webkit-scrollbar-thumb:hover {
  background: rgba(238, 240, 245, 0.3);
}

/* Einträge */
.nvx-lang .nvx-lang-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--nvx-lang-text);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nvx-lang .nvx-lang-option[hidden] {
  display: none !important;
}

.nvx-lang .nvx-lang-option:hover,
.nvx-lang .nvx-lang-option:focus-visible {
  background: var(--nvx-lang-hover);
  color: #fff;
  outline: none;
}

.nvx-lang .nvx-lang-option:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(61, 147, 245, 0.55);
}

.nvx-lang-option .nvx-lang-flag {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.nvx-lang-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: start;
  unicode-bidi: isolate;
}

.nvx-lang .nvx-lang-short {
  flex: none;
  color: var(--nvx-lang-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* gewählte Sprache: dezente Akzentfläche, Akzentstrich und Häkchen */
.nvx-lang .nvx-lang-option.is-active {
  background: var(--nvx-lang-accent-soft);
  color: #fff;
  font-weight: 500;
}

.nvx-lang .nvx-lang-option.is-active::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  inset-inline-start: 0;
  inset-inline-end: auto;
  width: 2px;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 2px;
  background: var(--nvx-lang-accent);
  opacity: 1;
  transform: none;
}

.nvx-lang .nvx-lang-check {
  flex: none;
  color: var(--nvx-lang-accent);
  font-size: 12px;
}

.nvx-lang .nvx-lang-empty {
  margin: 0;
  padding: 18px 10px;
  color: var(--nvx-lang-muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.nvx-lang .nvx-lang-empty[hidden] {
  display: none;
}

/* Header-CSS von Website/Panel (Teko auf span, Login-Button-Stil auf jedem a/i
   in .header-contact, Hover-Balken) nicht auf den Umschalter anwenden */
.nvx-lang span,
.nvx-lang a,
.nvx-lang input {
  font-family: Inter, "Segoe UI", system-ui, sans-serif !important;
}

.header-con .header-contact .nvx-lang a.nvx-lang-option,
#page-topbar .header-contact .nvx-lang a.nvx-lang-option {
  display: flex !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--nvx-lang-text) !important;
  line-height: 1.2 !important;
  text-align: start !important;
}

.header-con .header-contact .nvx-lang a.nvx-lang-option:hover,
.header-con .header-contact .nvx-lang a.nvx-lang-option:focus-visible,
#page-topbar .header-contact .nvx-lang a.nvx-lang-option:hover,
#page-topbar .header-contact .nvx-lang a.nvx-lang-option:focus-visible {
  background: var(--nvx-lang-hover) !important;
  color: #fff !important;
}

.header-con .header-contact .nvx-lang a.nvx-lang-option.is-active,
#page-topbar .header-contact .nvx-lang a.nvx-lang-option.is-active {
  background: var(--nvx-lang-accent-soft) !important;
  color: #fff !important;
}

.header-con .header-contact .nvx-lang a.nvx-lang-option:focus-visible,
#page-topbar .header-contact .nvx-lang a.nvx-lang-option:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(61, 147, 245, 0.55) !important;
}

.header-con .header-contact .nvx-lang a.nvx-lang-option[hidden],
#page-topbar .header-contact .nvx-lang a.nvx-lang-option[hidden] {
  display: none !important;
}

.header-con .header-contact .nvx-lang a i,
#page-topbar .header-contact .nvx-lang a i {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  line-height: 1 !important;
  border-radius: 0 !important;
  background: none !important;
  color: var(--nvx-lang-accent) !important;
}

.nvx-lang a::after {
  display: none !important;
}

.nvx-lang a:not(.is-active)::before {
  display: none !important;
}

/* Öffnen: kurz einblenden und leicht nach unten gleiten */
.nvx-lang[open] .nvx-lang-menu {
  animation: nvx-lang-in 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes nvx-lang-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nvx-lang-list { scroll-behavior: auto; }
  .nvx-lang[open] .nvx-lang-menu { animation: none; }
}

@media (max-width: 575.98px) {
  .nvx-lang-menu {
    width: 272px;
  }

  .nvx-lang-list {
    max-height: min(340px, calc(calc(var(--nvx-vh, 1vh) * 100) - 200px));
  }

  .nvx-lang .nvx-lang-option {
    min-height: 40px;
  }
}

/* Rechts-nach-links (Arabisch, Hebräisch, Persisch): Header-Navigation behält ihre Anordnung */
[dir="rtl"] .header-con {
  direction: ltr;
}


/* Website-Kopf: nur die Flagge im runden Knopf links neben dem Warenkorb ($nvxLangRound) */
.nvx-lang-round .nvx-lang-btn,
.nvx-lang-round .nvx-lang-btn:hover {
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

/* ohne Umrandung: beim Überfahren/Öffnen nur leicht aufhellen */
.nvx-lang-round .nvx-lang-btn:focus-visible,
.nvx-lang-round[open] .nvx-lang-btn {
  border: 0;
  box-shadow: none;
}

.nvx-lang-round .nvx-lang-btn .nvx-lang-flag {
  width: 28px;
  height: 28px;
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nvx-lang-round .nvx-lang-btn:hover .nvx-lang-flag,
.nvx-lang-round[open] .nvx-lang-btn .nvx-lang-flag {
  opacity: 0.85;
  transform: scale(1.06);
}

.nvx-lang-round .nvx-lang-btn:focus-visible .nvx-lang-flag {
  outline: 2px solid rgba(61, 224, 245, 0.7);
  outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .nvx-lang-round .nvx-lang-btn,
  .nvx-lang-round .nvx-lang-btn:hover {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .nvx-lang-round .nvx-lang-btn .nvx-lang-flag {
    width: 26px;
    height: 26px;
  }
}
