:root {
	--vh: 1vh; /* Custom property to handle dynamic viewport height */
}

.mcnotes-layout {
	display: flex;
	flex-direction: column;
	height: calc(var(--vh, 1vh) * 100); /* Dynamically adjust height */
}

.mcnotes-header {
	background-color: #333;
	color: white;
	text-align: center;
	padding: 1rem;
	flex: 0 0 60px; /* Fixed height for header */
}

.mcnotes-main {
	display: flex;
	flex: 1; /* Take up remaining space between header and footer */
	overflow: hidden; /* Prevent unintentional scrollbars */
}

.mcnotes-navigation {
	/*width: 200px;*/ /* Default width */
	background-color: #f4f4f4;
	padding: 0.2rem;
	display: flex;
	flex-direction: column;
	resize: horizontal; /* User-adjustable width */
	overflow: hidden; /* Prevent horizontal scroll */
}
/* 
@media screen and (max-device-width: 480px) {
	.mcnotes-navigation {
		max-width: 150px;
	}
	.mcnotes-navigation .navShown {
		min-width: 100px;
	}
}

@media screen and (min-device-width: 481px) and (max-device-width: 640px) {
	.mcnotes-navigation {
		max-width: 330px;
	}
	.mcnotes-navigation .navShown {
		min-width: 150px;
	}
}

@media screen and (min-device-width: 641px) and (max-device-width: 800px) {
	.mcnotes-navigation {
		max-width: 490px;
	}
	.mcnotes-navigation .navShown {
		min-width: 150px;
	}
}

@media screen and (min-device-width: 801px) and (max-device-width: 1024px) {
	.mcnotes-navigation {
		max-width: 650px;
	}
	.mcnotes-navigation .navShown {
		min-width: 150px;
	}
}*/

@media screen and (max-width: 1024px) {
	.mcnotes-navigation {
		display: none; /* Hide navigation on smaller screens */
		/* css to display navigation as layer above content */
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 1000; /* Ensure it appears above other content */
		background-color: #f4f4f4; /* Optional: background color for the overlay */
		scrollbar-width: thin; /* Optional: thinner scrollbar for overlay */
		overflow-y: auto; /* Enable vertical scrolling if content overflows */
	}

	.mcnotes-resizer {
		display: none; /* Hide resizer on smaller screens */
	}

	.mcnotes-navigation-toggle {
		display: inline; /* Show toggle button on smaller screens */
	}
}

@media screen and (min-width: 1025px) {
	.mcnotes-navigation {
		max-width: 850px;
	}
	.mcnotes-navigation .navShown {
		min-width: 150px;
	}
	.mcnotes-navigation-toggle {
		display: none; /* Hide toggle button on larger screens */
	}
}

  .mcnotes-nav-header {
	background-color: #ddd;
	padding: 1rem;
	flex: 0 0 60px; /* Fixed height for navigation header */
	text-align: center;
	border-bottom: 1px solid #ccc;
  }
  
  .mcnotes-nav-list {
	flex: 1; /* Fills the remaining space */
	overflow-y: auto; /* Makes the list scrollable */
  }
  
  .mcnotes-nav-list ul {
	list-style: none;
	padding: 0;
	margin: 0;
  }
  
  .mcnotes-nav-list li {
	padding: 0.5rem 1rem;
	border-bottom: 1px solid #eee;
	cursor: pointer;
  }
  
  .mcnotes-nav-list li:hover {
	background-color: #ddd;
  }
  
  .mcnotes-resizer {
	width: 15px;
	cursor: ew-resize;
	background-color: #ccc;
	touch-action: none; /* Disables default touch gestures */
  }
  
  .mcnotes-content {
	flex: 1;
	background-color: #eaeaea;
	padding: 0.5rem;
	overflow: auto; /* Content scrolls if it overflows */
  }

  #viewer {
	display: block;
	background-color: #fafafa;
	white-space: pre-wrap; /* Preserves whitespace and line breaks */
	padding: 0.5rem;
	overflow: auto; /* Scrolls if content overflows */
  }