/* Utility classes and custom styles */
/* Note: Bulma color overrides are now handled via Sass variables in app.scss */

/* Ensure navbar dropdown uses dark text on white background (custom design requirement) */
.navbar.is-primary .navbar-dropdown .navbar-item {
	color: var(--text) !important;
}

.navbar.is-primary .navbar-dropdown .navbar-item:hover {
	color: var(--text) !important;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0
}

.djs-element.selected>.djs-visual {
	outline: 2px solid currentColor;
	outline-offset: 2px
}

/* Main content spacing for fixed navbar */
#main {
	padding-top: 2rem;
}

/* Sticky footer layout */
html {
	height: 100%;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

#main {
	flex: 1;
}

/* Reduce footer height */
.footer {
	padding: 1.5rem 1.5rem 1rem;
}

.footer .content {
	margin-bottom: 0;
}

.footer .content>* {
	display: block;
}

.footer .content .title {
	margin-bottom: 0.5rem !important;
	display: block;
	line-height: 1.4;
}

.footer .content .subtitle {
	margin-top: 0;
	margin-bottom: 0.5rem !important;
	display: block;
	line-height: 1.4;
	position: relative;
}

.footer .columns {
	margin-bottom: 0.25rem !important;
}

.footer hr {
	margin-top: 0 !important;
	margin-bottom: 0.25rem !important;
}

/* Phase column header: enforce consistent height */
.blm-phase {
	background: #f0f6ff;
	border-radius: var(--radius-lg);
	min-height: 80px;
	display: flex;
	align-items: center;
	padding: 0.75rem 1rem;
	transition: background-color 0.2s ease;
}

/* Phase title hover effect */
.blm-phase h2 a {
	transition: color 0.2s ease, text-decoration 0.2s ease;
}

.blm-phase:hover {
	background: #e0edff;
}

.blm-phase h2 a:hover {
	color: #103177 !important;
}

.blm-process:hover {
	background: #e0edff;
	color: #103177 !important;
}

/* Phase grid: 7 equal columns on desktop, 1 on narrower screens */
.phase-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1rem;
	width: 100%;
}

/* Collapse earlier (Bulma widescreen breakpoint ~1216px) to avoid horizontal overflow */
@media screen and (max-width: 1215px) {
	.phase-grid {
		grid-template-columns: 1fr;
	}
}

/* BPMN region */
.bpmn-wrap {
	background: var(--surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-1);
	padding: var(--space-4);
	overflow: hidden;
}

.bpmn-canvas {
	width: 100%;
	aspect-ratio: 16 / 9;
	/* keeps the viewer responsive */
	border-radius: var(--radius);
}

/* Activity list & active state */
.activity-chip {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .4rem .65rem;
	border-radius: 999px;
	font-size: .875rem;
	background: transparent;
	border: 1px solid rgba(0, 0, 0, .08);
	cursor: pointer;
}

.activity-chip[aria-current="true"] {
	background: color-mix(in oklab, var(--brand), white 85%);
	border-color: transparent;
}

/* Services panel */
.services-panel {
	background: var(--surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-1);
	padding: var(--space-4);
}

.service-item+.service-item {
	border-top: 1px solid rgba(0, 0, 0, .08);
	margin-top: var(--space-3);
	padding-top: var(--space-3);
}

/* Utility: clamp readable line-length for text blocks */
.prose {
	max-width: 70ch;
}

/* Phase documentation: text-focused layout */
.phase-documentation {
	max-width: 65ch;
	margin: 0 auto;
}

.phase-documentation h1 {
	font-size: 2.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--surface);
}

.phase-documentation h2 {
	font-size: 1.75rem;
	margin-top: 2rem;
	margin-bottom: 1rem;
	color: var(--brand);
}

.phase-documentation h3 {
	font-size: 1.25rem;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
}

.phase-documentation p {
	margin-bottom: 1rem;
	line-height: 1.7;
}

.phase-documentation ul,
.phase-documentation ol {
	margin-bottom: 1rem;
	padding-left: 1.5rem;
}

.phase-documentation li {
	margin-bottom: 0.5rem;
	line-height: 1.6;
}

.phase-documentation strong {
	color: var(--text);
	font-weight: 600;
}

