.openlime {
	position: relative;
	background-color: #FFF;
	height: 100%;
	touch-action: none;	/* Remove default behavior of the user agent */
}

.openlime>canvas {
	width: 100%;      /* leave this at 100%, it's needed to align annotations correctly */
	height: 100%;
	overflow: hidden; /* this is important, it would cause firefox flickering! */
	padding: 0px;
	display: block;   /* avoid baseline 1px gap under inline canvas */
}

.openlime-overlay, .openlime-svgoverlay {
	position: absolute;
	top: 0;
	width: 100%;
	height: 100%;
}

.openlime-overlay {
	position: absolute;
	top: 0px;
	width: 100%;
	height: 100%;
}

.openlime-scale {
	position: fixed;
	bottom: calc(5vh + 25px);
	right: 10px;
	width: 200px;
	height: 40px;
	padding: 15px;
	fill: white;
	z-index: 10;
}

.openlime-scale>text {
	font-size: 36px;
}

.openlime-scale>line {
	stroke: white;
	stroke-width: 2px;
}

/* DIALOG */

.openlime-dialog-background {
	opacity: 1.0;
	transition: visibility 0s linear 300ms, opacity 300ms;

	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	color: #fff;
	background: rgb(0, 0, 0, 0.5);
	padding: 20px 40px;
	border-radius: 5px;
	cursor: pointer;
}

.openlime-dialog {
	position: absolute;
	top: 10%;
	left: 15%;
	right: 15%;
	bottom: 7%;
	color: #fff;
	font-family: "Open Sans", sans-serif;
	background: rgb(32, 32, 32, 0.9);
	opacity: 0.95;
	padding: 20px 40px;
	border-radius: 5px;
	cursor: auto;
	transition: visibility 0s linear 0s, opacity 300ms;
	overflow-y: auto;
}

.openlime-dialog.openlime-info {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 25%;
	height: fit-content;
	background-color: rgb(20, 20, 20, 0.9);
	padding: 0px 10px;
	color: white;
	border-radius: 3px;
	border: 1px solid rgb(60, 60, 60);
}

.openlime-dialog.fading {
	opacity: 0.0;
}

.openlime-dialog.hidden, .openlime-dialog-background.hidden {
	visibility: hidden;
	opacity: 0.0;
}

.openlime-dialog .openlime-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	cursor: pointer;
}

.openlime-close * {
	stroke: #fff !important;
	fill: #fff !important;
}

.openlime-close:hover * {
	opacity: 70%;
}

/* TOOLBAR */

.openlime-toolbar rect[style] {
	fill: rgb(255, 255, 255, 0) !important;
	stroke: none !important;
}

.openlime-toolbar svg path[style],
.openlime-toolbar svg path,
.openlime-toolbar path[style],
.openlime-toolbar path {
	stroke: white !important;
	fill: white !important;
}

.openlime-toolbar svg g path {
	stroke: white !important;
	fill: white !important;
}

.openlime-toolbar svg:hover path[style],
.openlime-toolbar svg:hover path,
.openlime-toolbar svg:hover g path {
	stroke:  #818181 !important;
	fill:  #818181 !important;
}

.openlime-toolbar text {
	stroke: white !important;
	fill: white !important
}

.openlime-toolbar {
	position: fixed;
	bottom: 10px;
	right: 10px;
	padding: 5px;
	background-color: rgba(40, 40, 40, 0.9);
	border-radius: 8px;

	display: flex;
}


.openlime-toolbar svg:not(:root) {
	width: auto;
	height: 5vh;
	display: block;
}

.openlime-toolbar .openlime-button:hover {
	cursor: pointer;
	opacity: 1;
}

.openlime-light .openlime-bulb path[style] {
	fill: #80808011 !important;
}

.openlime-light-active .openlime-bulb path[style] {
	fill: #ffcc00 !important;
}

