:root {
	--client-color: #0f05a0;
	--client-color-light: rgb(194, 193, 239);
	--client-color-disabled: color-mix(in srgb, var(--client-color) 90%, #808090);
}


/* Expand toggle is inside arcgis-expand Shadow DOM (styled in src/main.ts to avoid leaking into slotted content) */


/* Nur Zoom-Buttons - ArcGIS JS API 4.34+ with Calcite Components */
.esri-ui.calcite-mode-light :is(.esri-zoom, arcgis-zoom) .esri-widget--button:is(calcite-button):not(:hover),
.esri-ui.calcite-mode-light :is(.esri-zoom, arcgis-zoom) calcite-button.esri-widget--button:not(:hover) {
	--calcite-button-background-color: var(--client-color) !important;
	--calcite-button-text-color: #ffffff !important;
	--calcite-button-icon-color: #ffffff !important;
}

.esri-ui.calcite-mode-light :is(.esri-zoom, arcgis-zoom) .esri-widget--button:is(calcite-button):hover,
.esri-ui.calcite-mode-light :is(.esri-zoom, arcgis-zoom) calcite-button.esri-widget--button:hover {
	--calcite-button-background-color: var(--calcite-ui-foreground-2) !important;
	--calcite-button-text-color: #000000 !important;
	--calcite-button-icon-color: #000000 !important;
}


.esri-feature-form__group-header,
.esri-feature-form__group-header:focus
 {
  background-color: #1b0bff25;
}
.esri-feature-form__group-header:hover
 {
  background-color: #f3f3f3;
  color: black;
}

.status-label-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-label-toggle input[type="checkbox"],
.status-label-toggle label {
  cursor: pointer;
}

.status-label-toggle .esri-feature-form__label {
  margin: 0;
}

.help-hover {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}

/* Only show menu if enabled by preset */
.help-hover .help-dropdown__menu {
  display: none;
}

.help-hover.help-hover--enabled:hover .help-dropdown__menu,
.help-hover.help-hover--enabled:focus-within .help-dropdown__menu {
  display: block;
}

/* Escape setzt dieses Attribut (tenant.ts). Ohne die Regel bliebe das Menue
   unter dem Zeiger offen, waehrend aria-expanded "false" meldet. */
.help-hover[data-collapsed="true"] .help-dropdown__menu {
  display: none;
}

.help-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100%);
  min-width: 250px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow: hidden;
}

