/* UltraPass-Website – Demo: Karte der Einstellungen wie in App 1.17
   (generatorEinstellungen.dart, einzelwahl.dart, zahlWahl.dart, zeichenChips.dart):
   Umschalter Passwort/Passphrase, Länge bzw. Anzahl der Wörter, Enthaltene Zeichen bzw.
   Trennzeichen, unten abgetrennt „Weitere Optionen“. Maße in Punkten der App (--u). */

.app-settings {
  margin-top: calc(14 * var(--u));
  overflow: hidden;
  border-radius: calc(20 * var(--u));
  background: var(--a-card);
}

.app-settings__groups {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
  padding: calc(16 * var(--u)) calc(20 * var(--u));
}

.app-group[hidden] {
  display: none;
}

.app-group__title {
  margin: 0 0 calc(8 * var(--u));
  font-size: calc(13 * var(--u));
  font-weight: 600;
  color: var(--a-muted);
}

/* Einzelwahl: graue Spur, die gewählte Hälfte erhaben mit Häkchen */
.app-seg {
  display: flex;
  padding: calc(3 * var(--u));
  border-radius: calc(14 * var(--u));
  background: var(--a-neutral);
}

.app-seg__item {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--u));
  min-width: 0;
  min-height: calc(44 * var(--u));
  padding: calc(4 * var(--u)) calc(8 * var(--u));
  border: 0;
  border-radius: calc(11 * var(--u));
  background: transparent;
  font-size: calc(16 * var(--u));
  font-weight: 500;
  line-height: 1.15;
  color: var(--a-unselected);
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 0.15s;
}

.app-seg__item[aria-checked="true"] {
  font-weight: 700;
  color: var(--a-primary);
  background: var(--a-raised);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
  cursor: default;
}

.app-seg__check {
  display: none;
  flex: 0 0 auto;
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.app-seg__item[aria-checked="true"] .app-seg__check {
  display: block;
}

.app-seg__mono {
  font-family: "Ubuntu Mono", ui-monospace, monospace;
  font-size: calc(18 * var(--u));
}

/* Zahl mit Minus und Plus in einer Spur */
.app-stepper {
  display: flex;
  align-items: center;
  min-height: calc(50 * var(--u));
  border-radius: calc(14 * var(--u));
  background: var(--a-neutral);
  color: var(--a-text);
}

.app-stepper__btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: calc(54 * var(--u));
  height: calc(50 * var(--u));
  border: 0;
  border-radius: calc(14 * var(--u));
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.app-stepper__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.app-stepper__btn svg {
  width: calc(22 * var(--u));
  height: calc(22 * var(--u));
}

.app-stepper__value {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin: 0;
}

.app-stepper__value::before,
.app-stepper__value::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1px;
  height: calc(24 * var(--u));
  background: currentColor;
  opacity: 0.14;
  transform: translateY(-50%);
}

.app-stepper__value::before { left: 0; }
.app-stepper__value::after { right: 0; }

.app-stepper__number {
  font-size: calc(20 * var(--u));
  font-weight: 700;
}

/* Die Zahl der Länge ist ein Knopf mit kleinem Pfeil: darunter liegt die echte Auswahl */
.app-stepper__value--select {
  cursor: pointer;
}

.app-stepper__value--select select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}

.app-stepper__value--select:focus-within {
  outline: 2px solid var(--a-primary);
  outline-offset: -2px;
  border-radius: calc(10 * var(--u));
}

.app-stepper__arrow {
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
  margin-left: calc(4 * var(--u));
  color: var(--a-unselected);
}

/* Zeichen-Chips: an getönt mit Häkchen, aus grau und schräg durchgestrichen */
.app-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(8 * var(--u));
}

.app-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--u));
  min-height: calc(50 * var(--u));
  padding: calc(4 * var(--u));
  border: 0;
  border-radius: calc(14 * var(--u));
  background: var(--a-neutral);
  color: var(--a-unselected);
  cursor: pointer;
}

.app-chip.is-on {
  background: var(--a-tonal);
  color: var(--a-primary);
}

.app-chip__symbol {
  font-family: "Ubuntu Mono", ui-monospace, monospace;
  font-size: calc(17 * var(--u));
  font-weight: 500;
  white-space: nowrap;
}

.app-chip.is-on .app-chip__symbol {
  font-weight: 700;
}

.app-chip__check {
  display: none;
  flex: 0 0 auto;
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.app-chip.is-on .app-chip__check {
  display: block;
}

.app-chip:not(.is-on)::after,
.app-raster__cell:not(.is-on)::after {
  content: "";
  position: absolute;
  inset: calc(10 * var(--u));
  background: linear-gradient(to bottom right, transparent calc(50% - 1 * var(--u)), currentColor calc(50% - 1 * var(--u)), currentColor calc(50% + 1 * var(--u)), transparent calc(50% + 1 * var(--u)));
  pointer-events: none;
}

/* Punkt oben rechts: einzelne Zeichen weichen vom Werksstand ab */
.app-chip__dot {
  display: none;
  position: absolute;
  top: calc(5 * var(--u));
  right: calc(5 * var(--u));
  width: calc(8 * var(--u));
  height: calc(8 * var(--u));
  border: calc(2 * var(--u)) solid var(--a-bg);
  border-radius: 50%;
  background: var(--a-primary);
}

.app-chip.has-dot .app-chip__dot {
  display: block;
}

/* „Weitere Optionen“ mit der Zusammenfassung dessen, was abweicht */
.app-settings__more {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  width: 100%;
  min-height: calc(60 * var(--u));
  padding: calc(10 * var(--u)) calc(16 * var(--u)) calc(10 * var(--u)) calc(20 * var(--u));
  border: 0;
  border-top: 1px solid var(--a-line);
  background: transparent;
  color: var(--a-text);
  text-align: left;
  cursor: pointer;
}

.app-settings__more:hover {
  background: color-mix(in srgb, var(--a-text) 4%, transparent);
}

.app-settings__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: calc(3 * var(--u));
}

.app-settings__title {
  font-size: calc(16 * var(--u));
  font-weight: 500;
}

.app-settings__summary {
  font-size: calc(13 * var(--u));
  line-height: 1.35;
  color: var(--a-muted);
}

.app-settings__chevron {
  flex: 0 0 auto;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
  color: var(--a-muted);
}
