/* === Grundlayout === */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6fb;
  color: #333;
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #2d4fa0;
}

/* === Kinderverwaltung === */
#childBar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

#childBar select {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95em;
  background: #fafafa;
}

/* === Buttons allgemein === */
.iconBtn {
  cursor: pointer;
  border: none;
  background: #e7efff;
  color: #1a3fa0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.9em;
  transition: background 0.2s ease, transform 0.1s ease;
}

.iconBtn:hover {
  background: #d5e3ff;
  transform: translateY(-1px);
}

/* === Tabelle === */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  border: 1px solid #cfd6e6;
  padding: 8px;
  text-align: center;
  vertical-align: top;
}

th {
  background: #2d6cdf;
  color: #fff;
  font-weight: 600;
  font-size: 0.95em;
}

td {
  background: #fff;
  transition: background 0.2s ease;
}

td:hover {
  background: #f2f6ff;
}

/* === Inline-Aufgabenzeile === */
/* === Aufgabenzeile bleibt auf einer Linie === */
.taskLine {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  justify-content: flex-start;
  flex-wrap: nowrap;             /* Kein Umbruch unter Checkbox */
  text-align: left;
}
/* === Kleine Inline-Buttons für Aufgaben === */
.taskLine .tinyBtn {
  background: #edf2ff;
  color: #274b9f;
  border: 1px solid #c7d5f4;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.7em;
  line-height: 1em;
  height: 18px;
  min-width: 18px;
  vertical-align: middle;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.taskLine .tinyBtn:hover {
  background: #dce6ff;
  transform: scale(1.05);
}

/* === Kleiner Button für "Aufgabe" === */
.smallTaskBtn {
  background: #edf2ff;
  color: #274b9f;
  border: 1px solid #c7d5f4;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.75em;
  line-height: 1em;
  height: 22px;
  min-width: 55px;
  margin-top: 4px;
}

.smallTaskBtn:hover {
  background: #dce6ff;
  transform: scale(1.04);
}

/* === Papierkorb in Fachspalte === */
td:first-child button.iconBtn {
  display: block;
  margin: 6px auto;
  padding: 3px 5px;
  height: 22px;
  min-width: 22px;
}

/* === Notizfeld === */
textarea.note {
  width: 95%;
  margin-top: 6px;
  padding: 5px;
  font-size: 0.85em;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fafafa;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea.note:focus {
  outline: none;
  border-color: #2d6cdf;
  box-shadow: 0 0 3px rgba(45, 108, 223, 0.3);
}

/* === Fachname === */
td span[contenteditable="true"] {
  display: inline-block;
  min-width: 80px;
  border-bottom: 1px dashed transparent;
}

td span[contenteditable="true"]:focus {
  border-bottom: 1px dashed #2d6cdf;
  outline: none;
}

/* === Checkboxen === */
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2d6cdf;
  margin-right: 4px;
}

/* === Links & Audio === */
td a {
  color: #2d6cdf;
  text-decoration: none;
  font-size: 0.9em;
}
td a:hover { text-decoration: underline; }

audio { display: none; }

/* === Druck === */
@media print {
  #childBar, #addSubjectBtn, footer {
    display: none;
  }
  body {
    background: white;
    color: black;
    box-shadow: none;
    margin: 0;
  }
  table {
    border: 1px solid #999;
    box-shadow: none;
  }
  th {
    background: #e9eef9;
    color: #000;
  }
  td button, td input[type="checkbox"] {
    display: none;
  }
  textarea.note {
    border: none;
    background: transparent;
  }
}
/* === Kleinere Schrift für Fachnamen === */
td span[contenteditable="true"] {
  display: inline-block;
  min-width: 80px;
  border-bottom: 1px dashed transparent;
  font-size: 0.8em;              /* kleinere Schriftgröße */
  font-weight: 500;
}

/* === Kleinere Schrift für Aufgabenbezeichnung === */
/* === Aufgabentext: umbrechen nur innerhalb des Texts, nicht auf neue Flex-Zeile === */
.taskLine span[contenteditable="true"] {
  flex: 1;                       /* nutzt verbleibenden Platz */
  font-size: 0.8em;
  font-weight: 500;
  text-align: left;
  word-break: break-word;        /* Text kann umbrechen */
  white-space: normal;           /* erlaubt Zeilenumbruch im Text selbst */
  overflow-wrap: anywhere;
}

/* === Fachname linksbündig === */
td:first-child {
  text-align: left;
  padding-left: 10px;
}

/* === Aufgabenzeilen linksbündig === */
.taskLine {
  justify-content: flex-start;
  text-align: left;
}

/* === Aufgabentext linksbündig, kein extra Einrücken === */
.taskLine span[contenteditable="true"] {
  text-align: left;
  display: inline-block;
  min-width: 60px;
}
