/* Styling für die Bildschirmansicht */
.lama-ausleihformular {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    border: 1px solid #eee;
    background: white;
    line-height: 1.4;
	justify-content: self;
}

.lama-ausleihformular .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.lama-ausleihformular .print-value {
        display: inline-block;
        min-width: 10px;
        color: #000 !important;
}

/* Container für die Zeile */
.lama-ausleihformular .full-row {
    display: flex;
    align-items: flex-end; /* Richtet Text und Linie an der Grundlinie aus */
    gap: 10px;             /* Abstand zwischen Label und Linie */
    margin-bottom: 12px;   /* Abstand zur nächsten Zeile */
    width: 100%;
}

/* Das Label (der Text links) */
.lama-ausleihformular .label {
    font-weight: bold;
    white-space: nowrap;   /* Verhindert, dass das Label umbricht */
}

/* Die Linie mit dem Wert */
.lama-ausleihformular .input-field {
    flex-grow: 1;          /* Zwingt die Linie, den Rest der Zeile auszufüllen */
    border-bottom: 1pt solid #000;
    min-height: 20px;
    padding-left: 5px;     /* Kleiner Abstand des Wertes vom Label */
	line-height: 1.4;
}

.lama-ausleihformular .checkbox-rect {
    width: 20px;
    height: 20px;
    border: 1px solid #000;
}

.lama-ausleihformular .check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;             /* Nutzt die volle Breite des Formulars */
    max-width: 100%;         /* Oder ein fester Wert, falls sie nicht ganz rechts kleben sollen */
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 0.5pt dotted #ccc; /* Optional: eine feine Hilfslinie zwischen den Zeilen */
}

.lama-ausleihformular .checkbox-box {
    width: 18px;
    height: 18px;
    border: 1.5pt solid #000 !important; /* !important für den Druck */
    display: flex;
    align-items: center;
    justify-content: center;
	flex-shrink: 0;          /* Verhindert, dass die Box bei langem Text gequetscht wird */
    margin-left: 20px;       /* Mindestabstand zum Text */
    font-weight: bold;
    font-family: Arial, sans-serif;
    background-color: #fff !important;
}

.print-button {
    background: #222;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
}

/* Text-Spiegelung im Web verstecken */
.lama-ausleihformular .print-only-value {
    display: none;
}

/* Eingabefeld schick machen (kein klobiger Rahmen) */
.lama-ausleihformular .screen-only-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    margin: 0;
    outline: none;
}

/* --- DIE PRINT-MAGIE --- */
@media print {
    /* 1. Alles auf der Seite unsichtbar machen, aber nicht mit display:none löschen */
    body * {
        visibility: hidden !important;
    }

    /* 2. Nur das Formular und ALLE seine Kinder wieder sichtbar machen */
    .lama-ausleihformular,
    .lama-ausleihformular * {
        visibility: visible !important;
    }

    /* 3. Das Formular absolut positionieren, damit es den Platz der unsichtbaren Elemente einnimmt */
    .lama-ausleihformular {
        position: fixed !important; /* Fixed zwingt es auf die erste Seite oben links */
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        z-index: 9999999 !important; /* Über alles andere legen */
    }

    /* 4. Fix für die Linien (Borders werden oft verschluckt) */
    .lama-ausleihformular .input-field {
        border-bottom: 1.5pt solid #000 !important;
        display: block !important;
        min-height: 25px !important;
    }

	.lama-ausleihformular .checkbox-box {
        /* Erzwingt den Rahmen, falls der Browser ihn ignoriert */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
	
	.lama-ausleihformular .check-item {
        display: flex !important;
        justify-content: space-between !important;
    }
	
	/* Das tippbare Eingabefeld für den Drucker komplett löschen */
    .lama-ausleihformular .screen-only-input {
        display: none !important;
    }

    /* Das gespiegelte Text-Span einblenden */
    .lama-ausleihformular .print-only-value {
        display: inline-block !important;
        font-weight: bold !important;
        color: #000 !important;
    }
	
	/* Struktur & Linie erhalten */
    .lama-ausleihformular .form-line {
        display: flex !important;
    }
	
    /* 5. Seitenränder definieren */
    @page {
        size: A4;
        margin: 1.5cm;
    }

    /* 6. WordPress Admin Bar und Buttons verstecken */
    #wpadminbar, .no-print {
        display: none !important;
    }
}