/* ============================================================
   FishLog Akademie – Bedienung des Erscheinungsbilds
   Hell/dunkel und Schriftgröße. Nutzt die Variablen aus main.css,
   steht also in beiden Erscheinungsbildern richtig.
   ============================================================ */

.da-wurzel { position: relative; display: inline-block; }

/* Ohne festen Platz im Seitenkopf legt sich die Schaltfläche unten
   rechts über die Seite. Der Abstand zum unteren Rand berücksichtigt
   die Systemleiste auf dem Telefon. */
.da-wurzel.ist-schwebend {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
}

.da-knopf {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: color var(--t), border-color var(--t);
}
.da-knopf:hover { color: var(--primary); border-color: var(--primary-light); }
.da-knopf:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.da-wurzel.ist-offen .da-knopf { color: var(--primary); border-color: var(--primary-light); }

.da-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 250px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 61;
}
/* Im Seitenkopf klappt das Feld nach unten auf, nicht nach oben. */
.da-wurzel:not(.ist-schwebend) .da-panel { bottom: auto; top: calc(100% + 10px); }

.da-titel {
  margin: 0 0 8px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.da-titel + .da-reihe { margin-bottom: 14px; }

.da-reihe { display: flex; flex-direction: column; gap: 4px; }

.da-wahl {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  font-size: .88rem;
  text-align: left;
  cursor: pointer;
}
.da-wahl:hover { background: var(--surface-2); }
.da-wahl:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.da-wahl.ist-aktiv {
  background: var(--surface-akzent);
  border-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.da-reihe-schrift {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.da-stufe {
  min-width: 42px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-heading);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}
.da-stufe:hover:not(:disabled) { border-color: var(--primary-light); color: var(--primary); }
.da-stufe:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.da-stufe:disabled { opacity: .4; cursor: default; }

.da-stufe-name {
  flex: 1 1 auto;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}

.da-zuruecksetzen {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 6px;
  border: 0;
  background: none;
  color: var(--text-faint);
  font-size: .78rem;
  text-decoration: underline;
  cursor: pointer;
}
.da-zuruecksetzen:hover { color: var(--primary); }
.da-zuruecksetzen:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

@media (max-width: 420px) {
  .da-panel { width: min(250px, calc(100vw - 28px)); }
}