.openlime-lightdir {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.openlime-lightdir line {
	stroke: #ff0;
	opacity: 0.4;
	stroke-width: 1.5px;
	vector-effect: non-scaling-stroke;
}

g.openlime-compact {
	visibility: hidden !important;
}

g.openlime-expand {
	visibility: visible !important;
}

.openlime-fullscreen-active g.openlime-compact {
	visibility: visible !important;
}

.openlime-fullscreen-active g.openlime-expand {
	visibility: hidden !important;
}

.openlime-help-window.shown {
	visibility: visible;
	opacity: 0.95;
	transition: visibility 0s linear 0s, opacity 300ms;

}

.openlime-help-window {

	opacity: 0.0;
	visibility: hidden;
	transition: visibility 0s linear 300ms, opacity 300ms;

	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	color: #fff;
	background: rgb(0, 0, 0, 0.5);
	padding: 20px 40px;
	border-radius: 5px;
	font-family: "Open Sans", sans-serif;
	cursor: pointer;
}

.openlime-help-content {
	position: absolute;
	top: 10%;
	left: 30%;
	right: 30%;
	bottom: 10%;
	color: #fff;
	background: #222;
	opacity: 0.95;
	padding: 20px 40px;
	border-radius: 5px;
	cursor: auto;
}

.openlime-help-window .openlime-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	cursor: pointer;
}

/* ATTRIBUTION */

.openlime-attribution {
	position: absolute;
	left: 20px;
	bottom: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 10px;
	color: white;
	z-index: 1000;
}

/* LAYERS MENU - MODERNIZED */

.openlime-layers-menu {
	position: absolute;
	display: flex;
	flex-direction: column;
	top: 0;
	left: -280px;
	/* Start off-screen */
	height: 100%;
	width: 280px;
	max-width: 280px;
	overflow: hidden;
	transition: left 0.3s ease-in-out;
	font-family: "Open Sans", sans-serif;
	color: #f0f0f0;
	background-color: rgba(40, 40, 40, 0.95);
	box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
	border-right: 1px solid rgba(255, 255, 255, 0.1);
	z-index: 100;
}

.openlime-layers-menu.open {
	left: 0;
}

.openlime-layers-menu.closing {
	left: -280px;
}

/* Header with title and close button */
.openlime-layers-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 8px;
	background-color: rgba(30, 30, 30, 0.9);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	min-height: auto;
}

.openlime-layers-header h2 {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
}

.openlime-layers-close-btn {
	background: transparent;
	border: none;
	color: #f0f0f0;
	font-size: 24px;
	cursor: pointer;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s;
}

.openlime-layers-close-btn:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

/* Content area */
.openlime-layers-content {
	flex: 1;
	overflow-y: auto;
}

/* Section headers */
.openlime-section {
	font-size: 14px;
	font-weight: 500;
	margin: 8px 5px 4px 5px;
	padding-bottom: 3px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	color: #000000;
}

/* Entry styling */
.openlime-entry {
	display: flex;
	align-items: center;
	margin: 5px 0;
	padding: 10px 12px;
	border-radius: 6px;
	color: #f0f0f0;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
	font-size: 14px;
	cursor: pointer;
	position: relative;
}

/* Layer entries */
.openlime-layer-entry {
	background-color: rgba(60, 60, 60, 0.5);
	font-weight: 500;
}

.openlime-layer-entry:hover {
	background-color: rgba(80, 80, 80, 0.8);
}

.openlime-layer-entry.active {
	background-color: rgba(70, 130, 180, 0.6);
	color: #ffffff;
}

.openlime-layer-icon {
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-right: 10px;
	background-color: currentColor;
	border-radius: 3px;
	opacity: 0.7;
}

.openlime-layer-name {
	flex: 1;
}

.openlime-layer-status {
	font-weight: bold;
	font-size: 16px;
	color: #4CAF50;
}

/* Mode entries */
.openlime-mode-entry {
	padding-left: 25px;
	background-color: rgba(50, 50, 50, 0.3);
	margin-left: 15px;
	font-size: 13px;
}

