/* Farbschema der Grundschule Ramspau:
   Tabellenkopf-Blau #55a5d6, Navi-Oliv #d2cb56, Akzent #c1c23a */
.tu-wrap {
	font-size: 15px;
	margin: 1em 0;
	--tu-blue:   #55a5d6;
	--tu-blue-d: #3f8cbd;
	--tu-olive:  #d2cb56;
	--tu-accent: #c1c23a;
	--tu-row:    #f6f7fb;
	--tu-foot:   #eef1f6;
	--tu-yes-bg: #e3eecf;
	--tu-yes-fg: #5a7d1f;
	--tu-no-bg:  #f6dada;
	--tu-no-fg:  #b23b3b;
	--tu-maybe-bg: #fcf3d4;
	--tu-maybe-fg: #9a7d22;
	--tu-border: #dfe3ea;
}

.tu-title {
	margin: 0 0 .5em;
	color: #333;
}

.tu-description {
	margin: 0 0 1em;
	color: #444;
	line-height: 1.5;
}

.tu-hints {
	margin: 1em 0;
	padding: 10px 14px;
	background: var(--tu-maybe-bg);
	border-left: 4px solid var(--tu-olive);
	border-radius: 3px;
	color: #5a4f1e;
	line-height: 1.5;
}

/* Tabelle horizontal scrollbar (viele Termine auf Mobil). */
.tu-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tu-table {
	border-collapse: collapse;
	width: auto;
	min-width: 100%;
}

.tu-table th,
.tu-table td {
	border: 1px solid var(--tu-border);
	padding: 8px 12px;
	text-align: center;
	white-space: nowrap;
}

.tu-table thead th {
	background: var(--tu-blue);
	color: #fff;
	font-weight: 600;
	line-height: 1.25;
}

/* Monats-Kopfzeile über den Tagesspalten */
.tu-month-row th {
	background: var(--tu-blue-d);
	color: #fff;
	font-weight: 700;
	letter-spacing: .02em;
	padding: 4px 10px;
	text-align: center;
}
.tu-month-row .tu-name-col {
	background: var(--tu-blue-d);
}

/* Vertikale Abgrenzung am ersten Tag eines neuen Monats (durch alle Zeilen) */
.tu-table th.tu-month-start,
.tu-table td.tu-month-start {
	border-left: 3px solid var(--tu-olive);
}

.tu-name-col {
	text-align: left !important;
	position: sticky;
	left: 0;
	background: var(--tu-row);
	font-weight: 600;
	z-index: 1;
}

.tu-table thead .tu-name-col {
	background: var(--tu-blue);
	color: #fff;
}

.tu-yes {
	background: var(--tu-yes-bg);
	color: var(--tu-yes-fg);
	font-weight: 700;
}

.tu-no {
	background: var(--tu-no-bg);
	color: var(--tu-no-fg);
	font-weight: 700;
}

.tu-maybe {
	background: var(--tu-maybe-bg);
	color: var(--tu-maybe-fg);
	font-weight: 700;
}

.tu-none {
	background: #fff;
	color: #c2c6cd;
}

.tu-table tbody tr:nth-child(even) td {
	background: var(--tu-row);
}
.tu-table tbody tr:nth-child(even) .tu-yes   { background: var(--tu-yes-bg); }
.tu-table tbody tr:nth-child(even) .tu-no    { background: var(--tu-no-bg); }
.tu-table tbody tr:nth-child(even) .tu-maybe { background: var(--tu-maybe-bg); }

.tu-table tfoot td {
	background: var(--tu-foot);
	font-weight: 700;
	color: #333;
}

.tu-sum {
	background: #e2e7ef !important;
}

/* Buttons im Schul-Stil (oliv/gelb wie Navigation & Krankmeldung-Button) */
.tu-wrap .button,
.tu-wrap button {
	background: var(--tu-olive);
	border: 1px solid var(--tu-accent);
	color: #4a4a1e;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 3px;
	cursor: pointer;
	letter-spacing: .02em;
}
.tu-wrap .button:hover,
.tu-wrap button:hover {
	background: var(--tu-accent);
	color: #fff;
}

.tu-wrap .button-primary,
.tu-wrap .tu-submit {
	background: var(--tu-blue);
	border-color: var(--tu-blue-d);
	color: #fff;
}
.tu-wrap .button-primary:hover,
.tu-wrap .tu-submit:hover {
	background: var(--tu-blue-d);
}

/* Formular */
.tu-toggle-form {
	margin: .8em 0;
}

.tu-form {
	border: 1px solid var(--tu-border);
	border-top: 4px solid var(--tu-olive);
	border-radius: 6px;
	padding: 16px;
	background: #fafbfc;
	max-width: 520px;
}

.tu-form .tu-hint {
	margin-top: 0;
	color: #555;
	font-size: 14px;
}

.tu-form input[type="text"],
.tu-form input[type="password"] {
	width: 100%;
	max-width: 320px;
	padding: 7px 9px;
	border: 1px solid var(--tu-border);
	border-radius: 3px;
}
.tu-form input[type="text"]:focus,
.tu-form input[type="password"]:focus {
	border-color: var(--tu-blue);
	outline: none;
	box-shadow: 0 0 0 2px rgba(85,165,214,.2);
}

.tu-choices {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
}

.tu-choice-hint {
	font-weight: 400;
	font-size: 13px;
	color: #777;
}

.tu-choice-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 6px;
	border-bottom: 1px solid var(--tu-border);
}

.tu-choice-label {
	flex: 1;
}

.tu-choice-opts {
	display: inline-flex;
	gap: 4px;
}

/* Auswahl-Buttons: visuell hinterlegt, das native Radio wird ausgeblendet */
.tu-opt {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 30px;
	border: 1px solid var(--tu-border);
	border-radius: 4px;
	cursor: pointer;
	font-weight: 700;
	user-select: none;
	background: #fff;
	color: #aaa;
}
.tu-opt input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.tu-opt-yes:has( input:checked )   { background: var(--tu-yes-bg);   color: var(--tu-yes-fg);   border-color: #9bcf97; }
.tu-opt-no:has( input:checked )    { background: var(--tu-no-bg);    color: var(--tu-no-fg);    border-color: #e0a3a3; }
.tu-opt-maybe:has( input:checked ) { background: var(--tu-maybe-bg); color: var(--tu-maybe-fg); border-color: #ddc878; }

/* Fallback für Browser ohne :has() – Auswahl bleibt über Rahmen erkennbar */
.tu-opt:hover { border-color: var(--tu-blue); }

.tu-status {
	margin-left: 10px;
	font-size: 14px;
	color: var(--tu-yes-fg);
}

.tu-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 8px 0 0;
	font-size: 13px;
}
.tu-leg {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
}
.tu-leg-yes   { color: var(--tu-yes-fg); }
.tu-leg-no    { color: var(--tu-no-fg); }
.tu-leg-maybe { color: var(--tu-maybe-fg); }
