/* Allgemeine Stile */
body {
    font-family: sans-serif;
    line-height: 1.5;
    margin: 2em;
}
h1 small {
    font-size: 0.5em;
    font-weight: normal;
    color: #555;
}

/* Stile für den Eingabebereich */
.controls {
    margin-bottom: 2em;
    padding: 1.5em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.controls > div {
    margin-bottom: 1.5em;
}

.week-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

/* Kleinere Schrift für Wochen-Labels */
.week-selectors label {
    font-size: 0.8em;
}

/* Mehr Abstand für den Wochen-Container */
#wochentage-fields > div:last-child {
    margin-top: 2.5em;
}

input[type="text"], textarea, input[type="date"], select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 95%;
    max-width: 500px;
}

textarea {
    height: 150px;
    resize: vertical;
}

input[type="date"] {
     width: 200px;
}

button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}
button:disabled {
    background-color: #555;
    cursor: not-allowed;
}

/* Container for PDF content. Hidden from view but available for rendering. */
#pdf-render-area {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1123px; /* A4 landscape width in pixels for rendering */
}
#pdf-content {
     background: white;
     padding: 20px;
}

/* Styles for the content inside the PDF render area */
#pdf-content h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 1em;
}
#pdf-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    table-layout: fixed;
}
#pdf-content th, #pdf-content td {
    border: 1px solid #ddd;
    padding: 2px 8px;
    text-align: left;
    position: relative;
    height: 20px;
}
#pdf-content td:first-child {
    display: flex;
    align-items: center; /* Vertical centering for name */
}
/* Column widths */
#pdf-content td:first-child, #pdf-content th:first-child { width: 135px; font-weight: bold; }
#pdf-content th.date-header { width: 35px; }

#pdf-content thead th.date-header {
    height: 85px;
    padding: 0;
}
/* Date alignment fix */
#pdf-content thead th.date-header > span {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    white-space: nowrap;
}
/* 3x higher header for empty lists */
#pdf-content table.empty-list thead th {
     height: 60px; /* 3x the normal row height of 20px */
}

#pdf-content thead th:first-child {
    background-color: #fff;
    border: none;
}
#pdf-content tbody tr:nth-child(odd) { background-color: #e9e9e9; }
#pdf-content tbody tr:nth-child(even) { background-color: #ffffff; }
#pdf-content .week-separator { border-right: 3px solid #999; }