.openlime-mode-entry:hover {
	background-color: rgba(70, 70, 70, 0.5);
}

.openlime-mode-entry.active {
	background-color: rgba(60, 100, 140, 0.5);
	color: #ffffff;
}

.openlime-mode-icon {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 8px;
	background-color: currentColor;
	border-radius: 50%;
	opacity: 0.7;
}

/* Lists (for mode groups) */
.openlime-list {
	margin-left: 0;
	display: flex;
	flex-direction: column;
	height: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease-out;
}

.active+.openlime-list {
	height: auto;
	max-height: 500px;
	/* Large enough to contain content */
	margin-top: 5px;
	margin-bottom: 10px;
}

/* Slider improvements */
.openlime-slider-container {
	display: flex;
	align-items: center;
	padding: 5px 15px 15px 35px;
}

.openlime-slider {
	flex: 1;
	height: 6px;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.2);
	outline: none;
	border-radius: 3px;
}

.openlime-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #4CAF50;
	cursor: pointer;
	transition: background 0.2s;
}

.openlime-slider::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #4CAF50;
	cursor: pointer;
	transition: background 0.2s;
	border: none;
}

.openlime-slider::-webkit-slider-thumb:hover {
	background: #5DBE60;
}

.openlime-slider::-moz-range-thumb:hover {
	background: #5DBE60;
}

.openlime-slider-value {
	min-width: 30px;
	text-align: right;
	margin-left: 10px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}

/* Scrollbar styling */
.openlime-layers-content::-webkit-scrollbar {
	width: 6px;
}

.openlime-layers-content::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.1);
}

.openlime-layers-content::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 6px;
}

.openlime-layers-content::-webkit-scrollbar-thumb:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

/* Annotations better styling - Scrollable and collapsable */
/* Annotations list - simple scrollable list */
.openlime-list.openlime-annotations {
	padding: 0;
	border-radius: 6px;
	background-color: rgba(40, 40, 40, 0.4);
	margin-top: 8px;
	display: block;
	max-height: 400px;
	overflow-y: auto;
	overflow-x: hidden;
}

/* Sections collapsables */
.openlime-collapsable-section {
	margin-bottom: 4px;
}

.openlime-section-header {
	font-weight: bold;
	padding: 8px;
	background: rgba(0, 0, 0, 0.2);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	user-select: none;
	transition: background 0.2s;
}

.openlime-section-header:hover {
	background: rgba(0, 0, 0, 0.3);
}

.openlime-section-content {
	max-height: 300px;
	overflow-y: auto;
	overflow-x: hidden;
}

.openlime-list-item {
	padding: 6px 12px;
	cursor: pointer;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	transition: background 0.2s;
}

.openlime-list-item:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

/* Annotations menu (scrollable content) */
.openlime-list.openlime-annotations .openlime-annotations-menu {
	display: block !important;
	position: relative !important;
	top: auto !important;
	right: auto !important;
	left: auto !important;
	margin: 0;
	list-style: none;
	background-color: transparent;
	min-height: 300px;
	max-height: calc(100vh - 200px);
	overflow-y: auto;
	overflow-x: hidden;
	border-radius: 6px;
}

/* Annotations option styling */
.openlime-annotations-option {
	margin: 3px 0;
	padding: 8px 12px;
	color: #f0f0f0;
	font-size: 13px;
	cursor: pointer;
	transition: background-color 0.2s;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-radius: 4px;
}

.openlime-annotations-option:hover {
	background-color: rgba(70, 70, 70, 0.8);
}

.openlime-annotations-option.selected {
	background-color: rgba(70, 130, 180, 0.6);
	color: #ffffff;
}

.openlime-annotations-option.selected:hover {
	background-color: rgba(80, 140, 190, 0.8);
}

.openlime-annotations-text {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-right: 10px;
}

