/* ═══════════════════════════════════════════════════════════════════════════
   Konfiguratoren /configure (ESP32) und /configure-rp (RP2350) im Design der
   Website (seit 2026-10-19). Geladen NACH dem <style>-Block der Seite und nach
   css/site.css – überschreibt nur Optik, keine Klassen/IDs (das Seiten-JS
   hängt daran). body trägt "nd-body nd-tool".

   Kopf- und Fußzeile sind statisches Markup im Stil von
   private/templates/site_header.php / site_footer.php (die Seiten sind .html).
   Der Sprachschalter (#langSwitch, Flip-Switch des Seiten-JS) sitzt in der
   Kopfzeile statt oben rechts schwebend.
   ═══════════════════════════════════════════════════════════════════════════ */

body.nd-tool { padding: 0; min-height: 100vh; background-attachment: scroll; line-height: 1.55; }

/* Sprachschalter in der Kopfzeile */
.nd-header .lang-panel { position: static; top: auto; right: auto; padding: 0; border: 0; background: none; z-index: auto; }
.nd-header .lang-panel .flip-switch { width: 88px !important; height: 32px; }
.nd-header .lang-panel .flip-switch-knob { height: 26px; }

/* Seitenkopf */
.nd-tool .page-wrapper { max-width: 760px; margin: 0 auto; padding: 40px 20px 48px; }
.nd-tool-title { text-align: center; margin: 0 0 28px; }
.nd-tool .nd-tool-title h1 { margin: 0; font-size: 56px; line-height: 1; letter-spacing: -0.02em; }
.nd-tool-title .nd-subtitle { margin-top: 6px; font-family: var(--nd-sans); font-weight: 400; font-size: 20px; color: var(--nd-muted); }

/* Karte, Abschnitte */
.nd-tool .card { border: 1px solid var(--nd-line); border-radius: 20px; padding: 32px; background: #fff; }
.nd-tool .section-label {
    font-family: var(--nd-body); font-weight: 700; font-size: 16px; line-height: 1.25;
    text-transform: none; letter-spacing: 0;
    border-bottom: 1px solid var(--nd-line-2); padding-bottom: 10px; margin-bottom: 14px;
}
.nd-tool .desc-text, .nd-tool .hint-text { color: var(--nd-muted); }

/* Buttons */
.nd-tool .btn {
    border-radius: 12px; min-height: 52px; padding: 14px 20px;
    font-size: 16px; text-transform: none; letter-spacing: 0;
}
.nd-tool .btn-firmware { border-radius: 10px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.nd-tool .btn-preset { border-radius: 999px; padding-left: 14px; padding-right: 14px; }
.nd-tool .readout-btn-row .btn { font-size: 14px; }

/* Schieberegler mit Schalter daneben (Schlagunterdrückung, Burst …): der Regler
   endet früher, die Schalterspalte hat feste Breite. Unter dem Schalter steht
   je nach Zustand „Aktiv“ oder „Inaktiv“ – rein über die Klasse .active, die das
   Seiten-JS ohnehin setzt; beide Texte tragen data-i18n und überleben den
   Sprachwechsel. */
.nd-tool .mini-toggle-switch + .nd-tg-state { min-width: 58px; text-align: center; }
.nd-tool .mini-toggle-switch.active + .nd-tg-state .nd-tg-off,
.nd-tool .mini-toggle-switch:not(.active) + .nd-tg-state .nd-tg-on { display: none; }

/* Schalter */
.nd-tool .flip-switch { border-radius: 10px; background: var(--nd-soft); }
.nd-tool .flip-switch-knob { border-radius: 8px; text-transform: none; letter-spacing: 0; font-size: 12px; }
.nd-tool .flip-switch-label { text-transform: none; letter-spacing: 0; font-size: 12px; }
.nd-tool label.radio-option input[type="radio"] { accent-color: var(--nd-text); }

/* Schwebendes Bedienfeld unten links (Region, Modus, Firmware) */
.nd-tool .controls-panel { border: 1px solid var(--nd-line); border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.nd-tool .controls-group-label { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--nd-muted); }

/* Dialoge, Eingaben */
.nd-tool .modal-box { border-radius: 20px; }
.nd-tool .modal-title { font-family: var(--nd-head); }
.nd-tool .modal-input, .nd-tool input[type="text"], .nd-tool input[type="email"], .nd-tool textarea, .nd-tool select { border-radius: 10px; }
.nd-tool .compat-warning, .nd-tool .live-info-box, .nd-tool .veto-card { border-radius: 12px; }

/* Fußzeile immer am unteren Fensterrand, auch wenn die Seite kürzer ist als das
   Fenster (vorher endete sie mittendrin, und das per position:fixed am Fenster
   klebende Bedienfeld lag darunter). body ist eine Flex-Spalte, .page-wrapper
   füllt den Rest.
   Desktop: das Bedienfeld steht im Fluss zwischen Karte und Fußzeile und klebt
   per sticky unten links. Beim Scrollen schwebt es wie bisher, am Seitenende
   bleibt es über der Fußzeile stehen, statt sie zu überdecken. */
body.nd-tool { display: flex; flex-direction: column; }
body.nd-tool > .nd-header { order: 0; }
body.nd-tool > .page-wrapper { order: 1; flex: 1 0 auto; width: 100%; }
body.nd-tool > .controls-panel { order: 2; }
body.nd-tool > .nd-footer { order: 3; }

@media (min-width: 769px) {
    body.nd-tool > .controls-panel {
        position: sticky; bottom: 24px; left: auto;
        align-self: flex-start; margin: 0 0 24px 24px;
    }
}

/* Mobil: Bedienfeld in den Seitenfluss unter die Karte, statt Inhalt zu überdecken */
@media (max-width: 768px) {
    body.nd-tool > .page-wrapper { padding: 24px 16px 16px; }
    body.nd-tool > .controls-panel {
        position: static; margin: 0 16px 24px; padding: 16px;
        display: flex; flex-wrap: wrap; gap: 14px 20px; box-shadow: none;
    }
    body.nd-tool > .controls-panel .controls-group { margin-bottom: 0; }
    .nd-tool .nd-tool-title h1 { font-size: 40px; }
    .nd-tool-title .nd-subtitle { font-size: 17px; }
    .nd-tool .card { padding: 22px 18px; border-radius: 16px; }
    .nd-header .lang-panel .flip-switch { width: 80px !important; }
}