.help-dropdown__item {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: #000;
  white-space: nowrap;
  font: 14px "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

.help-dropdown__item:hover {
  background: var(--client-color-light, #f3f3f3);
}

/* Ensure the manual icon still feels clickable when it opens a menu */
#manualSingleLink.help-icon--menu {
  cursor: pointer;
}

/* Separator line above the last group item (e.g. Datenschutz) */
.help-dropdown__item--separated {
  border-top: 1px solid #e0e0e0;
}

.calcite-theme-light {
  --calcite-font-size--1: 0.9rem;
  --calcite-ui-brand: var(--client-color);
}

p {
  margin:10px auto;
  max-width: 80%;
  padding: 20px 12px 10px 20px;
  font: 16px "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

h1, h2, h3 {
  margin:10px auto;
  max-width: 80%;
  padding: 12px 10px 10px 10px;
  font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

dialog {
	border:1px solid var(--client-color);
	text-align: center;	
	line-height: 1.5em;
}

.cursive-label {
	font-style: italic;
}

/* Esris .esri-feature-form__label ist ein Flex-Column-Label und würde die Checkbox über den Text umbrechen */
.export-option-label {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 0.5em 0;
	cursor: pointer;
}

.export-option-label input[type="checkbox"] {
	flex: 0 0 auto;
	width: 1em;
	height: 1em;
	margin: 0;
	vertical-align: middle;
	align-self: center;
}

.error {
	color: red;
}

.whitebg {
	background-color: white;
  }

  .instructions {
	padding: 10px 10px 0;
  }

vaadin-grid-cell-content {
	white-space: normal !important;
	width: fit-content;
}

/* Target the slotted content (panel) inside arcgis-expand */
.esri-ui-corner arcgis-expand .esri-widget--panel {
	max-height: calc(90vh - 100px);
	width: 330px;
	box-sizing: border-box;
}

/*Manipule editor widget design*/

/* Editor Widget vergrößern */
.esri-editor {
	width: 410px !important; 
}

.esri-editor .esri-widget--panel {
	width: 380px !important;
}

/* Since SDK 5.0 the editor renders inside the arcgis-editor shadow root, so the
   generic arcgis-expand panel height cap above no longer reaches it. Cap the host
   instead and let it be a flex column — the shadow CSS in editorUiTweaks.ts makes
   the form content scroll inside, keeping the action buttons visible. */
.esri-ui-corner arcgis-expand arcgis-editor {
	display: flex;
	flex-direction: column;
	/* Same height budget as the traffic table (#tableContainer) so both widgets
	   use the available screen height equally. */
	max-height: calc(100vh - 150px);
	overflow: hidden;
}

/* Hide the Editor's split-geometry tool unless the SplitFeatures permission is granted */
body.cz-split-disabled calcite-action-bar.esri-editor__update-action-bar calcite-action[icon="split-geometry"] {
	display: none !important;
}

/* Hide the Editor's multi-select tools unless the MultiEditFeatures permission is granted.
   The point-selection tool (selection-set) stays so single sections can still be selected.
   The selection-mode dropdown (overwrite/add/remove) is also hidden — it only makes sense
   when building up a multi-feature selection set, which is not allowed here. */
body.cz-multiedit-disabled .esri-selection-toolbar calcite-action[icon="cursor-marquee"],
body.cz-multiedit-disabled .esri-selection-toolbar calcite-action[icon="lasso-select"],
body.cz-multiedit-disabled .esri-selection-toolbar calcite-dropdown {
	display: none !important;
}

/* While splitting a feature, only allow the point splitter tool. The polyline/polygon
   splitter tools let users split a line at two points, producing multipart features.
   Scoped to body.cz-splitting (toggled by the Editor "drawing-splitter-geometry" state)
   so it does not affect the same Sketch toolbar when creating new features. */
body.cz-splitting .esri-responsive-toolbar__bar calcite-action[icon="line"],
body.cz-splitting .esri-responsive-toolbar__bar calcite-action[icon="polygon"],
body.cz-splitting .esri-responsive-toolbar__bar calcite-action[icon="rectangle"],
body.cz-splitting .esri-responsive-toolbar__bar calcite-action[icon="circle"],
body.cz-splitting .esri-responsive-toolbar__bar calcite-action[icon="freehand"],
body.cz-splitting .esri-responsive-toolbar__bar calcite-action[icon="freehand-area"] {
	display: none !important;
}

/*relative size of input fields - apply only inside the ArcGIS Editor*/
.esri-editor .esri-feature-form__input,
.esri-editor .esri-batch-attribute-form__input {
	width: 180px !important;
}

/*label width consistent*/
.esri-feature-form__label-text-content,
.esri-batch-attribute-form__label-text-content {
    width: 160px !important;
}


/* Limit group width to prevent horizontal overflow */
.esri-feature-form__group,
.esri-batch-attribute-form__group {
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Highlight changed fields in editor with light version of mainBGColor */
.field-changed {
	background-color: var(--client-color-light, rgb(194, 220, 255)) !important;
	transition: background-color 0.2s ease;
}

/* Ensure Calcite components show the background correctly - target internal inputs */
calcite-input.field-changed input,
calcite-input-number.field-changed input,
calcite-combobox.field-changed input,
calcite-text-area.field-changed textarea {
	background-color: var(--client-color-light, rgb(194, 220, 255)) !important;
}

/* Also set CSS custom properties for Calcite components */
calcite-input.field-changed,
calcite-input-number.field-changed,
calcite-select.field-changed,
calcite-text-area.field-changed {
	--calcite-color-background: var(--client-color-light, rgb(194, 220, 255)) !important;
	--calcite-color-background-input: var(--client-color-light, rgb(194, 220, 255)) !important;
}

/* For combobox, style the selected chips/items instead of the input */
calcite-combobox.field-changed {
	--calcite-color-foreground-1: var(--client-color-light, rgb(194, 220, 255)) !important;
}

/* Target selected chips in combobox */
calcite-combobox.field-changed::part(chip),
calcite-combobox.field-changed calcite-chip {
	background-color: var(--client-color-light, rgb(194, 220, 255)) !important;
	--calcite-color-background: var(--client-color-light, rgb(194, 220, 255)) !important;
}

/* Target shadow DOM inputs using ::part selector if available, or deep selectors */
calcite-input.field-changed::part(input),
calcite-input-number.field-changed::part(input) {
	background-color: var(--client-color-light, rgb(194, 220, 255)) !important;
}




.form-style-1 .form-item {
	display: flex;
	/*align-items: center;*/ /* Aligns items vertically in the center */
	margin-bottom: 10px; /* Spacing between each form item */
	max-width: 850px;
}
	.form-style-1 .form-item label {
		box-sizing: border-box;
		flex: 0 0 200px;
		min-width: 200px;
		margin-right: 10px; /* Spacing between label and input */
		white-space: nowrap; /* Prevents label from wrapping */
	}

/*form style from https://www.sanwebe.com/2014/08/css-html-forms-designs*/
.form-style-1 {
	margin:10px 10px;
    /*max-width: 80%;*/
	padding: 0px 12px 10px 10px;
	font: 16px "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
.form-style-1 li {
	padding: 0;
	display: block;
	list-style: none;
	margin: 10px 0 0 0;
}
.form-style-1 label{
	margin:0 0 3px 0;
	padding:0px;
	/*display:block;*/
}

.form-style-1 .labelRightSide {
	font-size: 10px;
	font-weight: normal;
	margin: 10px 0px 0px 5px;
}

#logoDiv {
	background-color: var(--client-color);
	display: flex;
	width: 100%;
	align-items: center; /* Vertically centers content within the container */
	box-shadow: 0 0 5px #6b6b6b;
}

	#logoDiv label {
		font-weight: bold;
		color: white;
		/*margin-bottom: 1px;*/ /* Adjust this value as needed */
		/*margin-top: 1px;*/ /* Adjust this value as needed */
	}

/* Styling for the first two flexible columns */
.flexible-column {
	flex: 1; /* Allows these columns to grow and share available space equally */
	display: flex;
	align-items: center; /* Vertically centers content within each flexible column */
}

	/* Optional: Add padding or other styles to the flexible columns if needed */
	.flexible-column a,
	.flexible-column label {
		/* Example: Add some horizontal padding */
		padding: 0 0px;
	}

/* Styling for the third column */
.third-column {
	display: flex; /* Enables flex layout within this div */
	justify-content: flex-end; /* Right-aligns the content */
	align-items: center; /* Vertically centers the content */
	padding-left: 30px; /* 30px padding to the left */
	padding-right: 0px; /* 0px padding to the right */
	/* Ensure the third column doesn't grow or shrink */
	flex: 0 0 auto;
	align-self: stretch;
}

img {
	max-height: 100%; /* Limits the image's height to 100% of its container */
	height: auto; /* Adjusts the width automatically to maintain aspect ratio */
	display: block; /* Optional: Removes the bottom whitespace */
}


.form-style-1 input[type=text], 
.form-style-1 input[type=date],
.form-style-1 input[type=datetime],
.form-style-1 input[type=number],
.form-style-1 input[type=search],
.form-style-1 input[type=time],
.form-style-1 input[type=url],
.form-style-1 input[type=email],
textarea, 
select{
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	border:1px solid #BEBEBE;
	padding: 7px;
	margin:0px;
	outline: none;	
}
.form-style-1 input[type=text]:focus, 
.form-style-1 input[type=date]:focus,
.form-style-1 input[type=datetime]:focus,
.form-style-1 input[type=number]:focus,
.form-style-1 input[type=search]:focus,
.form-style-1 input[type=time]:focus,
.form-style-1 input[type=url]:focus,
.form-style-1 input[type=email]:focus,
.form-style-1 textarea:focus, 
.form-style-1 select:focus{
	-moz-box-shadow: 0 0 8px #88D5E9;
	-webkit-box-shadow: 0 0 8px #88D5E9;
	box-shadow: 0 0 8px #88D5E9;
	border: 1px solid #88D5E9;
}

.field-long, .field-divided {
	flex-grow: 1;
}

.form-style-1 .field-divided {
	width: 50%; 	/* calc(50% - 5px); 	*/
	/*margin-right: 10px;*/
}

.form-style-1 .field-long{
	width: 100%;
}
.form-style-1 .field-select{
	width: 100%;
}
.form-style-1 .field-textarea{
	height: 100px;
}

.form-style-1 input[type=submit], .form-style-1 input[type=button] {
	background: var(--client-color);
	padding: 8px 15px 8px 15px;
	border: none;
	color: #fff;
	height: 30px;
	margin-left: 3px;
	text-align: right;
	font-weight: bold;
}
.form-style-1 input[type=submit]:disabled, .form-style-1 input[type=button]:disabled {
	background-color: #A0A0A0;
	box-shadow: none;
	-moz-box-shadow: none;
	-webkit-box-shadow: none;
	cursor: not-allowed;
}
.form-style-1 input[type=submit]:not(:disabled):hover, .form-style-1 input[type=button]:not(:disabled):hover{
	background-color: #000;
	box-shadow:none;
	-moz-box-shadow:none;
	-webkit-box-shadow:none;
}
.form-style-1 .required{
	color:red;
}

button
{
	background: var(--client-color);
	padding: 8px 15px 8px 15px;
	border: none;
	color: #fff;
}
button:hover {
	background-color: #000;
	box-shadow:none;
	-moz-box-shadow:none;
	-webkit-box-shadow:none;
}

#projSettingsDescription {
	width: 100%; /* Full width, adjust as needed */
	height: 100px; /* Fixed height, adjust as needed */
	overflow-y: auto; /* Adds vertical scrollbar when content exceeds */
	resize: none;
}

.esri-widget__heading {
		/*color: var(--client-color);*/
		font-weight: 600;
		margin: 0 0 0.5rem 0;
	  }
h1.esri-widget__heading {
		font-size: 15px;
	  }
h2.esri-widget__heading {
		font-size: 14px;
	  }
h3.esri-widget__heading,
h4.esri-widget__heading,
h5.esri-widget__heading,
h6.esri-widget__heading {
		font-size: 13px;
	  }


/* ESRI Input inline styling - alternative approach */
.esri-input-inline {
	width: 100% !important;
	height: 100% !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 0 6px !important;
	border: 1px solid #ccc !important;
}

.traffic-table-cell {
	height: 32px;
}

/* Legend styling for layer titles, padding and margins */

#legendContainer .esri-legend__service-label {
	margin: 0.5rem 0 0.5rem 0;
	padding: 0px 5px;
}
#legendContainer .esri-legend__service {
	padding: 10px 6px;
}
#legendContainer .esri-legend__layer-cell{
	padding: 2px 6px;
}
#legendContainer .esri-legend__layer-cell--info{
	transform: translateY(1px);
}
#legendContainer .esri-legend__layer-body {
	margin-left: 0px !important;
}

