:root {
	--client-color: #0f05a0;
	--client-color-light: rgb(194, 193, 239); 
}

/* Specific styling for expand toggle and widget buttons only */
.esri-expand__toggle calcite-action,
.esri-widget--button calcite-action {
	--calcite-ui-foreground-1: #1b0bff25;
	--calcite-combobox-item-spacing-unit-l: 0.65rem;
	--calcite-combobox-item-spacing-unit-s: 0.45rem;
	--calcite-combobox-input-height: 1.5rem;
	--calcite-action-background-color: var(--client-color);
	--calcite-icon-color: #fff !important;
}

.esri-expand__toggle calcite-action:hover,
.esri-widget--button calcite-action:hover {
	--calcite-icon-color: #000 !important;
}

/*Nur Zoom-Buttons*/
.esri-widget--button:is(calcite-button):not(:hover) {
	--calcite-ui-icon-color: #fff !important;
}

.esri-widget--button:is(calcite-button):hover {
	--calcite-ui-icon-color: #000 !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;
}

.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: 20px 12px 10px 20px;
  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;
}

.error {
	color: red;
}

.whitebg {
	background-color: white;
  }

  .instructions {
	padding: 10px 10px 0;
  }

vaadin-grid-cell-content {
	white-space: normal !important;
	width: fit-content;
}


.esri-ui-corner .esri-expand .esri-widget--panel {
	max-height: calc(90vh - 100px);
	width: 330px;
}
/*Manipule editor widget design*/

/* Editor Widget vergrößern */
.esri-editor {
	width: 400px !important; 
}

.esri-editor .esri-widget--panel {
	width: 350px !important;
}

/*relative size of input fields - apply only inside the ArcGIS Editor*/
 .esri-editor .esri-feature-form__input {
	width: 180px;
}

/*label width consistent*/
.esri-feature-form__label-text-content {
    width: 150px;
}

/* 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 */
}

	.form-style-1 .form-item label {
		margin-right: 10px; /* Spacing between label and input */
		white-space: nowrap; /* Prevents label from wrapping */
		width: 300px;
	}

/*form style from https://www.sanwebe.com/2014/08/css-html-forms-designs*/
.form-style-1 {
	margin:10px auto;
    /*max-width: 80%;*/
	padding: 20px 12px 10px 20px;
	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;*/
}

.labelRightSide {
	font-size: 10px;
	font-weight: normal;
}

#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 .submit-button-cell {
	width: 10%; /* Set the cell width */
	text-align: right; /* Align content to the right */
}

.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: 10px;
	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;
}
.form-style-1 input[type=submit]:hover, .form-style-1 input[type=button]: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--button
 {
    	background-color: var(--client-color) !important;
		color: #ffffff !important;
      }

.esri-widget--button:focus,
.esri-widget--button:hover
 {
        background-color: #ffffff !important;
        color: #000000 !important;
      }


.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
   ======================================== */

/* 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 */
.traffic-table-header {
	text-align: left;
	border-bottom: 1px solid #ccc;
	padding: 6px 8px;
}

.traffic-table-header-wide {
	width: 250px;
}

.traffic-table-header-normal {
	width: 100px;
}

.traffic-table-header-reset {
	width: 70px;
}
.traffic-table-cell {
	height: 22px;
}

.traffic-table-cell-editable {
	cursor: text;
}

.traffic-table-sum-row {
	background-color: #cacaca;
	border-top: 2px solid #000000;
	font-weight: bold;
}

.traffic-table-cell-sum-label {
	font-weight: bold;
	color: #333;
}

.traffic-table-dtv-value-row {
	background-color: #cacaca;
	border-top: 1px solid #999;
}

.traffic-table-cell-dtv-label {
	font-weight: bold;
	color: #333;
}

.traffic-table-cell-dtv-sum {
	font-weight: bold;
}

.traffic-table-individual-reset {
	font-size: 11px;
	min-width: 55px;
}

.traffic-table-reset-cell {
	padding: 4px 8px;
	text-align: center;
}

.traffic-table-reset-button {
	padding: 4px 8px;
	font-size: 12px;
	min-width: 60px;
}

/* 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;
}

/* 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;
}