/* ============================================================
   ALG 2026 – STYLESHEET (Vollständig überarbeitet)
   Version: 4.0 – Final
=============================================================== */

/* ============================================================
   1. CONTAINER & GRUNDLAYOUT
=============================================================== */

.alg2026-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ============================================================
   2. HEADER
=============================================================== */

.alg2026-header {
    text-align: center;
    margin-bottom: 30px;
}

.alg2026-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px auto;
}

.alg2026-header h2 {
    margin: 0;
    font-size: 28px;
    color: #940028;
    font-weight: 700;
}

/* ============================================================
   3. FORMULARBEREICH
=============================================================== */

.alg2026-info {
    background: #eef0f4;
    padding: 12px 15px;
    border-left: 4px solid #940028;
    border-radius: 5px;
    font-size: 15px;
    margin-bottom: 20px !important;
}

#alg2026-form fieldset {
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 20px;
}

#alg2026-form legend {
    padding: 0 10px;
    font-size: 18px;
    font-weight: 600;
}

/* ROWS */

.alg2026-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

/* Label */

.alg2026-row label {
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Inputs (FORMULAR) */

.alg2026-input-wrap {
    position: relative;
    width: 100%;
}

.alg2026-input-wrap input {
    width: 100%;
    padding: 12px 14px !important;
    padding-right: 45px !important;
    border-radius: 2px !important;
    border: 1px solid #bbb !important;
    font-size: 16px !important;
    background: #fff !important;
    color: inherit !important;
}

.alg2026-input-wrap input:focus {
    border-color: #940028 !important;
    box-shadow: 0 0 0 2px rgba(148,0,40,0.15) !important;
    background: #fff !important;
    color: inherit !important;
}

.alg2026-input-wrap input:read-only {
    background: #e8e8e8 !important;
    color: inherit !important;
}

.alg2026-currency {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    font-weight: 600;
    color: #666;
}

/* Select (FORMULAR) */

.alg2026-row select {
    padding: 12px 14px !important;
    border-radius: 2px !important;
    border: 1px solid #bbb !important;
    font-size: 16px !important;
    background: #fff !important;
    color: inherit !important;
}

.alg2026-row select:focus {
    border-color: #940028 !important;
    box-shadow: 0 0 0 2px rgba(148,0,40,0.15) !important;
    background: #fff !important;
    color: inherit !important;
}

/* ============================================================
   4. INFO-BUTTONS & TOOLTIPS
=============================================================== */

.alg2026-info-btn {
    width: 26px;
    height: 26px;
    border-radius: 50% !important;
    background: #700121 !important;
    color: #fff !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 700;
    font-family: "Segoe UI", sans-serif;

    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    line-height: 26px;

    transition: 0.2s ease;
}

.alg2026-info-btn:hover {
    background: #940028 !important;
    transform: scale(1.1);
}

.alg2026-infobox {
    background: #003d5c;
    color: #fff;
    padding: 14px 40px 14px 16px;
    border-radius: 6px;
    margin-top: 10px;
    animation: fadeIn 0.25s ease;
    position: relative;
}

.alg2026-infobox-close {
    position: absolute;
    top: 8px;
    right: 8px;

    width: 26px;
    height: 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #700121 !important;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    font-weight: 700;
}

/* ============================================================
   5. BUTTONS
=============================================================== */

.alg2026-btn-auto {
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0 auto;

    padding: 14px 28px !important;
    font-size: 16px;
    font-weight: 600;
    display: block;
    cursor: pointer;
}

.alg2026-btn-reset {
    width: 100%;
    max-width: 250px;
    margin: 28px auto 0 auto;

    padding: 12px 24px !important;
    font-size: 15px;

    border: 2px solid #002233 !important;
    background: #E4ECF0 !important;
    color: #002233 !important;
}

/* ============================================================
   6. ERGEBNISBEREICH
=============================================================== */

#alg2026-result {
    margin-top: 35px;
    padding: 25px;
    background: #fff;
    border: 2px solid #940028;
    border-radius: 8px;
}

#alg2026-result h3 {
    font-size: 22px;
    color: #940028;
    padding-bottom: 10px;
    border-bottom: 2px solid #940028;
}

.alg2026-result-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.alg2026-result-row label {
    margin-bottom: 6px;
    font-weight: 600;
}

.alg2026-result-row input {
    background: #f5f5f5;
    border: 1px solid #ccc;
    padding: 12px;
    font-family: "Courier New", monospace;
    border-radius: 2px !important;
    font-size: 16px;
    text-align: right;
}

.alg2026-result-value-highlight {
    background: #fff9c4 !important;
    border: 2px solid #002233 !important;
    border-radius: 2px !important;
    font-weight: 700;
    font-size: 18px !important;
}

/* ============================================================
   7. WARNBOXEN
=============================================================== */

.alg2026-warning-box {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 6px;
    margin-top: 25px;
    font-size: 15px;
}

.alg2026-warning-box img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.alg2026-warn-critical {
    background: #ffe9e9;
    border-left: 5px solid #d32f2f;
    color: #b71c1c;
}

.alg2026-warn-medium {
    background: #e3f2fd;
    border-left: 5px solid #1976d2;
    color: #0d47a1;
}

.alg2026-warn-ok {
    background: #e8f5e9;
    border-left: 5px solid #388e3c;
    color: #1b5e20;
}

@media (max-width: 480px) {
    .alg2026-warning-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .alg2026-warning-box div {
        padding: 0 8px;
    }

    .alg2026-warning-box img {
        margin-bottom: 12px;
    }
}

/* ============================================================
   8. FOOTER-LINK
=============================================================== */

.alg2026-footer-row {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.alg2026-extlink {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    text-decoration: none !important;
}

.alg2026-exttext {
    font-weight: 600;
    text-decoration: underline;
    position: relative;
    cursor: pointer;
}

.alg2026-exttext:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;

    background: #002233;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.alg2026-exticon {
    width: 18px !important;
    height: 14px !important;
}

@media (max-width: 1024px) {
    .alg2026-exttext:hover::after {
        left: -40px;
    }
}

@media (max-width: 480px) {
    .alg2026-footer-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
}

/* ============================================================
   9. RESPONSIVE FORMULAR
=============================================================== */

@media (min-width: 600px) {

    .alg2026-row {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .alg2026-row label {
        width: 45%;
        margin-bottom: 0;
    }

    .alg2026-input-wrap,
    .alg2026-row select {
        width: 55%;
    }

    .alg2026-result-row {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .alg2026-result-row label {
        width: 45%;
    }

    .alg2026-result-row input {
        width: 55%;
    }
}

/* ============================================================
   10. ACCESSIBILITY & PRINT
=============================================================== */

*:focus-visible {
    outline: 2px solid #940028;
    outline-offset: 2px;
}

@media print {
    .alg2026-btn-auto,
    .alg2026-btn-reset,
    .alg2026-info-btn,
    .alg2026-infobox,
    .alg2026-extlink {
        display: none !important;
    }
}
