/* -------------------------------------------------------------
   Prompt-Verwaltung
   ------------------------------------------------------------ */

/* Button-Leiste (Meldungsbereich oberhalb des Moduls) */
#button-leiste {
	min-height: 2rem;
	margin-bottom: .5rem;
}

#button-leiste .erfolg,
#button-leiste .fehler {
	margin-top: 0;
}

/* Zweispaltiges Layout */
#prompts-layout {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}

/* Linke Spalte */
#prompts-links {
	flex: 0 0 260px;
	min-width: 200px;
}

#prompts-links label {
	display: block;
	font-size: .85rem;
	color: var(--text-muted);
	margin-bottom: .25rem;
}

#prompt-select {
	width: 100%;
	margin-bottom: .75rem;
}

/* Versionshistorie */
#prompt-historie-wrap {
	max-height: 320px;
	overflow-y: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

#prompt-historie {
	border-collapse: collapse;
	width: 100%;
	font-size: .85rem;
}

#prompt-historie th {
	background: var(--bg-table-head);
	border-bottom: 1px solid var(--border);
	padding: .35rem .5rem;
	text-align: left;
	font-weight: bold;
	position: sticky;
	top: 0;
}

#prompt-historie td {
	border-bottom: 1px solid var(--border);
	padding: .35rem .5rem;
	vertical-align: middle;
}

#prompt-historie tbody tr {
	cursor: pointer;
	transition: background var(--transition);
}

#prompt-historie tbody tr:hover {
	background: rgba(59,130,246,.07);
}

#prompt-historie tbody tr.ausgewaehlt {
	background: rgba(59,130,246,.13);
}

#prompt-historie tbody tr.prompt-aktiv td:last-child strong {
	color: var(--msg-ok-text);
}

/* Rechte Spalte */
#prompts-rechts {
	flex: 1 1 0;
	min-width: 0;
}

#prompt-editor-leer {
	color: var(--text-muted);
	font-size: .9rem;
	padding: .5rem 0;
}

#prompt-editor-wrap label {
	display: block;
	font-size: .85rem;
	color: var(--text-muted);
	margin-bottom: .2rem;
	margin-top: .75rem;
}

#prompt-editor-wrap label:first-of-type {
	margin-top: 0;
}

#prompt-beschreibung {
	width: 100%;
	resize: vertical;
	font-family: inherit;
}

#prompt-text {
	width: 100%;
	resize: vertical;
	font-family: monospace;
	font-size: .88rem;
}

/* Buttons */
#prompt-buttons {
	margin-top: .75rem;
}

#btn-prompt-abbrechen {
	background: var(--btn-sec-bg);
	color: var(--btn-sec-text);
}

#btn-prompt-abbrechen:hover {
	background: var(--btn-sec-hover);
}

/* Responsive */
@media (max-width: 640px) {
	#prompts-layout {
		flex-direction: column;
	}
	#prompts-links {
		flex: none;
		width: 100%;
	}
}
