/**
 * Modul 30: Cockpit-Menü (seit 2.44.0). Größen nach REGEL 7.
 */
.gfcwm-cm { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; font-size: 14px; }
.gfcwm-cm-bar {
	--cm-bg: #fff; --cm-fg: #23282d; --cm-hover: #f0f0f0; --cm-accent: var(--gfcwm-ui-primary, #0073aa);
	position: relative; display: flex; align-items: center; flex-wrap: nowrap; gap: 4px;
	padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; background: var(--cm-bg); color: var(--cm-fg);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
/* Seit 2.80.6: Verwaltung hellgrau statt schwarz (Entscheidung 23.10.2026). */
.gfcwm-cm-bar--admin { --cm-bg: #f0f0f1; --cm-fg: #1d2327; --cm-hover: #dcdcde; border-color: #dcdcde; }
.gfcwm-cm-title {
	margin: 0 8px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .65;
}
.gfcwm-cm-list, .gfcwm-cm-sub { margin: 0; padding: 0; list-style: none; }
.gfcwm-cm-list { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; min-width: 0; }
.gfcwm-cm-title { flex: 0 0 auto; }
.gfcwm-cm-item { position: relative; margin: 0; }
.gfcwm-cm .gfcwm-cm-top {
	display: inline-flex; align-items: center; column-gap: .4em; box-sizing: border-box;
	height: var(--gfcwm-btn-h, 34px); padding: 0 12px; margin: 0;
	border: 0; border-radius: 4px; background: transparent; color: var(--cm-fg);
	font: inherit; font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
	cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: normal;
}
.gfcwm-cm .gfcwm-cm-top:hover, .gfcwm-cm .gfcwm-cm-top:focus-visible,
.gfcwm-cm-item.is-open > .gfcwm-cm-top { background: var(--cm-hover); color: var(--cm-fg); }
.gfcwm-cm .gfcwm-cm-top:focus-visible, .gfcwm-cm .gfcwm-cm-link:focus-visible { outline: 2px solid var(--cm-accent); outline-offset: 1px; }
.gfcwm-cm-item.is-current > .gfcwm-cm-top, .gfcwm-cm .gfcwm-cm-top.is-current { box-shadow: inset 0 -3px 0 var(--cm-accent); }
.gfcwm-cm-bar--admin .gfcwm-cm-item.is-current > .gfcwm-cm-top, .gfcwm-cm-bar--admin .gfcwm-cm-top.is-current { box-shadow: inset 0 -3px 0 var(--cm-accent); }
.gfcwm-cm-caret { width: 0; height: 0; margin-left: 2px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .7; transition: transform .15s; }
.gfcwm-cm-item.is-open > .gfcwm-cm-top .gfcwm-cm-caret { transform: rotate(180deg); }
.gfcwm-cm-sub {
	display: none; position: absolute; z-index: 1000; top: calc(100% + 4px); left: 0; min-width: 240px;
	padding: 6px; border: 1px solid #ddd; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
}
.gfcwm-cm-item.is-open > .gfcwm-cm-sub { display: block; }
.gfcwm-cm-sub li { margin: 0; }
.gfcwm-cm .gfcwm-cm-link {
	display: flex; align-items: center; column-gap: .4em; box-sizing: border-box; min-height: var(--gfcwm-btn-h, 34px);
	padding: 6px 10px; border-radius: 4px; color: #23282d; font-size: 14px; font-weight: 400; line-height: 1.3; text-decoration: none;
}
.gfcwm-cm .gfcwm-cm-link:hover, .gfcwm-cm .gfcwm-cm-link:focus-visible { background: #f0f0f0; color: #23282d; }
.gfcwm-cm .gfcwm-cm-link.is-current { color: var(--gfcwm-ui-primary, #0073aa); font-weight: 600; box-shadow: inset 3px 0 0 var(--gfcwm-ui-primary, #0073aa); }
.gfcwm-cm-text { flex: 0 1 auto; }
.gfcwm-cm-badge, .gfcwm-cm-count {
	display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
	height: 18px; min-width: 18px; padding: 0 6px; border-radius: 9px;
	font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .03em;
}
.gfcwm-cm-badge { background: #d63638; color: #fff; }
.gfcwm-cm-count { background: #dba617; color: #1d2327; }
.gfcwm-cm-sub .gfcwm-cm-badge, .gfcwm-cm-sub .gfcwm-cm-count { margin-left: auto; }
.gfcwm-cm-empty { padding: 8px 12px; border-left: 4px solid #dba617; background: #fff8e5; font-size: 13px; }

/* Schmale Bildschirme: Leiste untereinander, Untermenüs klappen in der Leiste auf. */
@media (max-width: 700px) {
	.gfcwm-cm-bar { flex-direction: column; align-items: stretch; }
	.gfcwm-cm-title { margin: 4px 4px 2px; }
	.gfcwm-cm-list { flex-direction: column; }
	.gfcwm-cm .gfcwm-cm-top { width: 100%; justify-content: flex-start; }
	.gfcwm-cm-caret { margin-left: auto; }
	.gfcwm-cm-sub { position: static; min-width: 0; margin: 2px 0 6px; box-shadow: none; }
}

/* Seit 2.80.6: erste Menüpunkte beider Leisten untereinander – Bezeichnung so breit wie die längere. */
@media (min-width: 701px) {
	@supports (grid-template-columns: subgrid) {
		.gfcwm-cm { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 0; }
		.gfcwm-cm > * { grid-column: 1 / -1; }
		.gfcwm-cm > .gfcwm-cm-bar { display: grid; grid-template-columns: subgrid; column-gap: 4px; align-items: center; }
	}
}
