body {
	display: flex;
	flex-direction: column;
	height: 90vh;
	margin: 0;
	font-size: clamp(12px, 1vw, 18px);
}

.header {
	background-color: black;
	display: grid;
	grid-template-columns: 50px 1fr auto 10px;
	gap: 5px;
	flex-shrink: 0;
	height: 50px;
	padding: 5px;
}

#title {
	text-align: left;
	color: #ffa500;
	font-weight: bold;
	font-size: clamp(1em, 2vw, 1.5em);
	margin: auto;
	width: 100%;
}


.loader {
	border: 16px solid #f3f3f3; /* Light grey */
	border-top: 16px solid #ff8c00; /* Dark Orange */
	border-bottom: 16px solid #000000;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	animation: spin 2s linear infinite;
	display: none;
	position: absolute;
	z-index: 1000;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}


@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

#links {
	display: flex;
	gap: 25px;
	color: #ffa500;
	font-weight: bold;
	font-size: clamp(1em, 2vw, 2em);
	text-align: right; /* Justify the link to the right */
	align-items: center; /* Center items vertically */
	justify-content: flex-end; /* Align items to the right */
	padding-right: 10px;
	height: 50px;
}

.lgia-link {
	color: #ffa500; /* Change the link color */
	text-decoration: none; /* Remove the underline */
	text-align: left;
	font-size: clamp(0.8em, 1vw, 1em);
}

.lgia-link:hover {
	text-decoration: underline; /* Optional: Add underline on hover */
}

#assumption-link {
	cursor: pointer;
}

#addlInfo {
	position: absolute;
	display: none;
	padding: 10px;
	text-align: left;
	background-color: white; /* Add a background color */
	border: 1px solid #ccc; /* Add a border */
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Add a shadow */
	z-index: 1000; /* Ensure it appears above other elements */
}

.image-container {
    width: 100%; /* Adjust the width as needed */
    height: 100%; /* Adjust the height as needed */
    display: flex;
    justify-content: center;
    align-items: center;
}

.image {
    max-width: 100%; /* Ensure the image does not exceed the container's width */
    max-height: 100%; /* Ensure the image does not exceed the container's height */
    object-fit: contain; /* Ensures the image fits within the container */
}

.container {
	display: grid;
	grid-template-columns: minmax(250px, 1fr) 3fr;
	gap: 10px;
	flex-grow: 1;
	padding: 10px;
}

.elementlabel {
	font-weight: bold;
	font-size: clamp(1em, 2vw, 1.25em);
}

.genAmountlabel {
	font-size: clamp(0.9em, 2vw, 1em);
	font-weight: bold;
}

.user-controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 5px;
}

.substation-table-container {
	max-height: 35vh;
	overflow-y: auto;
	border: 3px solid #ddd;
}

.table-container {
	max-height: 225px;
	overflow-y: auto;
	border: 3px solid #ddd;
}

.map-content {
	height: 90vh;
	gap: 6px; /* Fixed 6px gap between map and table */
}

.map-container {
	position: relative;
	flex: 1;
	overflow: hidden;
	height: 50vh;
	padding-bottom: 10px;
}

#mapViewDiv {
	border: 3px solid #ddd;
	height: 100%;
	margin-bottom: 5px; /* Consistent 6px gap */
}

#toolbarDiv {
	position: absolute;
	top: 15px;
	left: 60px; /* Adjusted from 10px to 30px for 20px shift */
	z-index: 10;
	display: flex;
	gap: 5px;
	background-color: rgba(255, 255, 255, 0); /* White with 80% opacity */
}

#selection-div {
	--calcite-select-menu-max-height: 200px;
}

table {
	width: 100%;
	font-size: clamp(8px, 2vw, 14px);
	border-spacing: 0;
}

th {
	background-color: #f2f2f2;
	border: 1px solid #ddd;
	text-align: left;
	position: sticky;
	white-space: normal; /* Allow text to wrap */
	word-wrap: break-word; /* Break long words if necessary */
	top: 0;
	z-index: 1;
	padding-right: 5px;
}

th.asc::after {
	content: "▲";
	color: #ddd;
	position: absolute;
	right: 5px; /* Adjust this value as needed */
	top: 90%; /* Center vertically */
	transform: translateY(-60%); /* Center vertically */
}

th.dsc::after {
	content: "▼";
	color: #ddd;
	position: absolute;
	right: 5px; /* Adjust this value as needed */
	top: 90%; /* Center vertically */
	transform: translateY(-60%); /* Center vertically */
}

td {
	border: 1px solid #ddd;
	padding: 6px;
	text-align: left;
	font-size: 0.9em;
}