/* ========================================
   UI Component Styles - Extracted from JavaScript
   ======================================== */

/* Top-right corner: CSS Grid — search full-width row 1, table+zoom side-by-side row 2 */
.esri-ui-top-right.esri-ui-corner {
    display: grid !important;
    grid-template-columns: auto auto;
    align-items: start;
    column-gap: 4px;
}

.esri-ui-top-right arcgis-search {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
}

.esri-ui-top-right #tableContainer {
    grid-column: 1;
    grid-row: 2;
    width: auto !important;
    height: auto !important;
    /* Grow up to the available screen height; the category rows (not the whole widget) scroll. */
    max-height: calc(100vh - 150px);
    overflow: hidden;
}

/* Completely invisible when no <table> inside — prevents ghost rectangle */
.esri-ui-top-right #tableContainer:not(:has(table)) {
    display: none;
}

/* Full display + visual chrome only when table content is present */
.esri-ui-top-right #tableContainer:has(table) {
    display: flex;              /* flex column so the scroll area can fill remaining height */
    flex-direction: column;
    min-height: 0;
    background-color: #fff;
    border: 1px solid var(--calcite-color-border-3, #dedede);
    box-shadow: var(--calcite-shadow-sm, 0 2px 8px 0 rgba(0, 0, 0, 0.04), 0 4px 16px 0 rgba(0, 0, 0, 0.08));
}

