/* ============================================================
   1. KOMPAKTE STRUKTUR (Volle Breite, wenig Höhe)
   ============================================================ */
.menu-section {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2px;
}

.menu-section summary {
    list-style: none;
    cursor: pointer;
    padding: 6px 0; /* Minimaler Header-Abstand */
    outline: none;
}

.menu-section summary::-webkit-details-marker { display: none; }

.menu-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-section[open] .menu-header { color: var(--accent-color); }

.menu-content {
    padding: 5px 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Felder rücken eng zusammen */
}

/* Untermenüs */
.sub-menu {
    margin-top: 2px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.sub-menu summary {
    font-size: 0.65rem;
    padding: 5px 10px;
    color: var(--text-muted);
    border-left: 2px solid var(--border-color);
}

.sub-content {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Enger vertikaler Rhythmus */
}

/* ============================================================
   2. FORM-ELEMENTE (Stabil & Breit)
   ============================================================ */
.field-label {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px; /* Fast kein Abstand mehr zum Input */
    display: block;
}

/* Container nutzt wieder mehr Platz, ist aber flacher */
.number-input-container, .select-container {
    display: flex;
    background: var(--input-bg);
    border: 1px solid #222;
    border-radius: 4px;
    padding: 2px 8px; /* Sehr flach */
    align-items: center;
    width: 100%; /* Zurück auf volle Breite */
    box-sizing: border-box;
}

/* --- Dropdown Optionen (Ausgeklappt) Hintergrund anpassen --- */
select option {
    background-color: #111111; /* Dunkler Hintergrund für die Liste */
    color: var(--accent-color); /* Deine Akzentfarbe für den Text */
}

.number-input-container input, select {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
    padding: 4px 0;
}

/* Plus/Minus Buttons kompakt integriert */
.input-controls {
    display: flex;
    flex-direction: column; /* Buttons übereinander spart horizontale Breite */
    gap: 0;
    border-left: 1px solid #222;
    margin-left: 8px;
}

.input-controls button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 20px;
    height: 14px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.input-controls button:hover { color: var(--accent-color); }

/* ============================================================
   3. CHECKBOX-LOGIK (Keine Dopplung, klarer Haken)
   ============================================================ */
.check-container input,
input.hidden-trigger {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.check-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 26px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-muted);
    min-height: 18px;
    user-select: none;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 16px;
    background-color: #030303;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
}

/* Haken-Design */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid var(--accent-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.check-container input:checked ~ .checkmark,
.hidden-trigger:checked + .check-container .checkmark {
    border-color: var(--accent-color);
    background-color: rgba(0, 212, 255, 0.05);
}

.check-container input:checked ~ .checkmark:after,
.hidden-trigger:checked + .check-container .checkmark:after {
    display: block; /* Haken wird jetzt sicher angezeigt */
}

/* ============================================================
   4. ADVANCED SETTINGS (Kompakt & Vertikal)
   ============================================================ */
.hidden-menu {
    display: none;
    margin-top: 5px;
    padding: 8px 10px;
    background: rgba(0, 212, 255, 0.01);
    border-left: 2px solid var(--accent-color);
    flex-direction: column;
    gap: 8px;
}

.hidden-trigger:checked ~ .hidden-menu { display: flex !important; }

.vitrine-placeholder {
    height: 40px; /* Minimalistisch flach */
    background: #080808;
    border: 1px dashed #222;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.connection-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- Aktualisierter, perfekt ausgerichteter Info-Icon CAD-Stil --- */
.field-label {
    display: flex; /* Mache das Label zum Flex-Container */
    align-items: center; /* Vertikale Zentrierung von Text und Icon */
    gap: 8px; /* Sauberer Abstand zwischen Text und Icon, ersetzt margin-left */

    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em; /* Behalte CAD-Abstände bei */
    color: var(--text-muted);
    margin-bottom: 6px;
}

.info-icon {
    display: inline-flex; /* Icon-Container als Flexbox, um SVG zu zentrieren */
    align-items: center;
    justify-content: center;

    width: 16px; /* Behalte die Größe bei */
    height: 16px;

    color: var(--text-muted);
    opacity: 0.6;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;

    margin: 0; /* Verhindere Margin-Störungen */
    padding: 0; /* Verhindere Padding-Störungen */
}

.info-icon svg {
    display: block; /* Verhindert Inline-Lücken */
    width: 100%;
    height: 100%;
    stroke-width: 2.5px; /* Behalte technische Stärke bei */
    margin: auto; /* Zwinge Zentrierung im Container */
}

.info-icon:hover {
    color: var(--accent-color);
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--accent-glow)); /* Behalte Glow-Effekt */
    transform: scale(1.1); /* Behalte Zoom-Effekt */
}
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
