/* ============================================================
   Atemschutzüberwachung – Stylesheet
   Autor: Dominik Mau (https://github.com/dnickmc)
   Lizenz: CC BY 4.0
   ============================================================ */

/* ── Basis ──────────────────────────────────────────────── */
body {
    font-family: Arial, sans-serif;
    background-color: white;
}

/* ── Tabelle ────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0px;
    text-align: center;
    font-size: 20px;
    height: 30px;
}

/* ── Titelzeile ─────────────────────────────────────────── */
.table-title {
    background-color: rgb(245, 229, 7);
    font-size: 26px;
    font-weight: bold;
    padding: 6px 0;
    text-align: center;
}

/* ── Pflichtfelder (gelb) ───────────────────────────────── */
.pflicht {
    background-color: rgb(245, 229, 7);
}

.pflicht:placeholder-shown {
    background-color: #ff6666;
}

.pflichtfeld {
    border: none;
}

.beschreibbar {
    border: none;
}

/* ── Eingabefelder ──────────────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="time"],
input[type="date"] {
    width: 100%;
    height: 40px;
    padding: 0px;
    font-size: 20px;
    text-align: center;
}

input[type="time"] {
    background-color: #ff6666;
}

/* ── Rufname-Dropdown ───────────────────────────────────── */
.rufname-select {
    width: 100%;
    height: 40px;
    padding: 0px;
    font-size: 20px;
    text-align: center;
    border: 0px;
    background-color: rgb(245, 229, 7);
}

option,
optgroup {
    background-color: white;
}

/* ── Rufname-Zelle mit Toggle ───────────────────────────── */
.rufname-cell {
    padding: 0;
}

.rufname-cell select,
.rufname-cell input[type="text"] {
    display: inline-block;
    width: calc(100% - 36px);
    vertical-align: middle;
}

/* Wenn kein Toggle aktiv: volle Breite für den Select */
.rufname-cell:not(:has(.toggle-rufname)) select {
    width: 100%;
}

.toggle-rufname {
    display: inline-block;
    width: 32px;
    height: 40px;
    padding: 0;
    margin: 0 0 0 2px;
    background-color: #ddd;
    color: #333;
    border: 1px solid #aaa;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    vertical-align: middle;
}

.toggle-rufname:hover {
    background-color: #bbb;
}

/* ── Buttons ────────────────────────────────────────────── */
button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* ── Button-Leiste & Autor ──────────────────────────────── */
.button-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.author-note {
    font-size: 13px;
    color: #555;
}

.author-note a {
    color: #2c5fa8;
    text-decoration: none;
}

.author-note a:hover {
    text-decoration: underline;
}

/* ── Textarea ───────────────────────────────────────────── */
textarea {
    width: 100%;
    padding: 0px;
    resize: none;
}

/* ── Trennlinien ────────────────────────────────────────── */
.rand-unten {
    border-bottom: 2px solid #000;
}

.rand-rechts {
    border-right: 2px solid #000;
}