.esri-ui-top-right .esri-zoom {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;           /* right-align zoom within its column (fixes misalignment when table hidden) */
}

/* Widget spacing and layout */
.widget-spacing {
	margin-top: 20px;
}

.widget-spacing-sm {
	margin-top: 15px;
}

.widget-spacing-xs {
	margin-top: 10px;
}

.widget-spacing-micro {
	margin-top: 8px;
}

.widget-spacing-tiny {
	margin-top: 6px;
}

.widget-spacing-mini {
	margin-top: 5px;
}

.widget-spacing-minimal {
	margin-top: 4px;
}

.widget-spacing-minimal-plus {
	margin-top: 2px;
}

/* Transparency controls */
.transparency-container {
	margin-top: 15px;
	margin-bottom: 10px;
}

.transparency-label {
	font-size: 13px;
	font-weight: bold;
}

/* Individual layers container */
.individual-layers-container {
	margin-top: 15px;
}

.heading-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
}

.individual-heading {
	margin: 0;
}

.transparency-heading {
	margin: 0;
	margin-right: 20px;
	font-size: 12px;
	font-weight: bold;
}

/* Level toggle controls */
.level-toggle-container {
	margin-top: 8px;
	display: none; /* Initially hidden */
}

.level-toggle-container.visible {
	display: block;
}

