/**
 * Slush Kalkulator 2026 - Styles
 * Version 1.1 - Besseres UI
 */

/* =========================================================================
   GRUNDLAYOUT
   ========================================================================= */

.slush-kalkulator-wrap {
    font-family: Arial, sans-serif;
    max-width: 100%;
    line-height: 1.5;
}

.slush-kalkulator-wrap h2 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.slush-kalkulator-wrap .intro-text {
    color: #555;
    margin-bottom: 20px;
}

/* =========================================================================
   FORMULAR
   ========================================================================= */

.slush-kalkulator-wrap fieldset {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ccc;
}

.slush-kalkulator-wrap legend {
    font-weight: bold;
    padding: 0 10px;
}

.slush-kalkulator-wrap .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 10px;
}

.slush-kalkulator-wrap .form-group {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
}

.slush-kalkulator-wrap label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

.slush-kalkulator-wrap input[type="text"],
.slush-kalkulator-wrap input[type="date"],
.slush-kalkulator-wrap select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.slush-kalkulator-wrap input:focus,
.slush-kalkulator-wrap select:focus {
    outline: none;
    border-color: #666;
}

.slush-kalkulator-wrap small {
    color: #666;
    font-size: 12px;
}

.slush-kalkulator-wrap hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #ccc;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */

.slush-kalkulator-wrap .form-buttons {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.slush-kalkulator-wrap .btn {
    padding: 10px 20px;
    margin-right: 10px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.slush-kalkulator-wrap .btn:hover {
    background: #e0e0e0;
}

.slush-kalkulator-wrap input[type="submit"].btn {
    background: #4a90d9;
    color: white;
    border-color: #3a7bc8;
}

.slush-kalkulator-wrap input[type="submit"].btn:hover {
    background: #3a7bc8;
}

.slush-kalkulator-wrap input[type="submit"].btn.has-unsaved {
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.25);
}

.slush-kalkulator-wrap .unsaved-indicator {
    background: #fff4d6;
    border: 1px solid #f0c36d;
    color: #7a4f01;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.slush-kalkulator-wrap .update-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #555;
}

/* =========================================================================
   INFO-BOX (Hinweisbox Kommission)
   ========================================================================= */

.slush-kalkulator-wrap .info-box {
    background: #e8f4fc;
    border: 1px solid #b8d4e8;
    border-left: 4px solid #4a90d9;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 3px;
}

.slush-kalkulator-wrap .info-box strong {
    display: block;
    margin-bottom: 10px;
    color: #2c5282;
}

.slush-kalkulator-wrap .info-box ul {
    margin: 0;
    padding-left: 20px;
}

.slush-kalkulator-wrap .info-box li {
    margin-bottom: 5px;
    color: #444;
}

.slush-kalkulator-wrap .info-box li:last-child {
    margin-bottom: 0;
}

/* =========================================================================
   LEISTUNGSÜBERSICHT (Summary)
   ========================================================================= */

.slush-kalkulator-wrap .summary {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 3px;
}

.slush-kalkulator-wrap .summary ul {
    margin: 0;
    padding-left: 20px;
}

.slush-kalkulator-wrap .summary li {
    margin-bottom: 5px;
}

.slush-kalkulator-wrap .summary li:last-child {
    margin-bottom: 0;
}

/* =========================================================================
   KOSTENÜBERSICHT TABELLE (Haupttabelle)
   ========================================================================= */

.slush-kalkulator-wrap .table-wrap {
    overflow-x: auto;
    margin: 20px 0;
}

.slush-kalkulator-wrap .cost-overview {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #000;
    font-size: 14px;
}

.slush-kalkulator-wrap .cost-overview th,
.slush-kalkulator-wrap .cost-overview td {
    border: 1px solid #000;
    padding: 12px 15px;
    text-align: center;
}

.slush-kalkulator-wrap .cost-overview th {
    background: #f0f0f0;
    font-weight: bold;
}

.slush-kalkulator-wrap .cost-overview th:last-child {
    width: 100px;
}

.slush-kalkulator-wrap .cost-overview td:first-child {
    text-align: left;
    font-weight: bold;
}

.slush-kalkulator-wrap .cost-overview .main-row:hover {
    background: #f9f9f9;
}

/* =========================================================================
   DETAILS TOGGLE BUTTON
   ========================================================================= */

.slush-kalkulator-wrap .details-toggle {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.slush-kalkulator-wrap .details-toggle:hover {
    background: #e0e0e0;
}

.slush-kalkulator-wrap .details-toggle.active {
    background: #4a90d9;
    color: white;
    border-color: #3a7bc8;
}

/* =========================================================================
   DETAIL-ZEILEN (Accordion)
   ========================================================================= */

.slush-kalkulator-wrap .details-row {
    background: #fafafa;
}

.slush-kalkulator-wrap .details-row td {
    padding: 0;
    border-top: none;
}

.slush-kalkulator-wrap .row-details {
    padding: 20px;
    text-align: left;
}

.slush-kalkulator-wrap .row-details p {
    margin: 0 0 15px 0;
}

/* =========================================================================
   KOSTENAUFSCHLÜSSELUNG (Detail-Tabelle)
   ========================================================================= */

.slush-kalkulator-wrap .cost-breakdown {
    width: 100%;
    max-width: 400px;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.slush-kalkulator-wrap .cost-breakdown td {
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #eee;
}

.slush-kalkulator-wrap .cost-breakdown td:first-child {
    text-align: left;
    font-weight: normal;
}

.slush-kalkulator-wrap .cost-breakdown td:last-child {
    text-align: right;
    width: 120px;
}

.slush-kalkulator-wrap .cost-breakdown .total-row td {
    border-top: 2px solid #333;
    border-bottom: none;
    padding-top: 12px;
}

.slush-kalkulator-wrap .row-details .note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin: 0;
}

/* =========================================================================
   LINK BEREICH & FOOTER
   ========================================================================= */

.slush-kalkulator-wrap .link-bereich {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.slush-kalkulator-wrap .link-bereich a {
    word-break: break-all;
}

.slush-kalkulator-wrap .footer-info {
    color: #666;
    font-size: 12px;
}

/* =========================================================================
   DRUCKANSICHT
   ========================================================================= */

@media print {
    @page {
        size: A4 landscape;
        margin: 0;
    }

    body {
        margin: 0;
    }

    body * {
        visibility: hidden;
    }

    .slush-kalkulator-wrap h2#ergebnis,
    .slush-kalkulator-wrap h2#ergebnis *,
    .slush-kalkulator-wrap .intro-text,
    .slush-kalkulator-wrap .intro-text *,
    .slush-kalkulator-wrap .info-box,
    .slush-kalkulator-wrap .info-box *,
    .slush-kalkulator-wrap .summary,
    .slush-kalkulator-wrap .summary *,
    .slush-kalkulator-wrap .table-wrap,
    .slush-kalkulator-wrap .table-wrap * {
        visibility: visible;
    }

    .slush-kalkulator-wrap h2#ergebnis,
    .slush-kalkulator-wrap .intro-text,
    .slush-kalkulator-wrap .info-box,
    .slush-kalkulator-wrap .summary,
    .slush-kalkulator-wrap .table-wrap {
        position: relative;
    }

    .slush-kalkulator-wrap {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        padding: 12mm;
        box-sizing: border-box;
    }

    .no-print {
        display: none !important;
    }

    .slush-kalkulator-wrap {
        font-size: 11pt;
    }

    .slush-kalkulator-wrap .cost-overview {
        page-break-inside: avoid;
    }

    .slush-kalkulator-wrap .cost-overview th,
    .slush-kalkulator-wrap .cost-overview td {
        padding: 8px;
    }

    /* Details-Toggle beim Drucken verstecken */
    .slush-kalkulator-wrap .details-toggle {
        display: none !important;
    }

    .slush-kalkulator-wrap .cost-overview th:last-child,
    .slush-kalkulator-wrap .cost-overview td:last-child {
        display: none !important;
    }

    /* Alle Detail-Zeilen beim Drucken ausblenden */
    .slush-kalkulator-wrap .details-row {
        display: none !important;
    }

    .slush-kalkulator-wrap .link-bereich,
    .slush-kalkulator-wrap .footer-info {
        display: none !important;
    }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 600px) {
    .slush-kalkulator-wrap .form-group {
        min-width: 100%;
    }

    .slush-kalkulator-wrap .cost-overview {
        font-size: 12px;
    }

    .slush-kalkulator-wrap .cost-overview th,
    .slush-kalkulator-wrap .cost-overview td {
        padding: 8px 10px;
    }

    .slush-kalkulator-wrap .info-box {
        padding: 12px 15px;
    }

    .slush-kalkulator-wrap .row-details {
        padding: 15px;
    }

    .slush-kalkulator-wrap .cost-breakdown {
        max-width: 100%;
    }

    .slush-kalkulator-wrap .details-toggle {
        padding: 8px 10px;
        font-size: 12px;
    }
}
