:root{
	--bg:#f4f7fb;
	--node-fill:#00AEEF;
	--node-stroke:#004B80;
	--muted:#c7d0dd;
	--accent:#002855;
	--highlight:#ffd54f;
}

html {
	/* height: 100%; */
}

body{
	background:var(--bg);
	font-family:Inter, "Segoe UI", Roboto, Arial, sans-serif;
	margin:18px;
	color:#123;
	height: 100%;
}

svg {
    cursor: grab;
}
svg:active {
    cursor: grabbing;
}

#svg {
	width: 100%;
	/* NOTE: With the aspect ration property, we MAKE SURE that the diagram looks centered for ALL SCREENS */
	aspect-ratio: 16 / 9;
	/*
	height: 1fr;
	*/
}

h2 {
	margin:0 0 20px 0;
	font-weight:600;
}

.toolbar{
	margin:10px 0 30px;
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap:8px;
	height: 1fr;
	/*
	height: 10vh;
	align-items:center;
	flex-wrap:wrap;
	*/
}

.radio-toolbar {
	display:flex;
	margin:10px 0 18px;
	justify-content: space-evenly;
	gap: 15px;
	align-items:center;
	flex-wrap:wrap;
}

.radio-toolbar > div {
	/* transform: scale(1.3); */
}

input[type="range"]{ 
	/*
	width:1fr;
	*/
}

/* SVG area */
.canvas{ 
	background: white;
	border-radius:8px;
	padding:10px;
	box-shadow: 0 6px 18px rgba(0,0,0,0.06);
	/* overflow: auto; */
	height: 100%;
}

/* node visuals */
.nodeRect { fill: var(--node-fill); stroke: var(--node-stroke); stroke-width:2; rx:10; }
.nodeLabel { fill: white; font-weight:700; font-size:13px; pointer-events:none; }

/* muted node when not in step */
.muted {
	opacity: 0.35;
	filter: grayscale(50%);
	transform-origin:center;
	transition: all 300ms ease;
}

/* highlight node */
.highlight {
	filter: drop-shadow(0 6px 14px rgba(0,40,80,0.25));
	/*
	width: 220px;
	height: 90px;
	 */
	/* transform: scale(1.03); */
	transition: all 260ms ease;
}

/* arrow default */
.flow {
	fill:none;
	stroke:var(--muted);
	stroke-width: 3;
	stroke-linecap:round;
	stroke-linejoin:round;
	marker-start:url(#arrowHeadLeftMuted);
	marker-end:url(#arrowHeadMuted);
	stroke-dasharray: 10 6;
	transition: stroke 220ms ease, marker-end 220ms ease, stroke-width 200ms;
	z-index: 999;
}

/* active arrow for a step */
.flow.active {
	stroke: var(--accent);
	stroke-width:5;
	marker-start:url(#arrowHeadLeftActive);
	marker-end:url(#arrowHeadActive);
	/* animated dash movement */
	animation: dashmove var(--dash-speed, 1s) linear infinite;
}

@keyframes dashmove {
	to { stroke-dashoffset: -40; }
}

#n_animation {
	opacity: 0;
	transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

/* step description panel */
.steps-panel {
	margin-top:12px;
	display:flex;
	gap:12px;
	align-items:flex-start;
	flex-wrap:wrap;
}

.stepDesc {
	background:white;
	border-radius:8px;
	padding:12px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.06);
	width: 100%;
	height: 100px;
	overflow: auto;
}

.stepDesc .title{
	font-weight:700;
	margin-bottom:6px;
	/*
	font-size: 20px;
	*/
}
.stepDesc .text {
	color:#234;
	line-height:1.35;
	/*
	font-size:20px;
	*/
}
.current-step { color:var(--accent); font-weight:800; }

li {
	margin-bottom: 7px;
}

button {
	background-color: #286090;
	color: white;
	padding: 10px;
	border-radius: 5px;
	border:1px solid #bbb;
	cursor:pointer; 
	/* font-size: 20px; */
}

button:hover {
	background-color: #337ab7 !important;
}

button:disabled {
	background-color: #cccccc; /* Override background color */
	color: #666666;          /* Override text color */
	cursor: not-allowed;     /* Change cursor for disabled state */
	opacity: 0.7;            /* Add some transparency */
}

input[type="range"] {
	-webkit-appearance: none; /* For WebKit browsers (Chrome, Safari) */
	-moz-appearance: none; /* For Mozilla Firefox */
	appearance: none; /* Standard property */
	background: transparent; /* Make the default background transparent */
	cursor: pointer; /* Change cursor to pointer on hover */
	border: none; /* Remove default border */
}

input[type="range"]::-webkit-slider-runnable-track {
	background: #ddd; /* Track color */
	height: 8px; /* Track height */
	border-radius: 4px; /* Rounded corners */
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; /* Reset thumb appearance */
	background: #007bff; /* Thumb color */
	height: 20px;
	width: 20px;
	border-radius: 50%; /* Circular thumb */
	margin-top: -6px; /* Adjust to center vertically with track */
}

/*
svg * { 
transform-box: fill-box;
transform-origin: center;
}
 */


 #screen_change {
	cursor: pointer;
 }

 #screen_change_icon {
	font-size: 25px;
 }


 #steps-container {
	display: flex;
	margin-bottom: 10px;

 }

 #stepsList {
	font-size: 20px;
 }

 @media (max-width: 1440px) {
 	@media (max-width: 400px) {
		.toolbar {
			grid-template-columns: repeat(1, 1fr);
		}
	}
 }