/* css/pdf-style.css */

/* Dieses CSS wird NUR angewendet, wenn wir das PDF generieren */

.pdf-container {
    background-color: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif; /* Standard Schrift für Rechnungen */
    width: 210mm;
    min-height: 297mm;
    padding: 20mm; /* Standard Rand */
    box-sizing: border-box;
    position: absolute;
    left: -9999px;
    top: 0;
    font-size: 10pt;
    line-height: 1.3;
}

/* --- KOPFZEILE (Logo & Firmendaten) --- */
.pdf-header-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    height: 40mm; /* Feste Höhe für Kopf */
}

.pdf-logo-box {
    width: 40%;
}
.pdf-logo-box img {
    max-width: 100%;
    max-height: 35mm;
    object-fit: contain;
}

.pdf-company-header {
    width: 35%;
    text-align: right;
    font-size: 8pt;
    color: #333;
}
.pdf-company-header strong {
    font-size: 11pt;
    color: #000;
}

/* --- ADRESSFELD & META DATEN --- */
.pdf-address-meta-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10mm;
    margin-bottom: 20mm;
}

.pdf-address-field {
    width: 85mm; /* Fensterbriefumschlag Maß */
    font-size: 11pt;
}
.pdf-sender-line {
    font-size: 7pt;
    text-decoration: underline;
    margin-bottom: 5mm;
    color: #555;
}

.pdf-meta-block {
    width: 70mm;
    text-align: right;
}
.pdf-meta-table {
    width: 100%;
    font-size: 10pt;
}
.pdf-meta-table td {
    padding-bottom: 2px;
}
.pdf-meta-label {
    font-weight: bold;
    text-align: left;
}
.pdf-meta-value {
    text-align: right;
}

/* --- TITEL --- */
.pdf-title {
    font-size: 16pt;
    font-weight: bold;
    margin-bottom: 5mm;
    border-bottom: 2px solid #000; /* Linie wie im Foto */
    padding-bottom: 2mm;
    display: inline-block;
    width: 100%;
}

/* --- FAHRZEUG DATEN LEISTE (Optimiert) --- */
.pdf-vehicle-bar {
    background-color: #eee;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 2mm 0;
    font-size: 9pt;
    margin-bottom: 10mm;
    width: 100%;
}

.pdf-vehicle-table {
    width: 100%;
    border-collapse: collapse;
}

.pdf-vehicle-table td {
    padding: 2px 5px;
    vertical-align: middle;
}

/* Spaltenbreiten für exakte Verteilung */
.veh-col-label { width: 12%; font-weight: bold; }
.veh-col-val-short { width: 20%; }
.veh-col-val-long { width: 30%; }

/* --- TABELLE --- */
.pdf-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10mm;
    font-size: 10pt;
}
.pdf-items-table th {
    border-bottom: 1px solid #000;
    text-align: left;
    padding: 5px 0;
    font-weight: bold;
}
.pdf-items-table td {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}
/* Spaltenbreiten analog Foto */
.pdf-col-pos { width: 10%; }
.pdf-col-desc { width: 50%; }
.pdf-col-qty { width: 10%; text-align: center; }
.pdf-col-price { width: 15%; text-align: right; }
.pdf-col-total { width: 15%; text-align: right; }

/* --- SUMMENBLOCK --- */
.pdf-totals-block {
    width: 50%;
    margin-left: auto; /* Nach rechts schieben */
    font-size: 10pt;
}
.pdf-totals-table {
    width: 100%;
}
.pdf-totals-table td {
    padding: 3px 0;
    text-align: right;
}
.pdf-total-final {
    font-size: 12pt;
    font-weight: bold;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000; /* Doppel-Linie Effekt simulieren */
    padding: 5px 0;
}

/* --- ZAHLUNGSBEDINGUNG --- */
.pdf-payment-text {
    margin-top: 10mm;
    font-size: 9pt;
}

/* --- FUSSZEILE (Bankdaten) --- */
.pdf-footer {
    position: absolute;
    bottom: 15mm;
    left: 20mm;
    right: 20mm;
    border-top: 1px solid #000;
    padding-top: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 8pt;
}
.pdf-footer-col {
    width: 30%;
}
.pdf-footer-col strong {
    display: block;
    margin-bottom: 2px;
    font-size: 9pt;
}