/* =============================================================
   MCT – css/mod_bildungsplaene.css
   Layout für mod_bildungsplaene: Grundstruktur
   Technische Vorlage: css/mod_sus.css
   Respektiert Variablen/Konventionen aus style.css
   ============================================================= */

#mod-bildungsplaene > div {
	background: var(--bg-panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: .8rem 1rem;
	margin-bottom: 1rem;
}

#bp-titel-zeile {
	background: none;
	border: none;
	padding: 0;
}

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

.bp-platzhalter-text {
	color: var(--text-muted);
	font-size: .88rem;
}

/* -------------------------------------------------------------
   Editor-Akkordeon (Stammdaten / Dokument)
   ------------------------------------------------------------- */
#bp-editor-titelzeile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
}

#bp-editor-titelzeile h3 {
	margin: 0;
	flex: 0 0 auto;
}

#bp-editor-titelzeile #btn-bp-neu {
	flex: 0 0 auto;
}

#bp-meldung {
	flex: 1 1 auto;
	justify-content: center;
	text-align: center;
	min-width: 0;
}

#bp-editor-bereich.bp-editor-offen #bp-editor-titelzeile {
	border-bottom: 1px solid var(--border);
	padding-bottom: .6rem;
	margin-bottom: 1rem;
}

#bp-editor-akkordeon {
	display: grid;
	grid-template-columns: minmax(0, 40%) minmax(0, 60%);
	gap: 1rem;
	margin-top: 1rem;
}

#bp-editor-stammdaten input {
	width: 220px;
}

#bp-editor-aktionen {
	display: flex;
	justify-content: space-between;
	gap: .6rem;
	margin-top: 1rem;
	border-top: 1px solid var(--border);
	padding-top: 1rem;
}

#bp-editor-aktionen #btn-bp-abbrechen { order: 1; }
#bp-editor-aktionen #btn-bp-speichern { order: 2; }

/* -------------------------------------------------------------
   Upload-Dropzone
   ------------------------------------------------------------- */
#bp-upload-zone {
	border: 2px dashed var(--border-input);
	border-radius: var(--radius);
	padding: 1.2rem;
	text-align: center;
	cursor: pointer;
	color: var(--text-muted);
	transition: background var(--transition), border-color var(--transition);
	margin-bottom: 1rem;
}

#bp-upload-zone p {
	margin: .2rem 0;
}

#bp-upload-zone:hover,
#bp-upload-zone:focus {
	border-color: var(--border-focus);
	background: var(--bg-hover);
	color: var(--text-nav-hover);
	outline: none;
}

#bp-upload-zone.bp-upload-dragover {
	border-color: var(--border-focus);
	background: var(--bg-hover);
	color: var(--text-nav-hover);
}

#bp-upload-zone.bp-upload-laeuft {
	opacity: .6;
	pointer-events: none;
}

#bp-dokument-dateiname {
	font-weight: bold;
	margin: 0 0 .5rem;
	word-break: break-word;
}

/* Statuszeile während/nach der KI-Normalisierung (Editor-Akkordeon und
   #edit-bp-inhalt) – bewusst schlicht, kein Fortschrittsbalken (KISS) */
.bp-norm-status {
	font-size: .85rem;
	color: var(--text-muted);
	margin: 0 0 .5rem;
}

.bp-norm-status.bp-norm-laeuft {
	color: var(--text-base);
}

.bp-norm-status.bp-norm-fehler {
	color: var(--msg-err-text);
}

#bp-inhalt-text.bp-inhalt-gesperrt {
	opacity: .6;
	background: var(--bg-table-alt);
}

.bp-vorschau-text {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-table-alt);
	padding: .6rem .8rem;
	max-height: 320px;
	overflow: auto;
	white-space: pre-wrap;
	font-family: monospace;
	font-size: .82rem;
	line-height: 1.4;
}

/* -------------------------------------------------------------
   Filterleiste + Tabelle
   ------------------------------------------------------------- */
#bp-aktionsbereich {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.bp-aktion-spalte {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	flex: 1 1 0;
	min-width: 140px;
}

#bp-aktionsbereich label {
	font-size: .85rem;
	color: var(--text-muted);
}

.bp-aktion-spalte select {
	width: 100%;
}

#bp-aktionsbereich-meta {
	flex: 1 1 100%;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .6rem;
}

.bp-filter-anzahl {
	font-size: .82rem;
	color: var(--text-muted);
	white-space: nowrap;
}

#bp-tabelle .sortierbar {
	cursor: pointer;
	user-select: none;
}

#bp-tabelle .sortierbar:hover {
	background: var(--bg-hover);
	color: var(--text-nav-hover);
}

#bp-tabelle .sort-asc::after  { content: ' ▲'; font-size: .75em; }
#bp-tabelle .sort-desc::after { content: ' ▼'; font-size: .75em; }

#bp-tabelle tbody tr.bp-zeile-aktiv {
	background: rgba(59,130,246,.12);
}

#bp-tabelle {
	table-layout: fixed;
}

#bp-tabelle th:nth-child(1),
#bp-tabelle td:nth-child(1) {
	width: 90px;
}

#bp-tabelle th:nth-child(5),
#bp-tabelle td:nth-child(5) {
	width: 90px;
}

#bp-tabelle th:nth-child(6),
#bp-tabelle td:nth-child(6) {
	width: 100px;
}

#bp-tabelle th:nth-child(7),
#bp-tabelle td:nth-child(7) {
	width: 200px;
}

#bp-tabelle td.td-aktionen {
	white-space: nowrap;
}

.bp-kurz-badge {
	display: inline-block;
	padding: .1rem .3rem;
	border-radius: 3px;
	font-size: .72rem;
	font-weight: bold;
	background: var(--bg-table-alt);
	color: var(--text-muted);
	margin-right: .3rem;
}

/* -------------------------------------------------------------
   Inhalts-Editor (#edit-bp-inhalt)
   ------------------------------------------------------------- */
#bp-inhalt-titelzeile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	margin-bottom: .8rem;
}

#bp-inhalt-titelzeile h3 {
	margin: 0;
	flex: 0 0 auto;
}

#bp-inhalt-meldung {
	flex: 1 1 auto;
	justify-content: center;
	text-align: center;
	min-width: 0;
}

#bp-inhalt-text {
	width: 100%;
	height: 60vh;
	max-height: 640px;
	resize: vertical;
	box-sizing: border-box;
	font-family: monospace;
	font-size: .85rem;
	line-height: 1.4;
	padding: .6rem .8rem;
	border: 1px solid var(--border-input);
	border-radius: var(--radius);
	background: var(--bg-input);
	color: var(--text-base);
}

#bp-inhalt-aktionen {
	display: flex;
	justify-content: space-between;
	gap: .6rem;
	margin-top: 1rem;
}

#bp-inhalt-aktionen #btn-bp-inhalt-abbrechen { order: 1; }
#bp-inhalt-aktionen #btn-bp-inhalt-zuruecksetzen { order: 2; margin-left: auto; }
#bp-inhalt-aktionen #btn-bp-inhalt-speichern { order: 3; }
