﻿/* Importing Google Font */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

/* Custom scrollbar styling for Modal */
.custom-scrollbar::-webkit-scrollbar {
	width: 10px; /* Moderate width */
	height: 10px; /* Moderate height for horizontal scrollbars */
}

.custom-scrollbar::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
	background-color: #888;
	border-radius: 10px;
	border: 2px solid #f1f1f1; /* Moderate border size */
}

	.custom-scrollbar::-webkit-scrollbar-thumb:hover {
		background: #555;
	}

/* Scrollbar buttons */
.custom-scrollbar::-webkit-scrollbar-button {
	background-color: #f1f1f1;
	display: block;
	height: 10px; /* Moderate height */
	width: 10px; /* Moderate width */
	border-radius: 50%;
	border: 1px solid #888;
	background-position: center;
	background-repeat: no-repeat;
}

	.custom-scrollbar::-webkit-scrollbar-button:vertical:decrement {
		background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="14px" height="14px"><path d="M24 24H0V0h24v24z" fill="none"/><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/></svg>');
	}

	.custom-scrollbar::-webkit-scrollbar-button:vertical:increment {
		background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="14px" height="14px"><path d="M0 0h24v24H0z" fill="none"/><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>');
	}

	.custom-scrollbar::-webkit-scrollbar-button:horizontal:decrement {
		background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="14px" height="14px"><path d="M24 24H0V0h24v24z" fill="none"/><path d="M15.41 7.41L10.83 12l4.58 4.59L14 18l-6-6 6-6z"/></svg>');
	}

	.custom-scrollbar::-webkit-scrollbar-button:horizontal:increment {
		background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="14px" height="14px"><path d="M24 24H0V0h24v24z" fill="none"/><path d="M8.59 7.41L13.17 12 8.59 16.59 10 18l6-6-6-6z"/></svg>');
	}

	/* Hide duplicate scrollbar buttons */
	.custom-scrollbar::-webkit-scrollbar-button:vertical:start:increment,
	.custom-scrollbar::-webkit-scrollbar-button:vertical:end:decrement,
	.custom-scrollbar::-webkit-scrollbar-button:horizontal:start:increment,
	.custom-scrollbar::-webkit-scrollbar-button:horizontal:end:decrement {
		display: none;
	}

/* Dark mode for scrollbar */
.dark .custom-scrollbar::-webkit-scrollbar-track {
	background: #2d3748;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
	background-color: #3182ce;
	border: 2px solid #2d3748; /* Moderate border size */
}

	.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
		background: #63b3ed;
	}

/* Scrollbar buttons in dark mode */
.dark .custom-scrollbar::-webkit-scrollbar-button {
	background-color: #2d3748;
	display: block;
	height: 10px; /* Moderate height */
	width: 10px; /* Moderate width */
	border-radius: 50%;
	border: 1px solid #3182ce;
	background-position: center;
	background-repeat: no-repeat;
}

	.dark .custom-scrollbar::-webkit-scrollbar-button:vertical:decrement {
		background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="14px" height="14px"><path d="M24 24H0V0h24v24z" fill="none"/><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/></svg>');
	}

	.dark .custom-scrollbar::-webkit-scrollbar-button:vertical:increment {
		background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="14px" height="14px"><path d="M0 0h24v24H0z" fill="none"/><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>');
	}

	.dark .custom-scrollbar::-webkit-scrollbar-button:horizontal:decrement {
		background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="14px" height="14px"><path d="M24 24H0V0h24v24z" fill="none"/><path d="M15.41 7.41L10.83 12l4.58 4.59L14 18l-6-6 6-6z"/></svg>');
	}

	.dark .custom-scrollbar::-webkit-scrollbar-button:horizontal:increment {
		background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="14px" height="14px"><path d="M24 24H0V0h24v24z" fill="none"/><path d="M8.59 7.41L13.17 12 8.59 16.59 10 18l6-6-6-6z"/></svg>');
	}

	/* Hide duplicate scrollbar buttons in dark mode */
	.dark .custom-scrollbar::-webkit-scrollbar-button:vertical:start:increment,
	.dark .custom-scrollbar::-webkit-scrollbar-button:vertical:end:decrement,
	.dark .custom-scrollbar::-webkit-scrollbar-button:horizontal:start:increment,
	.dark .custom-scrollbar::-webkit-scrollbar-button:horizontal:end:decrement {
		display: none;
	}

