:root {
    --eregen-accent: #868F1E;
}

/* Hintergrundbild wie Validator: <img> statt CSS (LCP/SEO). Bild nur als Hintergrund, Formular darüber. */
.eregen-form-container {
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Wrapper absolut – nimmt kein Platz im Fluss, Höhe kommt nur vom Formular */
.eregen-form-container .eregen-form-bg-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.eregen-form-container .eregen-form-bg-wrap .eregen-form-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

.eregen-form-container .eregen-form-content {
    position: relative;
    z-index: 1;
}

#invoiceForm {
    background-color: rgba(255, 255, 255, 0.6);
}

html, body {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
textarea,
select {
    background-color: #f3f4f6;
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
    border-radius: 0.25rem;
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: none;
    border: none;
    background-color: #e5e7eb;
}

table th {
    background-color: #ffffff;
    color: #6b7280;
}

table {
    width: 100%;
    border-collapse: collapse;
}

input {
    width: 100%;
    min-width: 0 !important;
}

@media (max-width: 640px) {
    td input {
        min-width: 120px;
    }

    table th,
    table td {
        padding: 0.5rem;
    }

    .form-input {
        padding: 0.5rem 0.75rem;
    }
}

.flatpickr-day.selected {
    background-color: var(--eregen-accent) !important;
    color: white !important;
    border-radius: 50%;
}

.flatpickr-day.today.selected {
    background-color: var(--eregen-accent) !important;
    color: white !important;
}

/* Auszeichnungsfarbe: Buttons, Checkboxen, Radios */
#invoiceForm .eregen-btn-primary,
button.eregen-btn-primary {
    background-color: var(--eregen-accent) !important;
    color: white !important;
}

#invoiceForm .eregen-btn-primary:hover,
button.eregen-btn-primary:hover {
    background-color: #000 !important;
    color: white !important;
}

#invoiceForm input[type="checkbox"],
#invoiceForm input[type="radio"] {
    accent-color: var(--eregen-accent);
}

.eregen-accent-text {
    color: var(--eregen-accent);
}

#invoiceForm input:not([type="file"]),
#invoiceForm select,
#invoiceForm textarea {
    background-color: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    border-radius: .375rem !important;
    padding: .5rem !important;
}

.required-error {
    background-color: #ffecec !important;
    border-color: #ff9a9a !important;
    position: relative;
}

.required-error::after {
    content: "⚠";
    color: #c00;
    font-size: 18px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.qty-field {
    max-width: 80px !important;
    text-align: center;
}

.unit-field {
    max-width: 90px !important;
}

.price-field {
    max-width: 110px !important;
    text-align: right;
}

.sum-field {
    text-align: right;
    font-weight: bold;
    white-space: nowrap;
}

.action-field {
    width: 28px !important;
    text-align: center;
    padding: 0;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.tax-mini {
    width: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    text-align: center;
}