.openlime-annotations-visibility {
	display: flex;
	align-items: center;
	padding: 2px;
	border-radius: 3px;
	transition: background-color 0.2s;
}

.openlime-annotations-visibility:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

/* Visibility icons styling */
.openlime-annotations-option .openlime-eye,
.openlime-annotations-option.hidden .openlime-eye-off {
	display: block;
}

.openlime-annotations-option .openlime-eye-off,
.openlime-annotations-option.hidden .openlime-eye {
	display: none;
}

.openlime-annotations-option.hidden {
	opacity: 0.5;
}

.openlime-annotations-option.hidden .openlime-annotations-text {
	text-decoration: line-through;
}

/* Scrollbar for annotations menu */
.openlime-annotations-menu::-webkit-scrollbar {
	width: 6px;
}

.openlime-annotations-menu::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.1);
}

.openlime-annotations-menu::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 6px;
}

.openlime-annotations-menu::-webkit-scrollbar-thumb:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

/* Uniform UI Controls */

/* Separator between modes and uniforms */
.openlime-uniform-separator {
	margin: 10px 0;
	height: 1px;
	background-color: rgba(255, 255, 255, 0.15);
}

/* Uniforms section header */
.openlime-uniform-section {
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.8);
	margin: 15px 0 8px 0;
	padding-left: 5px;
	padding-bottom: 5px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Container for uniform item */
.openlime-uniform-container {
	margin: 8px 0;
	padding: 6px 8px;
	background-color: rgba(60, 60, 60, 0.3);
	border-radius: 4px;
}

/* Uniform name */
.openlime-uniform-name {
	font-size: 13px;
	margin-bottom: 5px;
	color: #e0e0e0;
}

/* Wrapper for the actual control */
.openlime-uniform-control-wrapper {
	margin-top: 5px;
	width: 100%;
	/* Assicura che il wrapper prenda tutta la larghezza disponibile */
}

/* Line edit styling */
.openlime-uniform-line-edit {
	width: calc(100% - 18px);
	/* Riduce la larghezza per tenerlo dentro il container */
	background-color: rgba(40, 40, 40, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 3px;
	color: #ffffff;
	padding: 6px 8px;
	font-size: 12px;
	transition: border-color 0.2s, background-color 0.2s;
	box-sizing: border-box;
	/* Assicura che padding non aumenti la dimensione */
}

.openlime-uniform-line-edit:focus {
	background-color: rgba(50, 50, 50, 0.8);
	border-color: rgba(100, 160, 220, 0.6);
	outline: none;
}

/* Slider styling */
.openlime-uniform-slider-container {
	display: flex;
	align-items: center;
	width: 100%;
}

.openlime-uniform-slider {
	flex: 1;
	height: 6px;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
	outline: none;
}

.openlime-uniform-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #4CAF50;
	cursor: pointer;
	transition: background-color 0.2s;
}

.openlime-uniform-slider::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #4CAF50;
	cursor: pointer;
	border: none;
}

.openlime-uniform-slider::-webkit-slider-thumb:hover {
	background-color: #5DBE60;
}

.openlime-uniform-slider::-moz-range-thumb:hover {
	background-color: #5DBE60;
}

.openlime-uniform-slider-value {
	min-width: 40px;
	text-align: right;
	margin-left: 10px;
	font-size: 12px;
	background-color: rgba(40, 40, 40, 0.6);
	color: rgba(255, 255, 255, 0.8);
	padding: 2px 6px;
	border-radius: 3px;
}