.over-100 {
	color: red;
	font-weight: bold;
}

#screenshotDiv {
	position: absolute;
	top: 0.5em;
	left: 0.5em;
	right: 0.5em;
	bottom: 0.5em;
	text-align: center;
	background-color: rgba(255, 255, 255, 0.8);
	z-index: 50;
}

.modal {
	display: block;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
	background-color: #333;
	margin: 15% auto;
	padding: 20px;
	border: 1px solid #888;
	width: 80%;
	max-width: 500px;
	text-align: center;
	border-radius: 10px;
	color: white;
	font-size: 16px; /* Added original font size */
}

.study-modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%; /* Full height to cover the entire viewport */
	overflow: hidden; /* Prevent scrolling of the parent element */
	background-color: rgba(0, 0, 0, 0.8);
}

.study-modal-content {
	position: absolute; /* Center the modal content */
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%); /* Center the modal content */
	background-color: #333;
	padding: 20px;
	border: 1px solid #888;
	width: 80%;
	max-width: 700px;
	max-height: 70vh; /* Limit the height */
	overflow-y: auto; /* Add vertical scroll bar */
	text-align: left; /* Justify text to the left */
	border-radius: 10px;
	color: white;
	font-size: 16px; /* Added original font size */
}

#studyassumptions.show {
	display: none; /* Show the splash screen when 'show' class is added */
}

#splashScreen.show {
	display: block; /* Show the splash screen when 'show' class is added */
}

tr:hover {
	background-color: #f5f5f5;
}

.highlighted {
	background-color: #d3d3d3; /* Light grey highlight */
}

.esri-widget--button.active,
.esri-widget--button.active:hover,
.esri-widget--button.active:focus {
	cursor: default;
	background-color: #999696;
}
.esri-widget--button.active path,
.esri-widget--button.active:hover path,
.esri-widget--button.active:focus path {
	fill: #e4e4e4;
}

.action-button {
	font-size: 16px;
	background-color: transparent;
	border: 1px solid #d3d3d3;
	color: #6e6e6e;
	height: 32px;
	width: 32px;
	text-align: center;
	box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.action-button:hover,
.action-button:focus {
	background: #0079c1;
	color: #e4e4e4;
}

.esri-features__container {
	padding: 6px;
}

.active {
	background: #0079c1;
	color: #e4e4e4;
}

.js-screenshot-image {
	border: 10px solid white;
	box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.5);
}

#screenshotDiv {
	position: absolute;
	top: 0.5em;
	left: 0.5em;
	right: 0.5em;
	bottom: 0.5em;
	text-align: center;
	background-color: rgba(255, 255, 255, 0.8);
	z-index: 50;
}

.hide {
	display: none;
}

.screenshotCursor {
	cursor: crosshair;
}

#screenshotBtn:disabled {
	opacity: 0.8;
}

/* Media queries to adjust layout and text scaling */
@media (max-width: 1024px) {
	.header {
		grid-template-columns: 50px 1fr 1fr;
		max-height: 50px;
	}

	.container {
		grid-template-columns: 1fr;
	}

	#title {
		font-size: 1.2em;
	}

	.user-controls {
		order: 1;
	}

	.map-content {
		order: 2;
	}

	.map-container {
		height: 50vh;
	}

	#substationTable th {
		font-size: 0.9em;
		white-space: normal; /* Allow text to wrap */
		word-wrap: break-word; /* Break long words if necessary */
	}

	th.asc::after {
		content: "";
	}
	th.dsc::after {
		content: "";
	}
}

@media (max-width: 768px) {
	.header {
		grid-template-columns: 50px 1fr 1fr; /* Adjust columns for smaller screens */
		max-height: 40px;
	}

	#title {
		font-size: 1.2em; /* Adjust title font size */
	}

	.image {
		width: 40px; /* Resize image on smaller screens */
		height: 40px;
	}

	.container {
		grid-template-columns: 1fr; /* Stack the container columns on smaller screens */
	}

	.user-controls {
		order: 1;
		padding: 10px;
	}
	.map-content {
		order: 2;
	}

	.map-container {
		height: 40vh; /* Adjust map container height on smaller screens */
	}

	#mapViewDiv {
		height: 100%; /* Ensure map fills the container */
	}

	.substation-table-container {
		max-height: 150px; /* Adjust substation table container height */
	}

	table {
		font-size: 0.9em; /* Make table font smaller */
	}

	#substationTable th {
		font-size: 0.9em;
		white-space: normal; /* Allow text to wrap */
		word-wrap: break-word; /* Break long words if necessary */
	}

	th.asc::after {
		content: "";
	}
	th.dsc::after {
		content: "";
	}
}
