.kalkulation-ergebnis {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-left: 6px solid #27B5E9;
}

.kalkulation-ergebnis h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.kosten-details p {
    margin: 10px 0;
    line-height: 1.5;
}

.kosten-details .gesamt {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    color: #2c3e50;
}

.kalkulation-info {
    background: #e9ecef;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.loading {
    text-align: center;
    padding: 1rem;
    color: #666;
}
.loading::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

button[type="submit"]:disabled {
    background-color: #cccccc;
    color: #0a0e14;
    cursor: not-allowed;
    opacity: 0.6;
}

button[type="submit"]:disabled:hover {
    background-color: #cccccc;
    box-shadow: none;
}

input[type="tel"]:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem;
}

input[type="tel"]:valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem;
}

.calculator-disclaimer {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 3px solid #27B5E9;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.calculator-disclaimer small {
    display: block;
}

/* Allgemeine Formularfeld-Styling */
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Hover-Effekt */
input:hover,
select:hover,
textarea:hover {
    border-color: #90cdf4;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Fokus-Effekt */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
    transform: translateY(-1px);
}

/* Label-Styling */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

/* Formular-Gruppen */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Pflichtfeld-Markierung */
.required::after {
    content: "*";
    color: #e53e3e;
    margin-left: 4px;
}

/* Verbesserte Fehlerzustände */
input:invalid {
    border-color: #e53e3e;
    background-color: #fff5f5;
}

/* Erfolgszustände */
input:valid {
    border-color: #38a169;
}

/* Label-Styling */
label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;    /* von 14px auf 16px erhöht */
    letter-spacing: 0.3px;
    text-transform: none;
}

/* Optional: Größere Labels für wichtige Felder */
label.important {
    font-size: 18px;    /* noch größer für wichtige Felder */
    color: #1a365d;     /* dunklere Farbe für besseren Kontrast */
}

/* Pflichtfeld-Markierung angepasst */
.required::after {
    content: "*";
    color: #e53e3e;
    margin-left: 6px;
    font-size: 18px;    /* größerer Stern */
    position: relative;
    top: 2px;           /* leicht nach oben verschoben */
}
/* Friendly styles for optional comment toggle and section */
.comment-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #27B5E9;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(39, 181, 233, 0.3);
    transition: background-color .2s ease, transform .1s ease, box-shadow .2s ease;
}
.comment-toggle-btn:hover {
    background-color: #199fd0;
    box-shadow: 0 6px 14px rgba(25, 159, 208, 0.35);
}
.comment-toggle-btn:active {
    transform: translateY(1px);
}
.comment-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 181, 233, 0.35);
}
.comment-toggle-btn .btn-icon { font-size: 1.1rem; }

.comment-section {
    background: #f9fbfd;
    border: 1px solid #e2f2fa;
    border-left: 4px solid #27B5E9;
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease;
}
.comment-section.is-open {
    opacity: 1;
    transform: translateY(0);
}
.comment-section textarea {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

/* Success message styling after submit */
.success-message {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #10b981;
    padding: 20px;
    border-radius: 8px;
    color: #065f46;
}
.success-message h3 { margin-top: 0; color: #065f46; }


/* Prominent submit button styling to stand out from the question toggle */
#submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    padding: 14px 22px;
    font-size: 1.125rem; /* slightly larger */
    line-height: 1.2;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.25);
    transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
    margin-top: 8px; /* extra separation from other controls */
}
#submit-button:hover {
    filter: brightness(1.04);
    box-shadow: 0 10px 24px rgba(32, 201, 151, 0.28);
}
#submit-button:active {
    transform: translateY(1px);
}
#submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(32, 201, 151, 0.35);
}
#submit-button:disabled {
    background: #cfd6dc !important;
    color: #0a0e14 !important;
    box-shadow: none !important;
}

@media (max-width: 576px) {
    #submit-button {
        width: 100%;
        padding: 16px 22px; /* a bit taller on mobile */
        font-size: 1.2rem;
    }
}

.kalkulation-ergebnis {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-left: 6px solid #27B5E9;
}

.kalkulation-ergebnis h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Neue, rechnungsähnliche Darstellung der Kosten */
.kosten-tabelle {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
    align-items: baseline;
    margin-top: 10px;
}
.kosten-zeile {
    display: contents; /* erlaubt grid für semantische Unterelemente */
}
.kosten-tabelle .bezeichnung {
    color: #334155;
}
.kosten-tabelle .betrag {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    white-space: nowrap;
}
.kosten-tabelle .total .bezeichnung {
    font-weight: 700;
    color: #0f172a;
}
.kosten-tabelle .total .betrag {
    font-weight: 800;
    position: relative;
    padding-top: 8px;
}
/* Trennstrich nur über der Breite der Beträge-Spalte */
.kosten-tabelle .total .betrag::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 0;
    border-top: 2px solid #e2e8f0;
}

