/* =============================================================
   MCT – css/mod_aufgaben_sus.css
   Persönliche Aufgabenübersicht (SuS)
   Desktop: klassische Tabellen
   Smartphone (<=640px): Akkordeon mit Karten statt Tabellen
   ============================================================= */

#mod-aufgaben-sus {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Seitenüberschrift links, Meldungsbereich rechtsbündig in derselben
   Zeile (analog #erg-titel-zeile in mod_ergebnisse.css); darf auf
   Smartphone bei wenig Platz umbrechen. */
#as-titel-zeile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: .4rem .8rem;
}

#as-titel-zeile h2 {
	margin: 0;
}

#as-titel-zeile .mod-meldung {
	margin-top: 0;
}

#as-auswahl-bereich,
.as-desktop-only {
	background-color: var(--bg-panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px;
}

#as-kaskade {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

#as-kaskade label {
	font-weight: bold;
}

#as-beendet-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

/* -------------------------------------------------------------
   Umschaltung Desktop <-> Smartphone, rein über CSS
   (Breakpoint 640px – analog style.css)
   ------------------------------------------------------------- */
.as-mobil-only {
	display: none;
}

@media (max-width: 640px) {
	.as-desktop-only { display: none; }
	.as-mobil-only   { display: block; }
	#as-mobil        { display: flex; }
}

/* -------------------------------------------------------------
   Akkordeon
   ------------------------------------------------------------- */
#as-mobil {
	flex-direction: column;
	gap: 12px;
}



.as-akk-abschnitt {
	background-color: var(--bg-panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.as-akk-kopf {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	cursor: pointer;
	font-weight: bold;
}

.as-akk-pfeil {
	display: inline-block;
	width: 1em;
}

.as-akk-inhalt {
	padding: 0 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* -------------------------------------------------------------
   Karten
   ------------------------------------------------------------- */
.as-karte {
	background-color: var(--bg-page);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	padding: 12px;
}

.as-karte-titel {
	font-weight: bold;
	margin-bottom: 6px;
}

.as-karte-zeile {
	color: var(--text-muted);
	margin-bottom: 2px;
}

.as-karte-label {
	color: var(--text-base);
}

/*
.as-karte-ergebnis {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 8px 0;
}
.as-karte-aktion {
	margin-top: 10px;
	display: flex;
	gap: 8px;
}

.as-karte-btn {
	background: var(--btn-bg);
	color: var(--btn-text);
	border: none;
	border-radius: var(--radius);
	padding: 8px 14px;
	cursor: pointer;
}
*/

.as-karte-leer {
	color: var(--text-muted);
	font-style: italic;
	padding: 8px 0;
}

/* -------------------------------------------------------------
   Karten-Kopf: Titel links, Aktions-Icons rechts
   ------------------------------------------------------------- */
.as-karte-kopf {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.as-karte-titel {
	font-weight: bold;
}

.as-karte-icons {
	display: flex;
	gap: 2px;
}

/* -------------------------------------------------------------
   Icon-Button: klickbare Fläche 40x40px, Icon selbst klein
   ------------------------------------------------------------- */
.as-karte-icon-btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	font-size: 1.1em;
	line-height: 1;
	color: var(--text-base);
	cursor: pointer;
	padding: 0;
}

.as-karte-icon-btn:hover {
	color: var(--btn-bg);
}

/* -------------------------------------------------------------
   Filter-Kacheln "Meine Aufgaben" (Desktop-Zeile + Overlay)
   Basisoptik über .test-kachel aus mod_test.css wiederverwendet
   ------------------------------------------------------------- */
#as-beendet-kacheln {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.6rem;
	margin-bottom: 12px;
}


.as-filter-kachel-suche input {
	width: 100%;
}

/* -------------------------------------------------------------
   Filter-Icon im Akkordeonkopf "Meine Aufgaben" – rechtsbündig,
   analog .aufg-rechts-text (mod_aufgaben_lul.css)
   ------------------------------------------------------------- */
#as-akk-beendet .as-karte-icon-btn {
	margin-left: auto;
}

/* -------------------------------------------------------------
   Filter-Overlay (Smartphone) – analog #aufg-overlay-*
   ------------------------------------------------------------- */
#as-filter-overlay-hintergrund {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

#as-filter-overlay-box {
	background-color: var(--bg-panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 20px;
	min-width: 300px;
	max-width: 90%;
}
/* Auf dem Smartphone darf das Overlay fast die volle Breite nutzen */
@media (max-width: 640px) {
	#as-filter-overlay-hintergrund {
		padding: 16px;
	}
	#as-filter-overlay-box {
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}
}

#as-filter-overlay-kacheln {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem;
	margin: 12px 0;
}


#as-filter-overlay-aktion-zeile {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
}

.as-overlay-icon-btn {
	width: 44px;
	height: 44px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-page);
	font-size: 1.2rem;
	cursor: pointer;
}

.as-overlay-icon-btn-ok {
	background: var(--msg-ok-bg);
	color: var(--msg-ok-text);
	border-color: var(--msg-ok-bg);
}


/* -------------------------------------------------------------
   Options-Kacheln (Anzahl/Sortierung/Typ): Inhalt als Block
   horizontal + vertikal zentriert
   ------------------------------------------------------------- */
.as-filter-kachel {
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 74px;
}

/* Such-Kachel bleibt separat, kein Klick-Ziel als Ganzes */
.as-filter-kachel-suche {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-panel);
	min-width: 0;
	cursor: default;
}

.as-filter-kachel-suche input {
	width: 100%;
}

.as-filter-kachel .test-opt-state {
	white-space: nowrap;
}

/* -------------------------------------------------------------
   Overlay: unsichtbarer Platzhalter, hält das 2-Spalten-Raster
   stabil, ohne selbst sichtbar oder klickbar zu sein
   ------------------------------------------------------------- */
.as-filter-kachel-leer {
	visibility: hidden;
	pointer-events: none;
}

#as-kaskade select {
	width: 20%;
}
