/* Klassenübersicht (Präfix .tcl-) */

.tcl-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* [hidden] muss auch bei Bausteinen mit eigener display-Angabe gelten */
.tcl-page [hidden] {
  display: none !important;
}
.tcl-page > .page-header {
  margin-bottom: 0;
}
.tcl-page .page-header .subtitle {
  max-width: 720px;
}

/* ---------- Oben: neue Klasse + Elternsprechtag ---------- */

.tcl-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 880px) {
  .tcl-top {
    grid-template-columns: 1fr;
  }
}

.tcl-create > p {
  margin-bottom: 14px;
}
.tcl-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: end;
}
.tcl-create-btn {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 200px;
}
@media (max-width: 480px) {
  .tcl-create-form {
    grid-template-columns: 1fr;
  }
  .tcl-create-btn {
    justify-self: stretch;
  }
}
.tcl-create-msg:not(:empty) {
  margin-top: 14px;
}

.tcl-event {
  background: var(--c-surface-2);
  box-shadow: none;
}
.tcl-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tcl-event-title {
  margin: 0;
  font-size: 1.5rem;
}
.tcl-facts {
  margin: 0;
  display: grid;
  gap: 10px;
}
.tcl-fact {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
}
.tcl-fact dt {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-muted);
  padding-top: 1px;
}
.tcl-fact dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tcl-days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
}
@media (max-width: 420px) {
  .tcl-fact {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------- Kacheln ---------- */

.tcl-classes-title {
  margin-bottom: 12px;
}
.tcl-tiles {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
/* Jede Klasse ist ein Türschild: schwarzes Kopfband mit großer Klassennummer und Statuspunkt */
.tcl-tile {
  min-height: 190px;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.tcl-tile-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 18px 11px;
  background: var(--c-ink);
  color: #fff;
}
.tcl-tile-head::after {
  content: '';
  align-self: center;
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--c-accent);
}
.tcl-tile-ready .tcl-tile-head::after {
  background: var(--c-available);
}
.tcl-tile-label {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--c-on-ink-muted);
}
.tcl-tile-name {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: #fff;
}
.tcl-tile-count {
  padding: 14px 18px 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tcl-tile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 18px 0;
}
.tcl-tile-status {
  margin: auto 18px 0;
  padding: 12px 0 14px;
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}
.tcl-tile-badges + .tcl-tile-status,
.tcl-tile-count + .tcl-tile-status {
  margin-top: auto;
}
.tcl-tile-status::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}
.tcl-tile-status::after {
  content: '';
  width: 18px;
  height: 18px;
  margin-left: auto;
  background: var(--c-muted);
  -webkit-mask: var(--icon-arrow-right) center / contain no-repeat;
  mask: var(--icon-arrow-right) center / contain no-repeat;
  transition: transform var(--dur) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tcl-tile:hover .tcl-tile-status::after {
    transform: translateX(4px);
    background: var(--c-ink);
  }
}
.tcl-status-todo {
  color: var(--c-warning);
}
.tcl-status-ready {
  color: var(--c-success-text);
}
.tcl-tile-new {
  animation: tcl-highlight 1.6s ease-out;
}
@keyframes tcl-highlight {
  0%,
  40% {
    box-shadow: 0 0 0 5px rgba(243, 197, 34, 0.7);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(243, 197, 34, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tcl-tile-new {
    animation: none;
  }
  .tcl-tile,
  .tcl-tile-status::after {
    transition: none;
  }
}

.tcl-empty strong {
  display: block;
  color: var(--c-text);
  margin-bottom: 4px;
}
.tcl-empty p {
  margin: 0;
}

/* ---------- Rückmeldungen ---------- */

.tcl-import > p {
  max-width: 820px;
}