/* Custom styles for <pre> elements */
pre.custom-scrollbar {
	padding: 0.5rem; /* Reduced padding */
	background-color: #1e293b; /* Dark background for better readability */
	color: #ffffff; /* White text for contrast */
	border-radius: 8px; /* Rounded corners */
	overflow: auto; /* Ensure scrollbars appear when needed */
	max-height: 60vh; /* Limit height to prevent overflow */
	line-height: 1.25; /* Reduced line height */
	font-size: 0.875rem; /* Smaller font size */
}

/* Custom styles for <pre> elements in dark mode */
.dark pre.custom-scrollbar {
	background-color: #1a202c;
}



/* Custom Markdown Styles */
#modalContent {
	padding: 0 20px;
	font-family: 'Lato', sans-serif; /* Updated font */
	font-weight: 400; /* Regular font weight */
}

.markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4, .markdown-content h5, .markdown-content h6 {
	font-weight: 700;
	margin-top: 1em;
	margin-bottom: 0.5em;
	color: #2D3748; /* Default text color */
	font-family: 'Lato', sans-serif; /* Updated font */
}

.markdown-content h1 {
	font-size: 2em;
}

.markdown-content h2 {
	font-size: 1.75em;
}

.markdown-content h3 {
	font-size: 1.5em;
}

.markdown-content h4 {
	font-size: 1.25em;
}

.markdown-content h5, .markdown-content h6 {
	font-size: 1em;
}

.markdown-content p {
	margin-bottom: 1.25em;
	line-height: 1.8;
	font-size: 1em;
	color: #2D3748; /* Default text color */
	font-family: 'Lato', sans-serif; /* Updated font */
	font-weight: 400; /* Regular font weight */
}

.markdown-content ul, .markdown-content ol {
	margin-bottom: 1.25em;
	padding-left: 1.5em;
	font-size: 1em;
	font-family: 'Lato', sans-serif; /* Updated font */
	font-weight: 400; /* Regular font weight */
}

.markdown-content ul {
	list-style-type: disc;
}

.markdown-content ol {
	list-style-type: decimal;
}

.markdown-content li {
	margin-bottom: 0.75em;
	line-height: 1.8;
}

.markdown-content code {
	background-color: #f5f5f5;
	padding: 0.25em 0.5em;
	border-radius: 0.25em;
	font-family: monospace;
	color: #007ACC; /* Changed to a different color */
	font-size: 1em;
	font-weight: 600;
}

.markdown-content pre {
	background-color: #f5f5f5;
	padding: 1.25em;
	border-radius: 0.5em;
	overflow-x: auto;
	font-family: monospace;
	font-size: 1em;
	color: #2D3748; /* Default text color */
}

.markdown-content blockquote {
	border-left: 4px solid #ddd;
	padding-left: 1.25em;
	margin-bottom: 1.25em;
	font-style: italic;
	color: #555; /* Default text color */
	font-size: 1em;
	font-family: 'Lato', sans-serif; /* Updated font */
	font-weight: 400; /* Regular font weight */
}

.markdown-content hr {
	border: 0;
	height: 1px;
	background: #ddd;
	margin: 2em 0;
}

/* Centering, shadow, and border for images */
.markdown-content img {
	display: block;
	margin-left: auto;
	margin-right: auto;
	max-width: 100%;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	border: 1px solid #ddd;
	border-radius: 4px;
	width: 80%;
}

/* Table styles */
.markdown-content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.25em;
	background-color: #f9f9f9; /* Light background for tables */
	font-family: 'Lato', sans-serif; /* Updated font */
	font-weight: 400; /* Regular font weight */
}

.markdown-content th, .markdown-content td {
	padding: 0.75em 1em;
	border: 1px solid #ddd;
}

.markdown-content th {
	background-color: #cbd5e0; /* Slightly darker background with a blue hue for table headers */
	font-weight: bold;
	color: #2D3748; /* Default text color */
}

.markdown-content td {
	background-color: #f1f1f1; /* Slightly darker background for table cells */
	color: #2D3748; /* Default text color */
}

/* Dark mode for markdown content */
.dark .markdown-content h1,
.dark .markdown-content h2,
.dark .markdown-content h3,
.dark .markdown-content h4,
.dark .markdown-content h5,
.dark .markdown-content h6 {
	color: #e2e8f0; /* Lighter text for better contrast */
}

.dark .markdown-content p,
.dark .markdown-content li,
.dark .markdown-content blockquote {
	color: #cbd5e0; /* Softer light text color for better contrast */
}

.dark .markdown-content code {
	background-color: #2d3748; /* Lighter background for code blocks */
	color: #f5f5f5; /* Light text color */
}

