/**
 * LORO-X Form und Leistung - Eigenes CSS
 * VEREINHEITLICHT 2026-07-19: nutzt jetzt die zentralen Komponenten
 * (.oa-tabs/.oa-tab, .alert-info, .oa-btn/.oa-btn-primary, Markenblau #006aac)
 * aus templates/css/style.css. Hier verbleiben nur noch tool-spezifische
 * Layout-Regeln und die einzigartige Konfigurator-Kette/Status-Leiste/
 * Ergebnis-Anzeige/Lade-Overlay. Original-Backup:
 * backups/tool_styles_2026-07-19/formundleistung/.
 */

/* Container */
.ful-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
}

/* Header */
.ful-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #006aac;
}

.ful-header h2 {
    margin: 0 0 8px 0;
    color: #006aac;
    font-size: 22px;
    font-weight: 600;
}

.ful-subtitle {
    margin: 0;
    color: #666;
    font-size: 15px;
}

/* Beispiel-Tabs: Rand/Abstand/aktiver Zustand kommen zentral aus .oa-tabs/.oa-tab
   (.ful-tab bleibt zusätzlich im Markup, weil app.js darüber die Tab-Klicks bindet
   und den aktiven Tab umschaltet) – hier nur die Zentrierung der 8 Tabs. */
.ful-tabs {
    justify-content: center;
}

/* Hauptbereich */
.ful-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border: 1px solid #006aac;
    padding: 15px;
    background: #f9f9f9;
}

/* Konfigurator */
.ful-konfigurator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.ful-komponente {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

.ful-komponente-label {
    font-weight: 600;
    color: #006aac;
    margin-bottom: 8px;
    font-size: 13px;
}

.ful-komponente-select {
    margin-bottom: 10px;
}

.ful-komponente-select select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #006aac;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
}

.ful-komponente-select select:focus {
    outline: none;
    border-color: #00568a;
    box-shadow: 0 0 3px rgba(0, 106, 172, 0.3);
}

.ful-komponente-select select:disabled {
    background: #eee;
    color: #999;
    cursor: not-allowed;
}

.ful-komponente-bild img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #ccc;
    border: 1px solid #ddd;
}

/* Ergebnis-Bereich (einzigartig, kein oa-card: eigener Kopfbalken + feste Reihenfolge) */
.ful-ergebnis {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
}

.ful-ergebnis-header {
    background: #006aac;
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    margin: -15px -15px 15px -15px;
}

#ful-klasse-nr {
    font-size: 18px;
}

/* Beispiel-Bild */
.ful-beispiel-bild {
    text-align: center;
    margin-bottom: 15px;
}

.ful-beispiel-bild img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.ful-beispiel-bild a {
    display: inline-block;
}

/* Status-Container: mehrsegmentige Statusleiste (3 gestapelte volle Balken), passt
   optisch nicht ins kleine Pillen-Muster von .oa-badge – bleibt eigene Klasse,
   Farben aber auf Systempalette gezogen (Grün/Rot = zentrale Toast-Farben,
   Blautöne = Markenblau/Hover-Blau). */
.ful-status-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 15px;
}

.ful-status {
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.3s ease;
}

/* Entwässerungsart */
.ful-status-haupt {
    background: #28a745;
    color: #fff;
}

.ful-status-not {
    background: #dc3545;
    color: #fff;
}

/* Strömungsart */
.ful-status-freispiegel {
    background: #006aac;
    color: #fff;
}

.ful-status-druckstroemung {
    background: #00568a;
    color: #fff;
}

/* Silent-Klasse */
.ful-status-silent {
    background: #ffc107;
    color: #333;
}

/* Beschreibung: Box ist jetzt die zentrale .alert-info, hier nur der Margin-Reset
   für den eingebetteten Text (sonst Browser-Standardabstand im Absatz). */
#ful-beschreibung-text {
    margin: 0;
}

/* Konfigurator-Link: Button-Optik kommt zentral aus .oa-btn/.oa-btn-primary,
   hier nur die zentrierte Abstandshaltung des Wrappers. */
.ful-konfigurator-link {
    text-align: center;
    margin-bottom: 15px;
}

/* Auslauf-Info */
.ful-auslauf-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.ful-auslauf-label {
    font-weight: 600;
    color: #006aac;
    font-size: 13px;
}

.ful-auslauf-text {
    flex: 1;
    font-size: 12px;
    color: #555;
}

.ful-auslauf-bild img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: #ccc;
    border: 1px solid #ddd;
}

/* Loading-Overlay */
.ful-loading {
    position: relative;
}

.ful-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive: Tablet */
@media (max-width: 768px) {
    .ful-main {
        grid-template-columns: 1fr;
    }

    .ful-konfigurator {
        grid-template-columns: 1fr 1fr;
    }

    .ful-tabs {
        gap: 3px;
    }

    .ful-tab {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
    .ful-container {
        padding: 10px;
    }

    .ful-header h2 {
        font-size: 18px;
    }

    .ful-subtitle {
        font-size: 13px;
    }

    .ful-konfigurator {
        grid-template-columns: 1fr;
    }

    .ful-tab {
        flex: 1 1 calc(25% - 6px);
        padding: 6px 4px;
        font-size: 11px;
        text-align: center;
    }

    .ful-komponente-bild img {
        width: 60px;
        height: 60px;
    }

    .ful-auslauf-info {
        flex-direction: column;
        text-align: center;
    }
}

/* Animation für Updates */
@keyframes ful-highlight {
    0% { background-color: #fffacd; }
    100% { background-color: transparent; }
}

.ful-updated {
    animation: ful-highlight 0.5s ease;
}

/* Overflow-Fix (2026-07-19): Grid-/Flex-Items duerfen unter ihre Inhalts-
   Mindestbreite schrumpfen. Der Grid-Default min-width:auto liess sonst breite
   Selects/Bilder/Texte die Spalten sprengen -> Elemente ragten aus den Boxen. */
.ful-main > *,
.ful-konfigurator > .ful-komponente,
.ful-auslauf-text { min-width: 0; }
.ful-komponente-select select { max-width: 100%; min-width: 0; }
.ful-komponente-bild img,
.ful-auslauf-bild img,
.ful-beispiel-bild img { max-width: 100%; }

/* Der Konfigurator-Verweis-Button hat einen langen Text ("Systeme der Klasse N im
   Online-Konfigurator zeigen"). .oa-btn ist auf kurze Labels ausgelegt (white-space:
   nowrap + feste 44px) -> hier gezielt Umbruch + variable Hoehe + max-width erlauben,
   damit der Button in der halbbreiten Ergebnis-Spalte bleibt statt herauszuragen. */
.ful-konfigurator-link .oa-btn {
    white-space: normal;
    height: auto;
    min-height: 44px;
    padding: 8px 18px;
    max-width: 100%;
    line-height: 1.25;
}
