/* Custom scrollbar for a sleeker look */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-track {
	background: #2d3748; /* bg-gray-800 */
}
::-webkit-scrollbar-thumb {
	background: #4a5568; /* bg-gray-600 */
	border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
	background: #6b7280; /* bg-gray-500 */
}

/* Basic transition for mobile menu */
#mobile-menu.hidden {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease-out;
}
#mobile-menu:not(.hidden) {
	max-height: 500px; /* Adjust as needed to be larger than content */
	transition: max-height 0.3s ease-in;
}

/* Image Overlay Styles */
.image-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	cursor: default;
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	overflow: hidden;
}
.image-overlay.hidden {
	display: none;
}
.image-overlay .overlay-controls {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	pointer-events: none; /* Allow clicks to pass through to image or background initially */
	padding: 1rem;
}
/* Make invisible buttons not clickable */
.image-overlay .overlay-controls button.invisible {
	visibility: hidden; /* Hide visually */
	pointer-events: none; /* Make them not clickable */
}

.image-overlay .overlay-controls button {
	pointer-events: auto; /* Make visible buttons clickable */
	background-color: rgba(55, 65, 81, 0.8); /* bg-gray-700 with transparency */
	color: white;
	padding: 1rem;
	border-radius: 9999px; /* Full circle */
	font-size: 1.5rem;
	cursor: pointer;
	transition: background-color 0.3s ease, opacity 0.3s ease;
	opacity: 0.8;
	flex-shrink: 0; /* <<< ADDED: Prevent buttons from shrinking */
}
.image-overlay .overlay-controls button:hover {
	background-color: rgba(75, 85, 99, 0.9);
	opacity: 1;
}
.image-overlay #overlay-close-btn {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 1001;
	background-color: rgba(239, 68, 68, 0.8); /* bg-red-500 with transparency */
	border-radius: 9999px;
	/*padding: 0.75rem 1rem;*/
	font-size: 1.25rem;
	opacity: 0.8;
	pointer-events: auto;
}
.image-overlay #overlay-close-btn:hover {
	background-color: rgba(239, 68, 68, 0.9);
	opacity: 1;
}

.image-overlay #overlay-img-wrapper {
	position: relative;
	flex-grow: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	/*padding: 1rem 0;*/
	width: 100%;
	/*max-height: calc(100vh - 80px);*/
	overflow: hidden;
}
.image-overlay #overlay-img {
	max-width: 95%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}
.image-overlay #overlay-img-loading {
	position: absolute;
	inset: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: rgba(17, 24, 39, 0.9); /* bg-gray-900 with transparency */
	transition: opacity 0.2s ease-in-out;
	pointer-events: none; /* Make loading indicator non-clickable */
}
.image-overlay #overlay-img-loading.hidden {
	opacity: 0;
	visibility: hidden;
}
.image-overlay #overlay-caption {
	color: #d1d5db; /* text-gray-300 */
	/*margin-top: 1rem;*/
	font-size: 1.1rem;
	pointer-events: none;
	position:absolute;
	bottom:5px;
	background-color:#333;
	border-radius:6px;
	padding:0px 10px;
	opacity: 80%;
}

/* Styling for the info block */
#comic-info-block {
	background-color: #1f2937; /* bg-gray-800 */
	border-radius: 0.5rem; /* rounded-lg */
	padding: 1.5rem; /* p-6 */
	margin-bottom: 2rem; /* mb-8 */
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-lg */
	display: flex; /* Use flexbox for layout */
	flex-direction: column; /* Stack cover and info vertically on small screens */
	gap: 1.5rem; /* Space between cover and info */
}
@media (min-width: 768px) { /* md breakpoint */
	#comic-info-block {
		flex-direction: row; /* Side-by-side on larger screens */
		align-items: flex-start; /* Align items to the top */
	}
}
#comic-info-block #info-wrapper { /* New wrapper for text info */
	flex-grow: 1; /* Allow info to take remaining space */
	word-break: break-word; /* Prevent long words from overflowing */
}
#comic-info-block #cover-image-container { /* New wrapper for cover image */
	flex-shrink: 0; /* Prevent cover from shrinking */
	width: 100%;
	max-width: 250px; /* Max width for cover image */
	margin: 0 auto; /* Center cover on small screens */
	border-radius: 0.5rem;
	overflow: hidden;
}
@media (min-width: 768px) {
	#comic-info-block #cover-image-container {
		margin: 0; /* Reset margin on larger screens */
	}
}

#comic-info-block h1 {
	font-size: 1.875rem; /* text-3xl */
	font-weight: bold;
	color: #f3f4f6; /* text-gray-50 */
	margin-bottom: 0.5rem;
}
#comic-info-block h2 {
	font-size: 1.25rem; /* text-xl */
	color: #9ca3af; /* text-gray-400 */
	margin-bottom: 1rem;
}
#comic-info-block .tag-container {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	margin-bottom: 0.5rem;
}
#comic-info-block .tag-container .field-name {
	font-weight: bold;
	color: #d1d5db; /* text-gray-300 */
	margin-right: 0.5rem;
	min-width: 80px; /* Aligns categories */
}
#comic-info-block .tag-container .tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
#comic-info-block .tag-gallery {
	/*background-color: #4a5568;  bg-gray-600 */
	color: #e5e7eb; /* text-gray-200 */
	padding: 0.25rem 0.75rem;
	border-radius: 0.25rem;
	font-size: 0.875rem;
	transition: background-color 0.2s ease;
	white-space: nowrap; /* Prevent tag names from breaking */
}
#comic-info-block .tag-gallery:hover {
	background-color: #6b7280; /* bg-gray-500 */
	color: #f3f4f6; /* text-gray-100 */
}
#comic-info-block .tag-gallery .count {
	font-size: 0.75rem;
	opacity: 0.8;
	margin-left: 0.25rem;
}
#comic-info-block .info-meta-item { /* For "pages" and "uploaded" */
	color: #9ca3af;
	margin-top: 0.5rem;
	font-size: 0.9rem;
}
/*
@media (max-width: 500px){
	.fa-chevron-right, .fa-chevron-left {display:none;}
}
*/