/* Hide bpmn-js internal breadcrumb; we provide our own page-level breadcrumb */
#xbpmn-container .bjs-breadcrumbs,
#xbpmn .bjs-breadcrumbs {
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	visibility: hidden !important;
	position: absolute !important;
	width: 0 !important;
	overflow: hidden !important;
}

/* Ensure no space is reserved for the breadcrumb container */
#xbpmn-container .bjs-breadcrumbs-container,
#xbpmn .bjs-breadcrumbs-container {
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Adjust canvas container to account for removed breadcrumb space */
#xbpmn .djs-container,
#xbpmn .djs-canvas {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

/* Hide bpmn.io watermark/logo */
#bpmn .bjs-powered-by,
#bpmn-container .bjs-powered-by {
	display: none !important;
	visibility: hidden !important;
}

.djs-element.selected>.djs-visual {
	outline: 3px solid var(--brand);
	outline-offset: 3px;
}

/* Process cards: only add the left accent, keep Bulma card layout */
.process-card {
	border-left: 4px solid #3273dc;
}

.process-card.is-optional {
	border-left-color: #b7c7ea;
	/* lighter blue */
}

.process-card.is-optional .card-content p {
	color: #7a7a7a;
	/* grey text for optional */
}

#bpmn-x {
	outline: 1px solid var(--brand);
}

#bpmn svg:focus {
	outline: none;
}

#bpmn .djs-overlay-drilldown {
	display: none !important;
}

/* Prevent cursor from changing to 4-way arrow on SVG hover */
#bpmn svg,
#bpmn svg * {
	cursor: default !important;
}

/* Show pointer cursor for collapsed subprocesses (act like buttons) */
#bpmn .collapsed-subprocess,
#bpmn .collapsed-subprocess * {
	cursor: pointer !important;
}

/* Debug activities list styling */
#activities-list-title {
	font-size: 0.75rem;
	color: #888;
	margin-top: 1rem;
	margin-bottom: 0.25rem;
}

#activities-list-title+ul {
	font-size: 0.5rem;
	color: #888;
	list-style: none;
	padding-left: 0;
}

#activities-list-title+ul li {
	margin-bottom: 0.25rem;
}

/* Zuständigkeit symbols: make them larger and consistent */
.zustandigkeit-symbol {
	font-size: 1.75rem;
	line-height: 1;
	font-family: "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", system-ui, sans-serif;
	/* Ensure consistent rendering */
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* Ensure symbols are centered and consistent size */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	height: 1.75rem;
	text-align: center;
	/* Prevent character spacing issues */
	letter-spacing: 0;
	font-weight: 400;
}

/* suppress breadcrumbs for now */
.breadcrumb {
	display: none;
}

/* Process title navigation - stacked parent/current format */
.process-title-nav {
	margin-bottom: 0.75rem;
}

.process-parent-title {
	display: block;
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--brand, #3273dc);
	text-decoration: none;
	margin-bottom: 0.25rem;
	transition: color 0.2s ease;
}

.process-parent-title:hover {
	color: #103177;
	text-decoration: underline;
}

.process-current-title {
	margin-bottom: 0 !important;
}

.process-current-title .subprocess-arrow {
	color: #888;
	font-weight: 400;
	margin-right: 0.25rem;
	padding-left: 1.5rem;
}

/* Prevent scrolling in standalone mode (height is adapted to show full content) */
html.standalone {
	overflow-y: hidden;
}

/* Remove left/right margins and padding in standalone mode */
html.standalone #main.section {
	padding: 0;
}

html.standalone #process-article.container {
	margin: 0;
	padding: 0;
	max-width: 100%;
	width: 100%;
	line-height: normal;
	font-size: 1rem;
}

/* Back button for standalone mode */
.back-button-container {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1rem;
	width: 100%;
	text-align: center;
	gap: 0.75rem;
}

.subprocess-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--text, #363636);
	margin-bottom: 0;
	padding-right: 1rem;
}

.back-button {
	background-color: var(--brand, #3273dc);
	color: white;
	border: none;
	padding: 0.5rem 1.5rem;
	border-radius: var(--radius, 4px);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.back-button:hover {
	background-color: #103177;
	transform: translateY(-1px);
}

.back-button:active {
	transform: translateY(0);
}