/* Checkbox styling */
.openlime-uniform-checkbox-wrapper {
	display: inline-block;
	position: relative;
	cursor: pointer;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.openlime-uniform-checkbox {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.openlime-uniform-checkbox-custom {
	position: relative;
	display: inline-block;
	height: 20px;
	width: 20px;
	background-color: rgba(40, 40, 40, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 3px;
	transition: background-color 0.2s;
}

.openlime-uniform-checkbox:checked~.openlime-uniform-checkbox-custom {
	background-color: rgba(76, 175, 80, 0.8);
	border-color: rgba(255, 255, 255, 0.4);
}

.openlime-uniform-checkbox-custom:after {
	content: "";
	position: absolute;
	display: none;
	left: 7px;
	top: 3px;
	width: 4px;
	height: 9px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.openlime-uniform-checkbox:checked~.openlime-uniform-checkbox-custom:after {
	display: block;
}

.openlime-uniform-checkbox:focus~.openlime-uniform-checkbox-custom {
	box-shadow: 0 0 0 2px rgba(100, 160, 220, 0.3);
}


/* editor */

.openlime-annotation-edit {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px;
	background-color: rgba(40, 40, 40, 0.6);
	border-radius: 6px;
	margin: 0;
	position: relative;
	z-index: 1001;
}

.openlime-annotation-edit br {
	display: none;
}

.openlime-annotation-edit.hidden {
	display: none;
}

.openlime-annotation-edit-tools svg,
.openlime-tools svg {
	height: 25px;
	cursor: pointer;
	margin-right: 0;
}

.openlime-tools {
	margin-top: 5px;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.openlime-tool {
	height: 25px;
	width: 25px;
}

.openlime-annotation-edit label {
	display: block;
	color: #f0f0f0;
	font-size: 13px;
	margin-bottom: 2px;
	font-weight: 500;
}

.openlime-annotation-edit input[type="text"] {
	width: 100%;
	padding: 6px 10px;
	background-color: rgba(255, 240, 224, 0.9);
	border: 1px solid rgba(255, 200, 150, 0.5);
	border-radius: 4px;
	color: #212924;
	font-size: 13px;
	box-sizing: border-box;
	margin-bottom: 0;
}

.openlime-annotation-edit input[type="text"]:focus {
	outline: none;
	border-color: rgba(255, 200, 150, 0.8);
	background-color: rgba(255, 250, 240, 0.95);
}

.openlime-annotation-edit textarea {
	width: 100%;
	padding: 6px 10px;
	background-color: rgba(224, 240, 255, 0.9);
	border: 1px solid rgba(150, 200, 255, 0.5);
	border-radius: 4px;
	color: #212924;
	font-size: 13px;
	box-sizing: border-box;
	resize: vertical;
	margin-bottom: 0;
	font-family: inherit;
}

.openlime-annotation-edit textarea:focus {
	outline: none;
	border-color: rgba(150, 200, 255, 0.8);
	background-color: rgba(240, 250, 255, 0.95);
}

.openlime-annotation-edit span {
	display: block;
	color: #f0f0f0;
	font-size: 13px;
	margin-bottom: 2px;
	font-weight: 500;
}

.openlime-annotation-edit select,
.openlime-annotation-edit option {
	width: 100%;
	padding: 6px 10px;
	background-color: rgba(240, 255, 224, 0.9);
	border: 1px solid rgba(200, 255, 150, 0.5);
	border-radius: 4px;
	color: #212924;
	font-size: 13px;
	box-sizing: border-box;
	margin-bottom: 0;
}

.openlime-annotation-edit select:focus {
	outline: none;
	border-color: rgba(200, 255, 150, 0.8);
	background-color: rgba(250, 255, 240, 0.95);
}

.openlime-annotation-edit option:hover {
	background: rgba(200, 255, 150, 0.7);
}

.openlime-annotation-edit button.openlime-state {
	padding: 8px 16px;
	background-color: rgba(203, 152, 54, 0.9);
	border: 1px solid rgba(203, 152, 54, 0.7);
	border-radius: 4px;
	color: #ffffff;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s;
	margin-right: 8px;
}

.openlime-annotation-edit button.openlime-state:hover {
	background-color: rgba(203, 152, 54, 1);
	border-color: rgba(203, 152, 54, 1);
}

.openlime-annotation-edit input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-right: 6px;
	cursor: pointer;
	accent-color: rgba(203, 152, 54, 0.8);
}

.openlime-annotation-edit span:has(button),
.openlime-annotation-edit span:has(input[type="checkbox"]) {
	display: flex;
	align-items: center;
	margin-top: 0;
	margin-bottom: 0;
}

.openlime-annotation-edit .openlime-select {
	background: rgba(240, 255, 224, 0.9);
	border: 1px solid rgba(200, 255, 150, 0.5);
	border-radius: 4px;
	height: auto;
	min-height: 32px;
	margin-bottom: 0;
}

.openlime-annotation-edit .openlime-select-button {
	background-color: rgba(240, 255, 224, 0.9);
	padding: 8px 30px 8px 12px;
	color: #212924;
	display: flex;
	align-items: center;
	height: 100%;
	min-height: 36px;
}

.openlime-annotation-edit .openlime-select-button:hover {
	background-color: rgba(250, 255, 240, 0.95);
}

.openlime-annotation-edit .openlime-select-button:after {
	border-color: #212924 transparent transparent transparent;
	top: 50%;
	transform: translateY(-50%);
}

.openlime-annotation-edit .active .openlime-select-button {
	background-color: rgba(250, 255, 240, 0.95);
}

.openlime-annotation-edit .active .openlime-select-button:after {
	top: 50%;
	transform: translateY(-50%);
	border-color: transparent transparent #212924 transparent;
}

.openlime-annotation-edit .openlime-select-menu {
	background-color: rgba(250, 255, 240, 0.98);
	border: 1px solid rgba(200, 255, 150, 0.7);
	border-radius: 0 0 4px 4px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.openlime-annotation-edit .openlime-select-menu li {
	color: #212924;
	padding: 8px 12px;
	text-indent: 0;
}

.openlime-annotation-edit .openlime-select-menu li:hover {
	background-color: rgba(200, 255, 150, 0.5);
	color: #212924;
}

.openlime-annotation-edit-tools {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	background-color: rgba(40,40,40,0);
	border-radius: 4px;
	margin-top: 0;
	position: relative;
	z-index: 1002;
}

.openlime-eye,
.openlime-eye-off {
	height: 14px;
	float: right;
}

.openlime-eye,
.hidden .openlime-eye-off {
	display: block;
}

.openlime-eye-off,
.hidden .openlime-eye {
	display: none;
}

.openlime-eye:hover,
.openlime-eye-off:hover {
	color: #ffa;
}

/*.openlime-annotation-edit-tools .active {  background-color:rgb(80, 80, 80); } */

.openlime-tool.active,
.openlime-tool.active * {
	stroke: #fff !important;
}

.openlime-annotation-edit-tools .active * {
	stroke: #fff !important;
}

/* Conteneur pour le panneau d'édition d'annotation (hors menu layers) */
.openlime-annotation-edit-container {
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1000;
	max-width: 600px;
	width: auto;
}

/* Styles améliorés pour le panneau d'édition d'annotation */
.openlime-annotation-edit-container .openlime-annotation-edit {
	background-color: rgba(40, 40, 40, 0.9) !important;
	backdrop-filter: blur(10px) !important;
	border-radius: 8px;
	padding: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 8px;
}

/* Masquer les éléments non désirés dans le panneau d'édition */
.openlime-annotation-edit-container .openlime-annotation-edit label[for="description"],
.openlime-annotation-edit-container .openlime-annotation-edit textarea[name="description"],
.openlime-annotation-edit-container .openlime-annotation-edit span:has(+ .openlime-select),
.openlime-annotation-edit-container .openlime-annotation-edit .openlime-select,
.openlime-annotation-edit-container .openlime-annotation-edit label[for="data-data-idx"],
.openlime-annotation-edit-container .openlime-annotation-edit input[name="data-data-idx"],
.openlime-annotation-edit-container .openlime-annotation-edit label[for="data-data-graffitiId"],
.openlime-annotation-edit-container .openlime-annotation-edit input[name="data-data-graffitiId"],
.openlime-annotation-edit-container .openlime-annotation-edit label[for="label"],
.openlime-annotation-edit-container .openlime-annotation-edit input[name="label"],
.openlime-annotation-edit-container .openlime-annotation-edit button.openlime-state,
.openlime-annotation-edit-container .openlime-annotation-edit input[type="checkbox"],
.openlime-annotation-edit-container .openlime-annotation-edit span:has(input[type="checkbox"]) {
	display: none !important;
}

/* Afficher uniquement tools et le nom du graffiti */
.openlime-annotation-edit-container .openlime-annotation-edit .openlime-annotation-edit-tools {
	display: flex !important;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 4px;
	margin-top: 0;
	align-items: center;
}

/* Style pour le nom du graffiti (id_bdc) */
.openlime-annotation-edit-container .openlime-annotation-edit .graffiti-id-display {
	color: #f0f0f0;
	font-size: 14px;
	font-weight: 500;
	margin: 0;
	padding: 0 6px;
	text-align: center;
	white-space: nowrap;
	order: 2;
}

/* Style pour le color picker */
.openlime-annotation-edit-container .openlime-annotation-edit .openlime-color-picker {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 4px;
	flex-shrink: 0;
	order: 3;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-color-picker span {
	color: #f0f0f0;
	font-size: 12px;
	margin-right: 2px;
	display: none;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-color-picker select {
	background: #333;
	color: #f0f0f0;
	border: 1px solid #555;
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 12px;
	cursor: pointer;
	outline: none;
	min-width: 80px;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-color-picker select:hover {
	background: #444;
	border-color: #666;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-color-picker select:focus {
	border-color: #888;
	background: #3a3a3a;
}

/* Style pour le curseur de largeur */
.openlime-annotation-edit-container .openlime-annotation-edit .openlime-width-control {
	display: flex;
	align-items: center;
	order: 4;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-width-slider {
	-webkit-appearance: none;
	appearance: none;
	background: #d0d0d0;
	border-radius: 4px;
	vertical-align: middle;
	padding: 0;
	margin: 0;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-width-slider::-webkit-slider-runnable-track {
	background: #d0d0d0;
	height: 8px;
	border-radius: 4px;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-width-slider::-moz-range-track {
	background: #d0d0d0;
	height: 8px;
	border-radius: 4px;
	border: none;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-width-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: var(--thumb-size);
	height: var(--thumb-size);
	border-radius: 50%;
	background: #e0e0e0;
	cursor: pointer;
	border: 2px solid #999;
	margin-top: calc((var(--thumb-size) - 8px) / -2);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-width-slider::-webkit-slider-thumb:hover {
	background: #f0f0f0;
	border-color: #666;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-width-slider::-moz-range-thumb {
	width: var(--thumb-size);
	height: var(--thumb-size);
	border-radius: 50%;
	background: #e0e0e0;
	cursor: pointer;
	border: 2px solid #999;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	box-sizing: border-box;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-width-slider::-moz-range-thumb:hover {
	background: #f0f0f0;
	border-color: #666;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

/* Ordre des éléments dans le panneau d'édition */
.openlime-annotation-edit-container .openlime-annotation-edit .openlime-deselect {
	order: 1;
}

.openlime-annotation-edit-container .openlime-annotation-edit .openlime-annotation-edit-tools {
	order: 5;
}

/* Masquer openlime-pin et pins */
.openlime-pin,
.openlime-annotation .pin,
.openlime-svgoverlay .pin {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
}

/* Annotations sélectionnées - utiliser data-original-stroke pour préserver la couleur */
.openlime-svgoverlay .openlime-annotation.selected path,
.openlime-svgoverlay .openlime-annotation.selected line,
.openlime-svgoverlay .openlime-annotation.selected polyline,
.openlime-svgoverlay .openlime-annotation.selected polygon,
.openlime-svgoverlay .openlime-annotation.selected circle,
.openlime-svgoverlay .openlime-annotation.selected ellipse,
.openlime-svgoverlay .openlime-annotation.selected rect {
	stroke: #ff0000 !important;
}


/* Priorité au style inline stroke sur le CSS data-class */
/* Le style inline avec !important sera appliqué via JavaScript */

.openlime-overlay.erase {
	cursor: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'><circle fill='rgba(255, 255, 255, 0.7)' cx='11' cy='11' r='10'/></svg>") 11 11, pointer;
}

.openlime-overlay.crosshair {
	cursor: crosshair;
}

/* Editor select */

.openlime-select {
	background: #888;
	position: relative;
	cursor: pointer;
	display: inline-block;
	height: 24px;
	width: 100%;
}

.openlime-select-button {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: #888;
	padding: 2px 15px;
}

.openlime-select-button:after {
	content: "";
	width: 0;
	height: 0;
	border: 7px solid transparent;
	border-color: #fff transparent transparent transparent;
	position: absolute;
	top: 8px;
	right: 10px;
}

.openlime-select-button:hover {
	background-color: #444;
}

.active .openlime-select-button {
	background-color: #888;
}

.active .openlime-select-button:after {
	top: 1px;
	border-color: transparent transparent #fff transparent;

}

.openlime-select-menu {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 999;
	margin: 0;
	padding: 0;
	list-style: none;
}

.active .openlime-select-menu {
	display: block;
}

.openlime-select-menu li {
	margin: 0;
	padding: 2px 0;
	text-indent: 15px;
	/* border-top: 1px solid darken($select-background, 10); */
	/*	@include transition(all 0.15s ease-in); */
}

.openlime-select-menu li:hover {
	color: #fff;
	border: 1px #aaa;
}

/*****************************************************/
/* LensDashboard */

.openlime-lens-dashboard {
	/* -webkit-animation: fadein 1s linear forwards;
	animation: fadein 1s linear forwards; */
	visibility: visible !important;
	/* background-color: rgb(200, 0, 0, 0.8) !important; */
}

.openlime-lens-dashboard.closed .openlime-lens-dashboard-annoswitch-bar {
	visibility: hidden !important;
}

.openlime-lens-dashboard.closed {
	/* -webkit-animation: fadeout 1s linear forwards;
	animation: fadeout 1s linear forwards; */
	visibility: hidden !important;
}

.openlime-lens-dashboard-button-bkg {
	fill: #333 !important;
	pointer-events: none;
}

.openlime-lens-dashboard-button.enabled {
	pointer-events: auto;
	cursor: pointer;
}

.enabled .openlime-lens-dashboard-button-bkg {
	fill: #aaa !important;
}

.openlime-lens-dashboard-button:hover .openlime-lens-dashboard-button-bkg {
	fill: #ccc !important;
}

.openlime-lens-dashboard-camera-active .openlime-lens-dashboard-button-bkg {
	fill: #fff !important;
}

.openlime-lens-dashboard-light-active .openlime-lens-dashboard-button-bkg {
	fill: #fff !important;
}


/*****************************************************/
/* Ruler */

.openlime-ruler-group {
	pointer-events: none;
}

.openlime-ruler-group path,
.openlime-ruler-group line {
	stroke: yellow !important;
	stroke-width: 3px !important;
	vector-effect: non-scaling-stroke;
}

.openlime-ruler-group text {
	fill: yellow !important;
	font-size: 24px;
}

.openlime-button.openlime-ruler-active path[style] {
	fill: yellow !important;
	stroke: yellow !important;
}

.openlime-overlaymsg {
	background: white;
	opacity: 80%;
	position: absolute;
	top: 0px;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;

	animation: fadeOut 3s;
}

@keyframes fadeOut {
	0% {
		opacity: 0.8;
	}

	33% {
		opacity: 0.8;
	}

	66% {
		opacity: 0;
	}

	100% {
		opacity: 0;
	}
}

