/* === Grundlayout kompakt === */
html, body { height: 100%; }
body {
  font-family: Arial, sans-serif;
  background: #f6f6f6;
  margin: 10px;
  font-size: 15px;
  color: #111;
}

/* === 2-Spalten-Layout === */
.layout-2col {
  display: grid;
  grid-template-columns: 4fr 4fr; /* kannst du bei Bedarf anpassen */
  gap: 12px;
  align-items: start;
}
.col-table { min-width: 0; }
.col-news  { min-width: 0; }

/* Überschrift */
h2 {
  margin: 0 0 6px 0;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
}

/* Nachrichtenboxen */
.msg-box {
  border: 1px solid #ccc;
  background: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  min-height: 90px;
  box-shadow: 0 0 4px rgba(0,0,0,0.05);
}
.msg-box h3 { margin: 0 0 4px 0 }

/* === Tabelle === */
.table-wrap { width: 100%; overflow-x: auto; }

.vplan-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.08);
  font-size: .85rem;
  margin: 0 0 6px 0;
}

.vplan-table th,
.vplan-table td {
  border: 1px solid #8a8a8a;
  padding: 2px 6px;
  line-height: 1.2;
  text-align: left;
  vertical-align: middle;
}

/* Kopf + Zebra */
.vplan-table th { background: #d6d6d6ff; }
.vplan-table tbody tr:nth-child(even) { background: #ededed; }

/* Gruppenzeile für Schulart-Blöcke */
.vplan-table tr.group-row td {
  background: #bcbcbc;
  font-weight: 700;
  text-align: center;
  padding: 3px 2px;
  font-size: 1rem;
}

/* Klasse = Spalten 1 und 2 grau */
.vplan-table thead th:nth-child(1),
.vplan-table tbody td:nth-child(1) {
  background: #d6d6d6ff;
}

/* Spalten 1–7: einzeilig */
.vplan-table thead th:nth-child(-n+7),
.vplan-table tbody td:nth-child(-n+7) {
  white-space: nowrap;
}

/* Info-Spalte: darf umbrechen */
.vplan-table thead th:nth-child(9),
.vplan-table tbody td:nth-child(9) { /* keine feste Breite */ }

.col-info {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 100px;
}

/* Zentrierungen (Std., Ver., Fach, Raum, Abw., Art, Info) */
.vplan-table thead th:nth-child(2),
.vplan-table tbody td:nth-child(2),
.vplan-table thead th:nth-child(3),
.vplan-table tbody td:nth-child(3),
.vplan-table thead th:nth-child(4),
.vplan-table tbody td:nth-child(4),
.vplan-table thead th:nth-child(5),
.vplan-table tbody td:nth-child(5),
.vplan-table thead th:nth-child(6),
.vplan-table tbody td:nth-child(6),
.vplan-table thead th:nth-child(7),
.vplan-table tbody td:nth-child(7),
.vplan-table thead th:nth-child(8),
.vplan-table tbody td:nth-child(8),
.vplan-table thead th:nth-child(9),
.vplan-table tbody td:nth-child(9) {
  text-align: center;
}

/* Badges: nebeneinander; in Art-Spalte horizontal mittig */
.badge-row {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-free       { background: #e8f7ee; color: #0b7a34; border-color: #bfe7cd; }
.badge-cancel     { background: #fde8e8; color: #9b1c1c; border-color: #f9c5c5; }
.badge-room       { background: #e8f0fe; color: #1a56db; border-color: #c7d2fe; }
.badge-vertretung { background: #ffffff; color: #111111; border-color: #e5e7eb; }
.badge-exam       { background: #fef3c7; color: #92400e; border-color: #fde68a; }

.klasse-schulart-cell {
  white-space: nowrap;
  padding: 0 6px;
}

.klasse-text-cell {
  white-space: nowrap;
  padding: 0 8px;
  font-weight: 700;
}


/* Badge für Schulart */
.badge-schulart {
  display: inline-block;
  padding: 0.05em 0.4em;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.25);
  font-size: 0.8em;
}

/* Farben je Schulart (optional) */
.badge-schulart-os { background-color: #e3f2fd; }
.badge-schulart-ms { background-color: #fce4ec; }
.badge-schulart-rs { background-color: #fff3e0; }
.badge-schulart-gy { background-color: #e8f5e9; }

/* Sonstiges */
.empty { margin: 4px 0; color: #444; }
.page-indicator { color: #000; font-size: 0.9rem; margin: 2px 0 6px; }
.fett { font-weight: 700; }

/* Blauer Raum bei Raumtausch */
.vplan-table td.raum-blau { color: #1a56db; }

/* < 1250px: ART-Spalte 110px + Badges untereinander */
@media (max-width: 1249px) {
  .vplan-table th.col-art,
  .vplan-table td.col-art {
    width: 110px;
    overflow: hidden;
  }
  .vplan-table td.col-art .badge-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
}

.center {
  text-align: center !important;
}