/* Vorherige Absatzdarstellung optional entschärfen */
.kosten-details p { margin: 6px 0; }
.kosten-details .gesamt { border-top: none; padding-top: 0; }

.loading {
    text-align: center;
    padding: 1rem;
    color: #666;
}
.loading::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

button[type="submit"]:disabled {
    background-color: #cccccc;
    color: #0a0e14;
    cursor: not-allowed;
    opacity: 0.6;
}

button[type="submit"]:disabled:hover {
    background-color: #cccccc;
    box-shadow: none;
}

input[type="tel"]:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem;
}

input[type="tel"]:valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem;
}

.calculator-disclaimer {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 3px solid #27B5E9;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.calculator-disclaimer small {
    display: block;
}

/* Allgemeine Formularfeld-Styling */
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Hover-Effekt */
input:hover,
select:hover,
textarea:hover {
    border-color: #90cdf4;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Fokus-Effekt */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
    transform: translateY(-1px);
}

/* Label-Styling */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

/* Formular-Gruppen */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Pflichtfeld-Markierung */
.required::after {
    content: "*";
    color: #e53e3e;
    margin-left: 4px;
}

/* Verbesserte Fehlerzustände */
input:invalid {
    border-color: #e53e3e;
    background-color: #fff5f5;
}

/* Erfolgszustände */
input:valid {
    border-color: #38a169;
}

/* Label-Styling */
label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;    /* von 14px auf 16px erhöht */
    letter-spacing: 0.3px;
    text-transform: none;
}

/* Optional: Größere Labels für wichtige Felder */
label.important {
    font-size: 18px;    /* noch größer für wichtige Felder */
    color: #1a365d;     /* dunklere Farbe für besseren Kontrast */
}

/* Pflichtfeld-Markierung angepasst */
.required::after {
    content: "*";
    color: #e53e3e;
    margin-left: 6px;
    font-size: 18px;    /* größerer Stern */
    position: relative;
    top: 2px;           /* leicht nach oben verschoben */
}
/* Friendly styles for optional comment toggle and section */
.comment-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #27B5E9;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(39, 181, 233, 0.3);
    transition: background-color .2s ease, transform .1s ease, box-shadow .2s ease;
}
.comment-toggle-btn:hover {
    background-color: #199fd0;
    box-shadow: 0 6px 14px rgba(25, 159, 208, 0.35);
}
.comment-toggle-btn:active {
    transform: translateY(1px);
}
.comment-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 181, 233, 0.35);
}
.comment-toggle-btn .btn-icon { font-size: 1.1rem; }

.comment-section {
    background: #f9fbfd;
    border: 1px solid #e2f2fa;
    border-left: 4px solid #27B5E9;
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease;
}
.comment-section.is-open {
    opacity: 1;
    transform: translateY(0);
}
.comment-section textarea {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

/* Success message styling after submit */
.success-message {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #10b981;
    padding: 20px;
    border-radius: 8px;
    color: #065f46;
}
.success-message h3 { margin-top: 0; color: #065f46; }


/* Prominent submit button styling to stand out from the question toggle */
#submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    padding: 14px 22px;
    font-size: 1.125rem; /* slightly larger */
    line-height: 1.2;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.25);
    transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
    margin-top: 8px; /* extra separation from other controls */
}
#submit-button:hover {
    filter: brightness(1.04);
    box-shadow: 0 10px 24px rgba(32, 201, 151, 0.28);
}
#submit-button:active {
    transform: translateY(1px);
}
#submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(32, 201, 151, 0.35);
}
#submit-button:disabled {
    background: #cfd6dc !important;
    color: #0a0e14 !important;
    box-shadow: none !important;
}

@media (max-width: 576px) {
    #submit-button {
        width: 100%;
        padding: 16px 22px; /* a bit taller on mobile */
        font-size: 1.2rem;
    }
}

/* Width constraints and alignment improvements */
.kalkulation-ergebnis {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact card styling to match calculator card */
#kontakt-felder.kontakt-card {
    max-width: 880px;
    margin: 20px auto;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-left: 6px solid #27B5E9;
}
#kontakt-felder.kontakt-card > h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2c3e50;
}

/* Horizontal label layout inside the contact form */
#kontakt-felder .horizontal-form .col-md-6 {
    display: grid;
    grid-template-columns: 220px 1fr;
    column-gap: 16px;
    row-gap: 14px;
    align-items: center;
}
#kontakt-felder .horizontal-form label {
    margin: 0; /* remove bottom margin in horizontal layout */
    align-self: center;
}
#kontakt-felder .horizontal-form .form-control {
    width: 100%;
}

/* Responsive: stack labels above fields on smaller screens */
@media (max-width: 768px) {
    #kontakt-felder .horizontal-form .col-md-6 {
        display: block;
    }
    #kontakt-felder .horizontal-form label {
        display: block;
        margin-bottom: 6px;
    }
    #kontakt-felder .horizontal-form .form-control {
        margin-bottom: 12px;
    }
}
