/* Schule Blocks nutzt die Theme-Tokens mit Fallbacks für andere Themes. */

/* Team: normale Tabellen am Desktop, Name und Aufgaben untereinander auf dem Handy. */
.content .tm-team-table { display: table; width: 100%; border: 1px solid var(--border, #d4e1d9); border-collapse: separate; border-spacing: 0; border-radius: var(--radius, 1rem); overflow: hidden; }
.content .tm-team-table tbody th { width: 1%; white-space: nowrap; font-weight: 650; color: var(--text, #20332e); background: transparent; }
.content .tm-team-table tbody tr:nth-child(even) > * { background: var(--bg-alt, #edf4ef); }
.content .tm-team-table tbody tr:last-child > * { border-bottom: 0; }
.content .tm-team-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-block: 1.25rem 2rem; }
.content .tm-team-group { min-width: 0; background: var(--surface, #fff); border: 1px solid var(--border, #d4e1d9); border-radius: var(--radius, 1rem); overflow: hidden; }
.content .tm-team-group h3 { margin: 0; padding: .8rem 1rem; color: var(--text, #20332e); background: var(--primary-light, #e8f3ee); border-bottom: 1px solid var(--border, #d4e1d9); font-size: 1rem; font-weight: 650; line-height: 1.5; }
.content .tm-team-group ul { list-style: none; margin: 0; padding: 0; }
.content .tm-team-group li { margin: 0; padding: .65rem 1rem; }
.content .tm-team-group li + li { border-top: 1px solid var(--border, #d4e1d9); }
@media (max-width: 39.999rem) {
    .content .tm-team-table, .content .tm-team-table tbody { display: block; }
    .content .tm-team-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .content .tm-team-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; padding: .85rem 1rem; }
    .content .tm-team-table tbody tr + tr { border-top: 1px solid var(--border, #d4e1d9); }
    .content .tm-team-table tbody tr:nth-child(even) { background: var(--bg-alt, #edf4ef); }
    .content .tm-team-table tbody tr > * { display: block; width: auto; padding: 0; border: 0; background: transparent; white-space: normal; overflow-wrap: break-word; }
    .content .tm-team-table tbody th { font-weight: 700; }
    .content .tm-team-table tbody tr > .tm-team-table__empty { display: none; }
    .content .tm-team-groups { grid-template-columns: minmax(0, 1fr); }
}

.tm-schoolmap { max-width: 48rem; margin-block: 1.25rem; }
.tm-schoolmap iframe { display: block; width: 100%; height: clamp(16rem, 45vw, 24rem); border: 0; }
.tm-schoolmap p { margin-block: .5rem 0; font-size: .875rem; }
.tm-schoolmap__consent { padding: 1.5rem; background: var(--bg-alt, #edf4ef); color: var(--text, #20332e); border: 1px solid var(--border, #d4e1d9); border-radius: var(--radius, 1rem); }
.tm-schoolmap .tm-schoolmap__title { margin-top: 0; font-size: 1.125rem; font-weight: 700; }
.tm-schoolmap__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.tm-schoolmap__actions[hidden], .tm-schoolmap__consent[hidden] { display: none; }
.tm-schoolmap__actions button { padding: .75rem 1rem; border: 1px solid var(--border, #d4e1d9); border-radius: .5rem; background: var(--surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.tm-schoolmap__actions [data-map-load] { background: var(--primary, #286c5d); color: var(--on-primary, #fff); }
.tm-schoolmap__actions button:focus-visible { outline: 3px solid var(--primary, #286c5d); outline-offset: 3px; }
.tm-schoolmap__status:empty { display: none; }

.tm-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 1.5rem; margin: 1.25rem 0 1.75rem; padding-block: 1.5rem; border-block: 1px solid var(--border, #d4e1d9); }
.tm-facts__item { display: flex; flex-direction: column; min-width: 0; padding-inline: 1.5rem; overflow-wrap: anywhere; }
.tm-facts__item:first-child { padding-left: 0; }
.tm-facts__item:last-child { padding-right: 0; }
.tm-facts__item + .tm-facts__item { border-left: 1px solid var(--border, #d4e1d9); }
.tm-facts__value { display: flex; flex-direction: column; gap: .3rem; order: -1; margin: 0 0 .45rem; color: var(--primary, #286c5d); font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.04em; }
.tm-facts__prefix { min-height: 1.4em; color: var(--text-muted, #51675f); font-size: .875rem; font-weight: 500; line-height: 1.4; letter-spacing: 0; }
.tm-facts__label { color: var(--text-muted, #51675f); font-size: 1rem; line-height: 1.4; }
.tm-facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tm-facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 40rem) {
    .tm-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tm-facts__item { padding-inline: 1rem; }
    .tm-facts__item:nth-child(odd) { border-left: 0; padding-left: 0; }
    .tm-facts__item:nth-child(even) { padding-right: 0; }
}
@media (max-width: 22rem) {
    .tm-facts { grid-template-columns: 1fr; }
    .tm-facts .tm-facts__item { border-left: 0; padding-inline: 0; }
}
.tm-facts--1 { grid-template-columns: 1fr; }

.tm-notice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem 1rem; margin-block: 1.25rem 2.5rem; padding: 1.1rem 1.25rem; background: var(--bg-alt, #edf4ef); color: var(--text, #20332e); border: 1px solid var(--border, #d4e1d9); border-left: 3px solid var(--primary, #286c5d); border-radius: var(--radius, 1rem); }
.tm-quicklinks + .tm-notice { margin-top: -1.5rem; }
.tm-notice__icon { color: var(--primary, #286c5d); align-self: start; margin-top: .15rem; }
.tm-notice .tm-notice__title { margin: 0 0 .25rem; font-size: 1rem; font-weight: 700; }
.tm-notice .tm-notice__text { margin: 0; font-size: 1rem; color: var(--text-muted, #51675f); }
.tm-notice__link { font-weight: 600; padding-block: .5rem; }
@media (max-width: 47.999rem) {
    .tm-notice { grid-template-columns: auto minmax(0, 1fr); }
    .tm-notice__link { grid-column: 2; justify-self: start; }
}

.tm-quicklinks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin-block: 2.25rem 2.75rem;
}
.tm-quicklink {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    min-width: 0;
    color: var(--text, #20332e);
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d4e1d9);
    border-radius: var(--radius, 1rem);
    text-decoration: none;
    box-shadow: var(--shadow-sm, none);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.tm-quicklink:hover {
    color: var(--text, #20332e);
    background: var(--primary-light, #e8f3ee);
    border-color: var(--primary, #286c5d);
    box-shadow: var(--shadow, none);
}
.tm-quicklink__icon { display: inline-flex; color: var(--primary, #286c5d); }
.tm-quicklink__body { display: flex; flex-direction: column; gap: .4rem; }
.tm-quicklink__title { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.tm-quicklink__description { color: var(--text-muted, #51675f); font-size: .875rem; line-height: 1.5; }
@media (min-width: 64rem) {
    .tm-quicklinks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 40rem) and (max-width: 63.999rem) {
    .tm-quicklinks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .tm-quicklink { grid-column: span 2; }
    .tm-quicklink:nth-child(4), .tm-quicklink:nth-child(5) { grid-column: span 3; }
}
@media (max-width: 39.999rem) {
    .tm-quicklink { padding: 1rem; gap: .85rem; }
    .tm-quicklink:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
}
@media (max-width: 21rem) {
    .tm-quicklinks { grid-template-columns: 1fr; }
    .tm-quicklink { flex-direction: row; align-items: center; }
}

.tm-dl {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    margin: 1.2rem 0;
    border: 1px solid var(--border, #e2e2e2);
    border-radius: 10px;
    background: var(--surface, #fff);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.tm-dl:hover {
    border-color: var(--primary, #286c5d);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
}

.tm-dl__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #6b7280;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
}
.tm-dl__icon[data-ext="PDF"]  { background: #c0392b; }
.tm-dl__icon[data-ext="DOC"],
.tm-dl__icon[data-ext="DOCX"] { background: #2b579a; }
.tm-dl__icon[data-ext="XLS"],
.tm-dl__icon[data-ext="XLSX"] { background: #217346; }
.tm-dl__icon[data-ext="PPT"],
.tm-dl__icon[data-ext="PPTX"] { background: #c43e1c; }
.tm-dl__icon[data-ext="ZIP"]  { background: #966317; }
.tm-dl__icon[data-ext="JPG"],
.tm-dl__icon[data-ext="JPEG"],
.tm-dl__icon[data-ext="PNG"]  { background: #6d28d9; }

.tm-dl__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}
.tm-dl__title { font-weight: 600; line-height: 1.25; }
.tm-dl__meta  { font-size: .875rem; color: var(--text-muted, #51675f); margin-top: .15rem; }

.tm-dl__action {
    flex: 0 0 auto;
    font-size: .85rem;
    font-weight: 600;
    opacity: .8;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .tm-dl__action { display: none; }
}

/* Auch lange Adressen dürfen auf schmalen Ansichten umbrechen. */
.tm-mail {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.tm-mail__icon { font-size: 1.1em; line-height: 1; }