.dark .markdown-content pre {
	background-color: #2d3748; /* Lighter background for code blocks */
	color: #f5f5f5; /* Light text color */
}

.dark .markdown-content blockquote {
	border-left-color: #555;
}

.dark .markdown-content hr {
	background: #555;
}

.dark .markdown-content img {
	box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
	border: 1px solid #555;
}

.dark .markdown-content table {
	background-color: #1e1e1e; /* Darker background closer to black */
}

.dark .markdown-content th, .markdown-content td {
	border-color: #555;
}

.dark .markdown-content th {
	background-color: #121212; /* Swapped with table row colors */
	color: #cbd5e0; /* Softer light text color for better contrast */
}

.dark .markdown-content td {
	background-color: #2d3748; /* Darker background for table cells */
	color: #e2e8f0; /* Lighter text color for better contrast */
}


/* ------------------------ MODAL ------------------------ */
.toc-container {
	max-height: calc(100vh - 8rem); /* Adjust this value if needed for padding */
}

.markdown-content {
	max-height: calc(100vh - 8rem); /* Adjust this value if needed for padding */
	overflow-y: auto;
}

.modal-header,
.modal-footer {
	background-color: inherit;
}

.toc-item a.active {
	color: #2563eb; /* Updated to a more subtle blue */
}

.modal-body {
	display: flex;
	flex-direction: column; /* Stack TOC and content vertically by default */
	overflow: hidden;
}

@media (min-width: 768px) {
	.modal-body {
		flex-direction: row; /* Change to horizontal layout on larger screens */
	}
}

.toc {
	flex: 0 0 25%;
	overflow-y: auto;
	color: #374151; /* Darker text color for better readability */
	padding: 1rem;
	transition: background-color 0.3s, color 0.3s; /* Smooth transition for dark mode */
}

.dark .toc {
	color: #d1d5db; /* Light text color for dark mode */
}

.markdown-content {
	flex: 1; /* Take the remaining space */
	overflow-y: auto;
	padding-left: 1rem;
	color: #1f2937; /* Dark text color for readability */
	transition: background-color 0.3s, color 0.3s; /* Smooth transition for dark mode */
}

.dark .markdown-content {
	color: #cbd5e1; /* Light text color for dark mode */
}

@media (max-width: 767px) {
	.toc {
		flex: 0 0 auto; /* Allow TOC to adjust based on content */
		max-width: 100%; /* Full width on smaller screens */
		border-right: none;
	}

	.markdown-content {
		padding-left: 0;
	}
}

/* Link styles */
a {
	color: #3182ce; /* Primary link color */
	text-decoration: none;
	transition: color 0.3s ease, border-bottom-color 0.3s ease; /* Smooth transitions */
	border-bottom: 2px solid transparent; /* Underline effect */
}

	a:hover {
		color: #2b6cb0; /* Darker blue on hover */
		border-bottom-color: #2b6cb0; /* Underline effect on hover */
	}

	/* Visited link styles */
	a:visited {
		color: #6d28d9; /* Visited link color */
	}

	/* Focused link styles */
	a:focus {
		outline: none;
		border-bottom-color: #22d3ee; /* Underline effect on focus */
	}

	/* Active link styles */
	a:active {
		color: #22d3ee; /* Active link color */
		border-bottom-color: #22d3ee; /* Underline effect on active */
	}

/* Dark mode link styles */
.dark a {
	color: #63b3ed; /* Light blue for dark mode */
}

	.dark a:hover {
		color: #4299e1; /* Darker blue on hover for dark mode */
		border-bottom-color: #4299e1; /* Underline effect on hover for dark mode */
	}

	.dark a:visited {
		color: #9f7aea; /* Visited link color for dark mode */
	}

	.dark a:focus {
		outline: none;
		border-bottom-color: #22d3ee; /* Underline effect on focus for dark mode */
	}

	.dark a:active {
		color: #22d3ee; /* Active link color for dark mode */
		border-bottom-color: #22d3ee; /* Underline effect on active for dark mode */
	}

/* iFrame styles */
iframe {
	width: 100%; /* Full width for responsiveness */
	height: 500px; /* Default height, can be adjusted */
	border: 0; /* Remove default border */
	border-radius: 8px; /* Rounded corners */
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Consistent subtle shadow */
	transition: box-shadow 0.3s ease; /* Smooth transition for shadow */
}

/* Dark mode for iFrame */
.dark iframe {
	box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1); /* Subtle shadow for dark mode */
}