.level-toggle-label {
	margin-left: 25px;
	font-size: 13px;
}

.level-toggle-wrapper {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-top: 6px;
	margin-left: 25px;
	font-size: 13px;
	font-weight: bold;
}

/* Legend container */
.legend-container {
	margin-top: 10px;
}

/* Radio button groups */
.radio-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.radio-button {
	margin: 4px;
	vertical-align: middle;
	transform: translateY(-1px);
}

.radio-label {
	margin: 0;
	vertical-align: middle;
	line-height: 1.2;
	cursor: pointer;
}

/* Slider containers */
.slider-container {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 2px;
	margin-left: 20px;
}

.slider-container-basemap {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}

.slider-layer {
	flex: 0 0 60px;
	height: 16px;
}

.slider-basemap {
	flex: 0 0 50%;
	height: 20px;
}

.slider-value-display {
	font-size: 10px;
	font-weight: bold;
	min-width: 25px;
	text-align: right;
}

.slider-value-display-basemap {
	font-size: 12px;
	font-weight: bold;
	min-width: 35px;
	text-align: right;
}

/* Layer row containers */
.layer-row-container {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 5px;
}

.checkbox-container {
	display: flex;
	align-items: center;
	gap: 5px;
	flex: 1;
}

.slider-column {
	display: flex;
	align-items: center;
	gap: 5px;
	flex: 0 0 auto;
}

/* Dialog styles */
.dialog-error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
	padding: 12px;
	border-radius: 4px;
}

.dialog-white-bg {
	background-color: white;
	padding: 12px;
	border-radius: 4px;
}

/* Traffic table styles */

/* Layout chain: the widget → custom div → container are flex columns so only the category-row
   scroll area grows/scrolls, while the toolbar (top) and footer/buttons (bottom) stay fixed. */
#customTrafficTable {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1 1 auto;
	overflow: hidden;
	padding: 0 !important;
}
.traffic-table-container {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1 1 auto;
	background-color: #f3f3f3;   /* light grey, matching the editor */
}

/* Both the scrollable category table and the fixed footer table share fixed column geometry.
   width: max-content keeps each table at exactly the summed column widths so the body and footer
   stay pixel-aligned regardless of the scroll area's scrollbar. */
.traffic-table {
	table-layout: fixed;
	width: max-content;
	/* separate (not collapse): collapsed borders are owned by the table, so a sticky header's
	   border vanishes on scroll and the collapsed border adds a ~1px height that creates a
	   phantom scrollbar. border-spacing:0 keeps cells flush. */
	border-collapse: separate;
	border-spacing: 0;
}

/* Top bar (multi-edit "Verkehrstabelle wählen" dropdown row / single-edit title) — white */
.traffic-table-controls-container {
	background-color: #fff;
	padding: 8px 4px;
}
.traffic-table-title {
	font-weight: bold;
	font-size: 14px;
	padding-left: 4px;
}

/* Uniform 4px left padding for the title row and every row below (incl. editable fields) */
.traffic-table th,
.traffic-table td {
	padding-left: 4px;
}

/* Fixed checkbox toolbar above the scroll area */
.traffic-table-toolbar {
	flex: 0 0 auto;
	padding: 6px 8px;
	border-bottom: 1px solid #ccc;
	border-top:1px solid #ccc;
	background-color: #fff;
}
.traffic-table-toolbar label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 12px;
	vertical-align: middle;
}

