.cs-calculator-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.cs-customer-type-selector {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f0f9ff;
    border-radius: 8px;
    border: 2px solid #0ea5e9;
}

.cs-customer-type-selector p {
    margin: 0 0 1rem 0;
    font-size: 1.1em;
    color: #0369a1;
}

.cs-customer-type-selector label {
    display: inline-block;
    margin-right: 2rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #0ea5e9;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cs-customer-type-selector label:hover {
    background: #e0f2fe;
}

.cs-customer-type-selector input[type="radio"] {
    margin-right: 0.5rem;
}

.cs-customer-type-selector input[type="radio"]:checked + * {
    color: #0ea5e9;
}

.cs-customer-type-selector label:has(input[type="radio"]:checked) {
    background: #0ea5e9;
    color: white;
    border-color: #0284c7;
}

/* Fallback for browsers without :has() support */
.cs-customer-type-selector input[type="radio"]:checked {
    accent-color: #0ea5e9;
}

.cs-customer-type-selector .cs-selected-type {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #dbeafe;
    border-radius: 6px;
    font-size: 0.95em;
    color: #0369a1;
}

.cs-items-container {
    margin-bottom: 2rem;
}

.cs-item-wrapper {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    position: relative;
    transition: all 0.3s ease;
}

.cs-item-wrapper:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.cs-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cs-item h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1.1em;
    flex: 1;
}

.cs-item-price-display {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #eff6ff;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.cs-price-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.cs-unit-price,
.cs-total-price {
    font-size: 0.95em;
    color: #1e40af;
}

.cs-unit-price strong,
.cs-total-price strong {
    color: #1e3a8a;
    font-size: 1.1em;
}

/* Zusatzkosten Falten – neben Einzelpreis/Gesamt sichtbar */
.cs-falten-surcharge {
    font-size: 0.9em;
    color: #0369a1;
    white-space: normal;
}

/* Eigene Zeile „Zusatzkosten Falten“ in der Preisanzeige-Box */
.cs-falten-zusatzkosten-box {
    display: block !important;
    margin-top: 0.5rem;
    padding: 0.35rem 0;
    border-top: 1px solid #bfdbfe;
    font-size: 0.95em;
    color: #0369a1;
}

.cs-price-loading {
    color: #6b7280;
    font-style: italic;
}

.cs-price-error {
    color: #dc2626;
    font-size: 0.9em;
}

.cs-item label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #374151;
}

.cs-item input[type="number"],
.cs-item select {
    width: 100%;
    max-width: 300px;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95em;
}

.cs-item input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.cs-remove-item {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.cs-remove-item:hover {
    background: #b91c1c;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.cs-remove-item:active {
    transform: scale(0.95);
}

.cs-remove-icon {
    font-size: 24px;
    line-height: 1;
    font-weight: bold;
    display: block;
}

.cs-add-item-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #eff6ff;
    border-radius: 8px;
}

.cs-add-item-section select {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    font-size: 1em;
}

.cs-discount-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 8px;
}

.cs-discount-section label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.cs-discount-section input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid #f59e0b;
    border-radius: 6px;
}

.cs-calculate-section {
    margin-bottom: 2rem;
    text-align: center;
}

.cs-results-section {
    margin-top: 2rem;
    padding: 2rem;
    background: #f0fdf4;
    border-radius: 8px;
    border: 2px solid #10b981;
}

.cs-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.cs-results-table th,
.cs-results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #d1d5db;
}

.cs-results-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.cs-results-table tfoot tr {
    background: #f9fafb;
}

.cs-results-table .cs-total-row {
    background: #dbeafe;
    font-size: 1.1em;
}

.cs-results-table .cs-total-row td {
    border-top: 2px solid #2563eb;
    padding-top: 1rem;
}

.cs-standard-format,
.cs-custom-size {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.cs-custom-size {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cs-custom-size label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cs-custom-size input[type="number"] {
    width: 100%;
    max-width: 200px;
}

.cs-size-info {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f0f9ff;
    border-radius: 4px;
    color: #0369a1;
    font-size: 0.85em;
}

.cs-size-info small {
    display: block;
}

.cs-stundensatz-info {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f0fdf4;
    border-radius: 4px;
    color: #166534;
    font-size: 0.9em;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .cs-calculator-container {
        padding: 1rem;
    }

    .cs-add-item-section {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-add-item-section select {
        max-width: 100%;
    }
    
    .cs-custom-size input[type="number"] {
        max-width: 100%;
    }
}

/* Druckansicht: nur Ergebnisbereich anzeigen */
@media print {
    body * {
        visibility: hidden;
    }
    .cs-results-section,
    .cs-results-section * {
        visibility: visible;
    }
    .cs-results-section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        background: #fff;
    }
    .cs-pdf-download-wrap,
    .cs-pdf-download-wrap * {
        visibility: hidden !important;
        display: none !important;
    }
}

/* Contact / Impressum page (shortcode cs_contact_page) */
.cs-contact-page a:hover {
    text-decoration: underline;
}
@media (max-width: 640px) {
    .cs-contact-page {
        padding: 1rem !important;
    }
}