/* The only scrolling region: the single-category rows. #updateScrollOverflow() switches
   overflow-y to hidden when the rows fit (so no phantom 1px scrollbar) and to auto on real
   overflow. scrollbar-gutter:stable always reserves the scrollbar space — in BOTH states — so the
   widget keeps a constant width and doesn't jump wider when the scrollbar appears. */
.traffic-table-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-gutter: stable;
	background-color: #f3f3f3;
}
.traffic-table-scroll .traffic-table {
	background-color: transparent;
}

#customTrafficTable.hide-zero-null-rows tr.traffic-table-data-row[data-zero-null="true"] {
	display: none;
}
.traffic-table-header {
	text-align: left;
	padding: 6px 8px;
	/* Integer line-height so the header row height stays a whole number — a fractional height
	   (e.g. 30.2px) makes the scroll area's scrollHeight ceil above its floored clientHeight,
	   producing a 1px phantom scrollbar. */
	line-height: 18px;
	/* Fixed title row pinned to the top of the scroll area, light-grey background.
	   The bottom line is an inset box-shadow (not a border) so it doesn't add layout height
	   (no phantom scrollbar) and doesn't vanish while the rows scroll underneath. */
	position: sticky;
	top: 0;
	z-index: 3;
	background-color: #f3f3f3;
	box-shadow: inset 0 -1px 0 #ccc;
}

/* Editable value cells in the category rows stay white against the light-grey rows.
   Scoped to data rows so the (also-editable) sum cells keep their grey footer styling. */
.traffic-table-data-row .traffic-table-cell-editable {
	background-color: #fff;
}

/* Fixed footer table (sum/DTV/reset rows) — never scrolls, sits below the scroll area. */
.traffic-table-footer-table {
	flex: 0 0 auto;
}
.traffic-table-footer-table .traffic-table-reset-row td {
	background-color: #fff;
}

/* Everything from the divider down (bulk-action section) — white, like the editor */
.traffic-table-bulk-section {
	background-color: #fff;
}

.traffic-table-header-wide {
	width: 250px;
}

.traffic-table-header-normal {
	width: 90px;
}

.traffic-table-header-reset {
	width: 70px;
}
.traffic-table-cell {
	height: 22px;
}

.traffic-table-cell-editable {
	cursor: text;
}

/* Totals block: White bg, clearly separated from the categories by a strong top border,
   signalling "these are the sums". The border is on the cells (not the <tr>): with
   border-collapse:separate a <tr> border is not painted, only cell borders are. */
.traffic-table-sum-row {
	background-color: #e3e3e3; /* light grey, a touch darker than the rows above */
	font-weight: bold;
}
/* More specific than .traffic-table-footer-table .traffic-table-cell-editable so the 2px line
   also wins on the editable Nt/Nn sum cells (the DTV row gets no such line). */
.traffic-table-footer-table .traffic-table-sum-row td {
	border-top: 2px solid var(--client-color, #4a7fd6);
}

.traffic-table-cell-sum-label {
	font-weight: bold;
	color: #222;
}

.traffic-table-dtv-value-row {
	background-color: #e3e3e3; /* light grey, a touch darker than the rows above */
}
.traffic-table-cell-dtv-label {
	font-weight: bold;
	color: #222;
}

.traffic-table-cell-dtv-sum {
	font-weight: bold;
}

/* Editable sum / DTV cells: white with a visible border so it's obvious they can be edited,
   matching the look of the category value fields. */
.traffic-table-footer-table .traffic-table-cell-editable {
	background-color: #fff;
	border: 1px solid var(--client-color, #9bb4d8);

	cursor: text;
}

/* The DTV value box sits directly under the Summe box; drop its own top border so the two
   adjacent 1px edges don't read as a ~2px line above the DTV row (only the Summe row keeps the
   2px separator). */
.traffic-table-footer-table .traffic-table-dtv-value-row .traffic-table-cell-editable {
	border-top: 0;
}

.traffic-table-individual-reset {
	font-size: 11px;
	min-width: 55px;
}

.traffic-table-reset-cell {
	padding: 4px 8px;
	text-align: center;
}

.traffic-table-button {
	padding: 4px 8px;
	font-size: 13px;
	min-width: 60px;
	margin-top: 4px;
	margin-bottom: 4px;
}

/* Traffic table buttons: override esri-button--secondary with client color */
button.traffic-table-button {
	background: var(--client-color) !important;
	color: #fff !important;
	border: none !important;
}
button.traffic-table-button:hover {
	background-color: #000 !important;
}
button.traffic-table-button:disabled {
	background: var(--client-color-disabled) !important;
	color: #e8e8f0 !important;
	cursor: not-allowed;
}

/* Reset buttons: outline look — text and border in client color, white background */
button.traffic-table-reset-button {
	background: #fff !important;
	color: var(--client-color) !important;
	border: 1px solid var(--client-color) !important;
}
button.traffic-table-reset-button:hover {
	background-color: #f7f7f7 !important;
	color: var(--client-color) !important;
}
button.traffic-table-reset-button:disabled {
	background: #fff !important;
	color: #cacaca !important;
	border-color: #cacaca !important;
	cursor: not-allowed;
}

/* Search element */
.search-element {
	margin-top: 10px;
}

/* ArcGIS Search component styling */
.esri-search__input {
	border: 1px solid #ccc;
	padding: 8px 12px;
	background-color: white;
}

.esri-search__input:focus {
	border-color: #66afe9;
	box-shadow: 0 0 5px rgba(102, 175, 233, 0.3);
	outline: none;
}

.esri-search__input:hover {
	border-color: #999;
}

/* Fallback styling for arcgis-search component */
arcgis-search {
	--calcite-color-border-input: #ccc;
	--calcite-color-border-input-hover: #999;
	--calcite-color-border-input-focus: #66afe9;
	--calcite-color-background-input: white;
	--calcite-border-radius: 4px;
	--calcite-spacing-s: 8px;
	--calcite-spacing-xs: 12px;
	width: 300px;
}

/* Calcite input message styling - force to new line even with layout="inline" */
calcite-label[layout="inline"] {
    position: relative !important;
}

/* style the error message */
calcite-label[layout="inline"] calcite-input-message {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10 !important;
    padding: 0px 0 !important;
    width: 100% !important;
    margin-top: 0px !important;
    margin-left: 0px !important;
    margin-right: 0 !important;
}

/* Only add margin-bottom when there's actually an error message */
calcite-label[layout="inline"]:has(calcite-input-message) {
    margin-bottom: 25px !important;
}

/* Style the error message icon and text */
calcite-input-message[status="invalid"] {
    color: var(--calcite-color-status-danger, #e34850) !important;
}

.flex-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.flex-start {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.text-center {
	text-align: center;
}

.text-left {
	text-align: left;
}

.text-right {
	text-align: right;
}

.margin-top-sm {
	margin-top: 10px;
}

.margin-top-md {
	margin-top: 15px;
}

.margin-top-lg {
	margin-top: 20px;
}

.margin-bottom-sm {
	margin-bottom: 10px;
}

.margin-bottom-md {
	margin-bottom: 15px;
}

.margin-bottom-lg {
	margin-bottom: 20px;
}

.padding-sm {
	padding: 8px;
}

.padding-md {
	padding: 12px;
}

.padding-lg {
	padding: 16px;
}

.border-radius-sm {
	border-radius: 4px;
}

.border-radius-md {
	border-radius: 8px;
}

.border-radius-lg {
	border-radius: 12px;
}

/* ═══════ Profile Tool (DTM Höhenprofil) ═══════ */
.profile-panel {
	position: absolute;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	width: 800px;
	min-width: 500px;
	max-width: 95vw;
	aspect-ratio: 900 / 650;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 6px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
	z-index: 20;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	resize: horizontal;
}

.profile-panel.hidden {
	display: none !important;
}

.profile-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px;
	background: var(--client-color);
	color: #fff;
	cursor: move;
	user-select: none;
	flex-shrink: 0;
}

.profile-panel__title {
	font: 13px "Lucida Sans Unicode", "Lucida Grande", sans-serif;
	font-weight: 600;
}

.profile-panel__header-actions {
	display: flex;
	gap: 4px;
}

.profile-panel__header-actions calcite-action {
	--calcite-action-background-color: transparent;
	--calcite-action-text-color: #fff;
}

/* Editor calcite-buttons: solid/default → client color (excludes danger prompt) */
.esri-editor calcite-button:not(:is(.esri-editor__prompt--danger *)):not([appearance="outline"]):not([appearance="transparent"]):not([disabled]):not(:hover) {
	--calcite-button-background-color: var(--client-color);
	--calcite-button-text-color: #fff;
	--calcite-button-icon-color: #fff;
}
.esri-editor calcite-button:not(:is(.esri-editor__prompt--danger *)):not([appearance="outline"]):not([appearance="transparent"]):not([disabled]):hover {
	--calcite-button-background-color: #000;
	--calcite-button-text-color: #fff;
	--calcite-button-icon-color: #fff;
}
/* Editor calcite-buttons: outline → white bg, client color border/text/icon (excludes danger prompt) */
.esri-editor calcite-button:not(:is(.esri-editor__prompt--danger *))[appearance="outline"]:not([disabled]):not(:hover) {
	--calcite-button-border-color: var(--client-color);
	--calcite-button-text-color: var(--client-color);
	--calcite-button-icon-color: var(--client-color);
}
.esri-editor calcite-button:not(:is(.esri-editor__prompt--danger *))[appearance="outline"]:not([disabled]):hover {
	--calcite-button-background-color: var(--calcite-ui-foreground-2);
	--calcite-button-border-color: var(--client-color);
	--calcite-button-text-color: var(--client-color);
	--calcite-button-icon-color: var(--client-color);
}
/* Editor calcite-buttons: disabled (excludes danger prompt) */
.esri-editor calcite-button:not(:is(.esri-editor__prompt--danger *)):not([appearance="outline"]):not([appearance="transparent"])[disabled] {
	--calcite-button-background-color: var(--client-color-disabled);
	--calcite-button-text-color: #e8e8f0;
	--calcite-button-icon-color: #e8e8f0;
}
.esri-editor calcite-button:not(:is(.esri-editor__prompt--danger *))[appearance="outline"][disabled] {
	--calcite-button-border-color: var(--client-color-disabled);
	--calcite-button-text-color: var(--client-color-disabled);
	--calcite-button-icon-color: var(--client-color-disabled);
}

/* Profile panel calcite-buttons: solid → client color */
.profile-panel calcite-button[appearance="solid"]:not([disabled]):not(:hover) {
	--calcite-button-background-color: var(--client-color);
	--calcite-button-text-color: #fff;
	--calcite-button-icon-color: #fff;
}
.profile-panel calcite-button[appearance="solid"]:not([disabled]):hover {
	--calcite-button-background-color: #000;
	--calcite-button-text-color: #fff;
	--calcite-button-icon-color: #fff;
}
/* Profile panel calcite-buttons: outline → white bg, client color border/text/icon */
.profile-panel calcite-button[appearance="outline"]:not([disabled]):not(:hover) {
	--calcite-button-border-color: var(--client-color);
	--calcite-button-text-color: var(--client-color);
	--calcite-button-icon-color: var(--client-color);
}
.profile-panel calcite-button[appearance="outline"]:not([disabled]):hover {
	--calcite-button-background-color: var(--calcite-ui-foreground-2);
	--calcite-button-border-color: var(--client-color);
	--calcite-button-text-color: var(--client-color);
	--calcite-button-icon-color: var(--client-color);
}
/* Profile panel calcite-buttons: disabled */
.profile-panel calcite-button[appearance="solid"][disabled] {
	--calcite-button-background-color: var(--client-color-disabled);
	--calcite-button-text-color: #e8e8f0;
	--calcite-button-icon-color: #e8e8f0;
}
.profile-panel calcite-button[appearance="outline"][disabled] {
	--calcite-button-border-color: var(--client-color-disabled);
	--calcite-button-text-color: var(--client-color-disabled);
	--calcite-button-icon-color: var(--client-color-disabled);
}

.profile-panel__body {
	flex: 1;
	padding: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.profile-panel__body canvas {
	flex: 1;
	min-height: 0;
}

.profile-panel__controls {
	display: flex;
	gap: 6px;
	padding: 6px 0 0;
	flex-wrap: wrap;
	flex-shrink: 0;
	align-items: center;
}

.profile-panel__z-input {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	flex-shrink: 0;
	min-height: 32px;
}