/* Common used css*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inria+Sans:wght@300;400;700&family=Inria+Serif&display=swap');


@font-face {
	font-family: 'FontAwesome';
	src: url('/font-awesome/fonts/fontawesome-webfont.eot?v=4.3.0');
	src: url('/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('/font-awesome/fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'), url('/font-awesome/fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'), url('/font-awesome/fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'), url('/font-awesome/fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');
	font-weight: normal;
	font-style: normal;
}

html {
	font-size: 100%;
	/* 16px */
	/*87.5% = 14px */
}

body {
	font-family: "Inria Serif", "Piazzolla", serif;
	font-size: 1rem;
	color: #000000;
	line-height: 1.5;

	/* Background */
	background: linear-gradient(90deg,
			rgba(107, 214, 255, 1) 0%,
			rgba(182, 230, 251, 1) 39%,
			rgba(100, 230, 255, 1) 100%);
	background-size: cover;
	min-height: 100vh;

	/* prevents text from touching edges on mobile */
	padding-bottom: 4rem;
}

:root {
	--primary: #1e3a8a;
	--secondary: #3b82f6;
	--font-color: #000000;
	--card-bg: --card-bg: hsl(0 0% 100% / 50%);
	--text-muted: #64748b;
	--accent: #ef4444;
}

/*container to display the content for desktop and phone browsing*/
.display {
	width: 100%;
	margin: 0 auto;
	position: relative;
}

/* Phones (default) — width: 100% */

@media (min-width: 768px) {

	/* Tablets */
	.display {
		width: 70% !important;
	}
}

@media (min-width: 1024px) {

	/* Small desktops */
	.display {
		width: 60% !important;
	}
}

@media (min-width: 1280px) {

	/* Large desktops */
	.display {
		width: 50% !important;
	}
}

.logo {
	width: 200px;
	height: 60px;
	background-image: url('/images/logo_200x60.png');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: left center;
}

/* Wrapper for clickable logo */
.logo-link {
	display: inline-block;
	width: 200px;
	height: 60px;
	position: relative;
	cursor: pointer;
	z-index: 101;
}

/* Transparent overlay (if needed) */
.logo-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 102;
	pointer-events: auto;
}

/* MOBILE — SCALE LOGO DOWN */
@media (max-width: 480px) {
	.logo {
		width: 150px;
		height: 45px;
	}

	.logo-link {
		width: 150px;
		height: 45px;
	}
}


.backbtn {
	position: absolute;
	right: 0;
	top: 6px;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 100;
	padding: 0;
	display: flex;
	justify-content: right;
	align-items: center;
}

.img-border {
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Desktop image size */
.backbtn-img {
	width: 100%;
	max-width: 150px;
	height: auto;
}

/* Mobile: shrink ONLY the image */
@media (max-width: 480px) {
	.backbtn-img {
		width: 112.5px;
	}
}

a:focus,
a:active {
	outline: none;
	box-shadow: none;
}

/* line space*/
.half-line {
	display: block;
	height: 0.5em;
}

.full-line {
	display: block;
	height: 1em;
}

p {
	font-family: "Inria Serif", "Piazzolla";
	font-size: 1em;
}

h1,
h2,
h3,
h4 {
	font-family: 'Roboto', sans-serif;
	margin-top: 0.5rem;
	margin-bottom: 0.25rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

h1 {
	text-transform: uppercase;
	font-size: 2rem;
	/* Scaled up properly for desktop */
	position: relative;
	color: var(--primary);
}

h2 {
	display: inline-block;
	text-transform: uppercase;
	font-size: 1.6rem;
	position: relative;
	color: var(--primary);
}

h3 {
	text-transform: uppercase;
	font-size: 1.3rem;
	position: relative;
	color: var(--secondary);
}

/* h4 is fixed to be distinct and smaller than h3 */
h4 {
	text-transform: none;
	font-size: 1.1rem;
	position: relative;
	color: var(--secondary);
}

/* Tablet Scaling */
@media (max-width: 768px) {
	h1 {
		font-size: 1.6rem;
	}

	h2 {
		font-size: 1.35rem;
	}

	h3 {
		font-size: 1.15rem;
	}

	h4 {
		font-size: 1rem;
	}
}

/* Mobile Scaling */
@media (max-width: 480px) {
	h1 {
		font-size: 1.35rem;
	}

	h2 {
		font-size: 1.15rem;
	}

	h3,
	h4 {
		font-size: 1rem;
	}
}

/* this selector removes the default blue border displayed in some browsers 
around an image when it is surrounded by a link 
*/
a img {
	/* Optional: prevent text/image selection */
	user-select: none;

	/* Removes blue tap highlight on mobile */
	-webkit-tap-highlight-color: transparent;
}

.img-width {
	width: 50%;
	height: auto;
	max-width: 100%;
}

/* Mobile phones */
@media (max-width: 640px) {
	.img-width {
		width: 100%;
	}
}


a:link {
	text-decoration: none;
	color: inherit;
}

a:visited {
	color: inherit;
	text-decoration: none;
}

a {
	outline: none;
	text-decoration: none;
}

/*Button to be used for opening document*/
.button1 {
	box-shadow: 0px 10px 14px -7px #276873;
	background-color: #599bb3;
	border-radius: 21px;
	border: 2px solid #29668f;
	display: inline-block;
	cursor: pointer;
	color: #ffffff;
	font-family: Arial;
	font-size: 1.1em;
	font-weight: bold;
	padding: 0px 5px;
	text-decoration: none;
	text-shadow: 0px 1px 0px #3d768a;
	text-transform: uppercase;
	margin-left: 10px;
}

.button1:hover,
.button1:focus {
	background: linear-gradient(to bottom, #408c99 5%, #599bb3 100%);
	background-color: #408c99;
}

.button1:active {
	position: relative;
	top: 1px;
}

.button2 {
	/* used to Go Back to chart in Qur'an preservation */
	font-size: 1em;
	position: sticky;
	cursor: pointer;
	background-color: #4CAF50;
	color: white;
	border-radius: 4px;
	left: 20px;
	padding: 5px 5px 5px 5px;
	white-space: nowrap;
}

.button2:hover {
	background-color: #1e7b23;
	color: black;
}

.play-stop-img {
	width: 35px;
}

.qa-button {
	background-color: lch(59% 21 223);
	border-width: 3px;
	height: auto !important;
	padding: 10px;
	box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
	box-sizing: border-box;
	border: #FFFFFF;
	color: black;
	width: 100%;
	font-weight: 700;
	text-align: left;
	text-decoration: none;
	display: inline-block;
	margin: 4px 2px;
	cursor: pointer;
	padding-left: 2em;
	text-indent: -2em;
}

.qa-button:hover {
	background: rgba(17, 87, 45, 0.9);
	box-shadow: 0 6px 20px rgb(0 118 255 / 23%);
	color: rgb(193, 249, 10);
}

/*End format creating table for Q & A */


.box {
	margin-top: .2em;
	padding: 5px 3px 10px 3px;
	text-align: left;
	box-shadow: -4px -5px 32px -4px rgba(0, 0, 0, 1);
	border-radius: 10px;
	overflow: visible;
}

.subject-box {
	position: relative;
	/* So the title can be positioned relative to this box */
	padding: 5px 5px 5px 5px;
	border: 5px ridge #92d2d7;
	border-radius: 10px;

}

.subject-box-changing-color {
	position: relative;
	/* So the title can be positioned relative to this box */
	padding: 5px 5px 5px 5px;
	border: 5px ridge #92d2d7;
	border-radius: 10px;
	border-color: red;
	animation: colorChange 3s infinite alternate;
}

@keyframes colorChange {
	0% {
		border-color: red;
		/* Start with red */
	}

	100% {
		border-color: green;
		/* End with green */
	}
}

.text-in-frame-above-border {
	position: absolute;
	top: -22px;
	left: 50%;
	/* Centers the title horizontally */
	transform: translateX(-50%);

	font-size: 1.2em;
	font-weight: bold;
	background-color: #f4f4f4;
	padding: 0 10px;
	border: 5px ridge #92d2d7;
	border-radius: 10px;
	white-space: nowrap;
}

.header-box {
	box-shadow: -10px 0px 13px -7px #000000, 10px 0px 13px -7px #000000, 5px 5px 15px 5px rgba(71, 255, 28, 0);
	font-size: 1.5em;
	text-align: center;
}

.text-in-box {
	border-radius: 5px;
	padding: 3px;
	background: rgb(111, 207, 239);
}

audio {
	transition: all 0.5s linear;
	box-shadow: 2px 2px 4px 0px #006773;
	border-radius: 7px;
}

audio:hover,
audio:focus,
audio:active {
	box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.4);
	transform: scale(1.05);
}

.title-w-bk {
	display: flex;
	vertical-align: baseline;
	padding: 5px 5px 5px;
	background-color: rgb(18, 218, 48);
	font-size: 1.2em;
	vertical-align: middle;
	height: auto;
	font-weight: bold;
	color: #000000;
}

.subtitle-1 {
	font-size: 1.1em;
	font-weight: bold;
	color: #000000;
	border-bottom: 2px solid black;
	display: block;
	width: fit-content;
}

span.title-w-bk,
span.subtitle-1 {
	margin-top: 10px;
}

.audioVersion {
	box-shadow: 0px 5px 15px 5px rgba(0, 0, 0, 0.83);
	font-weight: bold;
	color: #000000;
	border: 3px solid darkblue;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	width: fit-content;
	max-height: 35px;
	height: auto;
	background: linear-gradient(90deg, rgba(107, 214, 255, 1) 0%, rgba(182, 230, 251, 1) 39%, rgba(100, 230, 255, 1) 100%);
	padding-left: 5px;
}

.audioVersion button:first-of-type {
	margin-left: 10px;
	/* Adds space after the text and before the first image */
}

.audioVersion img {
	height: 33px;
	width: 33px;
}

.audioVersion:hover {
	color: rgb(252, 246, 246) !important;
	background: linear-gradient(90deg, rgb(7, 33, 44) 0%, rgb(20, 41, 50) 39%, rgba(4, 48, 57, 0.273) 100%);
}

.center {
	display: block;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

#audioDiv {
	display: none;
	width: 95%;
	text-align: center;
}

/* format UL - OL - LI list */
ul,
ol {
	padding: 0;
	margin: 0;
	position: relative;
	font-family: "Inria Serif", "Piazzolla";
	max-width: 100%;
}


ul {
	margin-left: 30px;
}

ol {
	padding-left: 25px;
}

ul.a {
	list-style-type: lower-alpha;
}

ul.ua {
	list-style-type: upper-alpha;
}

ul.d {
	list-style-type: decimal;
}

ul.s {
	list-style-type: square;
}

ul.c {
	list-style-type: circle;
}

ol.c {
	counter-reset: item;
	list-style: none;
	padding-left: 1.5em;
}

ol.c>li {
	counter-increment: item;
	position: relative;
	margin-bottom: 0.5em;
}

ol.c>li::before {
	content: "(" counter(item) ")";
	position: absolute;
	left: -1.5em;
	font-weight: bold;
}

li {
	font-size: 1em;
	margin-bottom: 3px;
}

li span {
	position: relative;
	left: -3px;
	padding: 0;
	font-size: 1em;
}

/*bolit of number color and */
::marker {
	font-weight: 600;
	color: blue;
	font-size: 1em;
}

/*  End of List formating */

#clear {
	clear: both;
}

/* For menu  */
.collapsible,
.notCollapsible {
	background: linear-gradient(to bottom, #a0c8e0, #5a9cc5);
	color: #FFFFFF;
	border: 0;
	cursor: pointer;
	box-shadow: 0 4px 3px #000000;
	display: block;
	padding: 10px;
	width: 98%;
	border: none;
	margin: 5px 5px;
	text-align: center;
	outline: none;
	font-size: 1.2em;
	font-weight: bold;
	height: 60px;
}

.active,
.collapsible:hover {
	background-color: #555;
}

.content {
	padding: 0 18px;
	display: none;
	overflow: hidden;
}

.subMenuButtonStyle {
	background: linear-gradient(to bottom, #4c7d75, #166291);
	padding: 10px 15px;
	border: 0;
	cursor: pointer;
	box-shadow: 0 4px 3px #000000;
	font-size: 1.1em;
	font-weight: 800;
	text-align: left;
	display: block;
	width: 90%;
	margin: 10px 10px;
	margin-top: -5px;
	color: #ffffff;
}

/* Blinking  */
.blinking-text {
	animation: blink 1s infinite;
}

@keyframes blink {
	0% {
		opacity: 1;
	}

	50% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}

/*svg: Scalable Vector Graphics - Responsive image map*/
.svg {
	fill: floralwhite;
	stroke: pink;
	stroke-width: 0;
	opacity: .5;
	fill-opacity: 0.1;
	stroke-opacity: 0.9;
}

/* Styling the rectangle */
.hover-border {
	transition: all 0.3s ease;
	/* Smooth transition */
}

/* Show border on hover */
.hover-border:hover {
	fill: floralwhite;
	stroke: bisque;
	stroke-width: 5;
	fill-opacity: 0.2;
	background-color: unset;
	opacity: 1;
}

/* to format the Surah pages */
.surah-reading-title::after {
	content: "Click on Ayah to Practice Reading";
}

.surah-meaning-title::after {
	content: "Click on Ayah to Learn its Meaning";
}

.surah-practice-title::after {
	content: "Click on Ayah to Listen to Your Reading";
}

.surah-reading-title,
.surah-meaning-title,
.surah-practice-title {
	margin-top: 0px;
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	letter-spacing: -0.5px;
	line-height: 1.2;
	font-size: 20px;
	margin-right: auto;
	margin-left: auto;
	font-weight: 800;
	color: rgb(97, 19, 37);
}

/* End of format the Surah pages */

.sunnah::before {
	color: #FFF !important;
	content: "Sunnah - ptional";
}

.fardh::before {
	color: #F00 !important;
	content: "Rukun - Obligatory";
	font-family: Arial, Helvetica, sans-serif;
	font-size: 20px;
}

.video-wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
	padding-bottom: 56.25%;
	/* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
	border-radius: 10px;
	margin: 0 auto;
}

.video-wrapper iframe,
.video-wrapper video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 10px;
	display: block;
}

.small-button {
	display: inline;
	flex-direction: column;
	align-items: center;
	padding: 6px 8px;
	font-family: -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
	border-radius: 6px;
	border: none;
	color: #fff;
	background: linear-gradient(180deg, #4B91F7 0%, #367AF6 100%);
	background-origin: border-box;
	box-shadow: 0px 0.5px 1.5px rgba(54, 122, 246, 0.25), inset 0px 0.8px 0px -0.25px rgba(255, 255, 255, 0.2);
	touch-action: manipulation;
	font-size: 1.1rem;
}

.small-button:focus {
	box-shadow: inset 0px 0.8px 0px -0.25px rgba(255, 255, 255, 0.2), 0px 0.5px 1.5px rgba(54, 122, 246, 0.25), 0px 0px 0px 3.5px rgba(58, 108, 217, 0.5);
	outline: 0;
}

/* Audio format */
.audioOutput,
.speedControls {
	width: 90%;
	position: sticky;
	left: 0;
	margin-left: 0;
	text-align: left;
	display: none;
	z-index: 200;
}

/* Container for the audio speed controls with a custom border */
.speedControls {
	align-items: center;
	gap: 8px;
	/* Adds exactly 8px of space between the buttons */
	margin-top: 0px;
	padding: 1px 1px;
	font-family: sans-serif;
	font-size: 14px;
	color: #555;

	/* Styled Border & Background */
	background-color: #f9f9f9;
	border: 2px solid #000000;
	border-radius: 6px;

	/* Keeps the box tightly wrapped around contents */
	max-width: max-content;
}

/* Default Button Styling */
.speed-btn {
	padding: 5px 8px;
	cursor: pointer;
	border: 1px solid #bbb;
	border-radius: 4px;
	font-weight: bold;
	background: #fff;
	color: #333;
	transition: all 0.2s ease;
}

/* Hover effect for inactive buttons */
.speed-btn:hover:not(.active-speed) {
	background-color: #f0f0f0;
	border-color: #999;
}

.audioOutput {
	top: 40px;
	height: 40px;
}

.speedControls {
	top: 80px;
	height: 33px;
}

.speed-label {
	font-size: 14px;
	vertical-align: middle;
}

/* For phones (screen width 600px or less) */
@media (max-width: 600px) {
	.audioOutput {
		top: 40px;
	}
}

/* For phones (screen width 600px or less) */
@media (max-width: 600px) {
	.speedControls {
		top: 80px;
	}
}

/* End of Audio format */

/* transleteration */
.transl {
	font-size: 1.5rem;
	color: darkblue;
	font-weight: bold;
}

.line-container {
	display: flex;

	/* Vertically align text with lines */
	align-items: center;

	/* Center the content horizontally */
	justify-content: center;
}

.line {
	/* Makes the line expand to fill the space */
	flex-grow: 1;

	height: 5px;
	background-color: #000;
	margin: 0;
}

.table-divider {
	display: flex;
	font-weight: bold;
	border-bottom: 1px solid #ccc;
	padding-bottom: 8px;
}

blockquote {
	display: block;
	margin-left: 5px;
	border-left: 3px solid #049204;
	border-right: 1px solid #049204;
	border-top: 3px solid rgba(0, 0, 0, 0.05);
	padding-left: 10px;
	margin-top: 5px;
	margin-bottom: 0px;
	box-shadow: 0 15px 16px rgba(0, 0, 0, 0.05);
}

.thumbnail {
	cursor: pointer;
	transition: transform 0.3s ease;
}

.enlarged {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);

	/* 98% of screen width */
	width: 98vw;

	height: auto;

	/* prevent overflow on tall images */
	max-height: 98vh;

	z-index: 1000;
	border: 2px solid #333;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
	.enlarged {
		width: 50%;
	}
}

.divCollapsible,
.divNotCollapsible {
	background-color: #f1f1f1;
	border: 1px solid #ccc;
	cursor: pointer;
	padding: 7px;
	width: 100%;
	text-align: left;
	outline: none;
	font-size: 1em;
	transition: background-color 0.2s ease;
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	top: 1px;
	margin-top: .3em;
	z-index: 100;
}

.divCollapsible>div[style*="display:flex"] {
	/* Let elements break onto a new row */
	flex-wrap: wrap !important;

	/* Clean top-alignment */
	align-items: flex-start !important;
}

.divCollapsible:hover,
.divNotCollapsible:hover {
	background-color: #ddd;
}

.divContentHidden {
	position: relative;
	padding: 5px 12px 12px 5px;
	display: none;
	overflow: visible;
	background-color: #fafafa;
	border-top: 1px solid #ccc;
}

.audio-btns {
	display: none;
	width: 100%;
	margin-top: 0px;
}

.audio-btns button {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	cursor: pointer;
	margin-left: 0 !important;
}

.audio-btns button+button {
	margin-left: 12px !important;
}

/* Mobile styles */
@media (max-width: 768px) {
	.divContentHidden {
		padding: 15px 12px !important;
	}
}

.active+.divContentHidden {
	display: block;
}

/*Wudu 2 div columns*/
.wudu-info-container {
	display: flex;
	padding: 5px;
}

.wudu-info-container-column {
	padding: 5px;
	border: 1px solid #ccc;
}

.wudu-info-container-left {
	width: 60px;
	background-color: #f4f4f4;
}

.wudu-info-container-right {
	flex: 1;
	background-color: #e9e9e9;
}

/* for first page slider */
* {
	box-sizing: border-box;
}

/* Fading animation */
.fade {
	animation-name: fade;
	animation-duration: 1.5s;
}

@keyframes fade {
	from {
		opacity: .4
	}

	to {
		opacity: 1
	}
}

.overlay-click-2-expand-image {
	position: absolute;
	top: 22%;
	right: 0;
	transform: translate(-50%, -50%);
	width: 15vw;
	max-width: 200px;
	min-width: 30px;
	z-index: 10;
}

@media (max-width: 500px) {
	.overlay-click-2-expand-image {
		top: 18%;
		right: -12%;
		width: 28vw;
	}
}

.table {
	display: grid;
	/* Auto-calculates columns based on content size */
	grid-template-columns: repeat(auto-fit, minmax(0, max-content));

	/* for full width but size by content: */
	/* grid-template-columns: auto 1fr; (For 2 cols) */

	border: 1px solid #ccc;
	font-family: sans-serif;
	margin-top: 10px;
	max-width: 100%;
}

/* Specific rule for your 4-column table so it doesn't break */
.table.four-cols {
	grid-template-columns: auto auto auto auto;
}

/* CRITICAL: Tell the row to act as a fragment so the parent grid controls the cells */
.row {
	display: grid;
	grid-template-columns: subgrid;
	grid-column: 1 / -1;
	border-bottom: 1px solid #ddd;
}

.row:last-child {
	border-bottom: none;
}

.cell {
	padding: 8px;
	border-right: 1px solid #ddd;
}

.cell:last-child {
	border-right: none;
}

.highlight {
	background-color: yellow;
	font-weight: bold;
}

/*Counter*/
.countdown-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background-color: #ffffff;
	padding: 2rem;
	border-radius: 1rem;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	max-width: 90%;
	width: 500px;
}

canvas {
	display: block;
	margin: 1.5rem auto;

	/* Ensure canvas itself is circular */
	border-radius: 50%;

	/* Inner shadow for depth */
	box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.countdown-text {
	color: #334155;

	/* Medium font size */
	font-size: 1.25rem;

	margin-bottom: 0.5rem;
}

/* Styles for centering the number within the circle */
.countdown-circle-wrapper {
	position: relative;

	/* Must match canvas width */
	width: 150px;

	/* Must match canvas height */
	height: 150px;

	/* Keep the same margin as canvas had */
	margin: 1.5rem auto;
}

.countdown-number {
	position: absolute;
	top: 50%;
	left: 50%;

	/* Adjust for the element's own size to truly center */
	transform: translate(-50%, -50%);

	font-size: 3rem;
	font-weight: bold;
	color: #1d4ed8;
	z-index: 10;
}

/* Responsive adjustments */
@media (max-width: 640px) {
	.countdown-text {
		font-size: 1rem;
	}

	.countdown-number {
		font-size: 2.5rem;
	}
}

/*Scrolling right side div*/
/* Base scroll container */
.scroll-container {
	width: 100%;
	max-width: 100%;
	height: 50vh;
	max-height: 300px;
	min-height: 100px;
	overflow-y: scroll;
	overflow-x: hidden;
	border: 5px solid #ccc;
	box-sizing: border-box;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	border-radius: 8px;

	/* Firefox scrollbar */
	scrollbar-width: thin;
	scrollbar-color: #888 #f1f1f1;
}

/* WebKit browsers (Chrome, Edge, Safari) */
.scroll-container::-webkit-scrollbar {
	width: 8px;
}

.scroll-container::-webkit-scrollbar-thumb {
	background-color: #888;
	border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-track {
	background-color: #f1f1f1;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
	background-color: #555;
}

/* Responsive adjustments */
@media (min-width: 768px) {
	.scroll-container {
		/* Firefox */
		scrollbar-width: auto;
	}

	.scroll-container::-webkit-scrollbar {
		width: 12px;
	}
}

@media (max-width: 480px) {
	.scroll-container {
		scrollbar-width: thin;
		/* Firefox */
	}

	.scroll-container::-webkit-scrollbar {
		width: 8px;
	}
}

.closeButton {
	position: absolute;
	top: 1px;
	right: 2px;
	padding: 18px 16px;
	font-size: 1em;
	font-weight: bold;
	background-color: #f44336;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	z-index: 10;
	display: none;
}

label {
	display: block;
	text-align: left;
	font-weight: bold;
	margin-bottom: 5px;
}

input[type="text"],
textarea,
select {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-bottom: 15px;
}

.form-container form {
	text-align: left;
}

/* Customized dropdown */
.dropdown {
	position: relative;
	width: 100%;
	user-select: none;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.text-wrap {
	display: flex;
	flex-direction: column;
	margin-right: 15px;
}

/* Circle number */
.circle-num {
	display: inline-flex;
	border: 2px solid #000;
	color: black;
	border-radius: 100%;
	width: 1.5em;
	height: 1.5em;
	justify-content: center;
	align-items: center;
	font-weight: bold;
	font-size: 1.2em;

	/* prevent shrinking */
	flex-shrink: 0;
}

/* intend text after the given gap */
.indent-text {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.blinking {
	animation: blink 1s infinite;
	box-shadow: 0px 1px 13px 0px rgba(85, 85, 85, .71);
}

@keyframes blink {
	0% {
		opacity: 1;
	}

	50% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}

canvas noscript {
	display: none;
}

.footer {
	position: fixed;
	left: 0;
	width: 100%;
	bottom: 0;
	left: 0;
	padding: 8px;
	background-color: #efefef;
	text-align: center;
	position: static;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 18px;
}

/*To display information under href*/
a.tooltip {
	border-bottom: none;
	text-decoration: none;
}

a.tooltip:hover {
	cursor: help;
	position: relative;
}

a.tooltip span {
	display: none;
}

a.tooltip:hover span {
	border: solid;
	padding: 5px 20px 5px 5px;
	display: block;
	z-index: 100;
	background: #e3e3e3;
	left: 0px;
	margin: 15px;
	width: auto;
	position: absolute;
	top: 20px;
	text-decoration: none;
}

.moving-arrow-right {
	display: inline-block;
	animation: moveRight 1s infinite alternate;
}

@keyframes moveRight {
	0% {
		transform: translateX(0);
	}

	100% {
		transform: translateX(8px);
	}
}

.arabic-red {
	font-size: 1.2em;
	color: red;
	font-weight: bold;
}

.arabic-black {
	font-size: 1.2em;
	color: rgb(0, 0, 0);
	font-weight: bold;
}


.hebrew {
	font-family: "Times New Roman", Times, serif;
	font-size: 1.4em;
	direction: rtl;
	font-weight: bold;
}

.saw {
	font-family:
		"Apple Color Emoji",
		"Segoe UI Emoji",
		"Noto Color Emoji",
		emoji;
	font-size: 1.5em;
	line-height: 1;
	display: inline-block;
	vertical-align: middle;
	white-space: nowrap;
}

/* Active Button Styling */
.speed-btn.active-speed {
	border: 1px solid #0056b3;
	background: #007bff;
	color: #fff;
	box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.25);
}

/* End audio playing speed */

/* ==========================================================================
   COLLAPSIBLE CONTAINER STYLES
   
   HTML BLUEPRINT FOR THIS COMPONENT:
   <div>
       Visible intro text...
       <details>
           <summary></summary>
           <div class="extended-text">
               Hidden long text...
			   
               <span class="close-text-btn" onclick="this.closest('details').removeAttribute('open');" style="display: inline-flex; align-items: center; gap: 8px;">Show Less 
			          <span style="font-size: 1.2em; line-height: 1;">▴</span>
               </span>
           </div>
       </details>
	   <hr>
   </div>
   ========================================================================== */

/* Main wrapper for the text block */

/* Base style for the HTML5 details/summary trigger */
summary {
	outline: none;

	/* Removes default arrow/triangle */
	list-style: none;

	/* Changed to block to allow right-alignment */
	display: block;

	text-align: right;
	/* Pushes the "Read more" button to the far right */
}

/* Removes default arrow/triangle in Chrome, Safari, and Opera */
summary::-webkit-details-marker {
	display: none;
}

/* Converts the extended text area into a column layout so we can align the bottom button */
.extended-text {
	margin-top: 3px;
	display: flex;
	flex-direction: column;
}


/* ==========================================================================
   THE BUTTON STYLES (SHARED FOR BOTH TOP & BOTTOM BUTTONS)
   ========================================================================== */

/* 1. Base style to turn the text into a real raised blue button */
summary::after,
.close-text-btn {
	display: inline-block;
	padding: 2px 10px;
	background-color: #0066cc;
	color: #ffffff !important;
	font-weight: bold;
	text-decoration: none !important;
	border-radius: 5px;
	cursor: pointer;

	/* 3D Raised Shadow Effect */
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);

	/* Smooth transition animation for hover and press effects */
	transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease;
}

/* Pushes the bottom "Read less" button to the far right side */
.close-text-btn {
	align-self: flex-end;
}

/* 2. Text Content for the top button */
summary::after {
	content: "Show more...";
}

/* 3. Hover State: Makes the button physically lift up and darken */
summary:hover::after,
.close-text-btn:hover {
	/* Lifts button up */
	transform: translateY(-2px);

	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
	background-color: #0052a3;
}

/* 4. Active State: Mimics a mechanical button click when pressed */
summary:active::after,
.close-text-btn:active {
	/* Compresses button downward */
	transform: translateY(1px);

	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* ==========================================================================
   DYNAMIC HIDING (TOP BUTTON ONLY)
   ========================================================================== */

/* Completely hides the top "Read more" button once the text is expanded */
details[open] summary {
	display: none;
}

/* End: COLLAPSIBLE "READ MORE" CONTAINER */

/* Start with Hadeeth style   */
.lang-btn {
	background: linear-gradient(to bottom, #2563eb, #1d4ed8);
	color: white;
	border: 1px solid #1e40af;
	padding: 8px 16px;
	font-size: 15px;
	font-weight: bold;
	font-family: inherit;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
	transition: all 0.2s ease;
	white-space: nowrap;
	margin-left: auto;
}

#contentContainer[dir="rtl"] .lang-btn {
	margin-left: 0;
	margin-right: auto;
}

.lang-btn:hover {
	background: linear-gradient(to bottom, #3b82f6, #2563eb);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.lang-btn:active {
	background: linear-gradient(to bottom, #1e40af, #2563eb);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.3);
	transform: translateY(1px);
}

.search-wrapper {
	position: relative;
	margin-bottom: 8px;
	width: 100%;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.search-input-container {
	position: relative;
	flex: 1;
	min-width: 220px;
	margin-bottom: 0;
}

.search-box {
	width: 100%;
	padding: 12px 20px;
	font-size: 1.2em;
	border: 2px solid #cbd5e1;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.3s, background-color 0.3s, color 0.3s;
	box-sizing: border-box;
	margin-bottom: 0;
	background-color: #ffffff;
	/* Default Day Mode background */
	color: #1e293b;
	/* Default Day Mode font color */
}

/* Night Mode Styles for the Search Box */
.night-mode-active .search-box {
	background-color: #1e293b;
	/* Dark background color */
	color: #f8fafc;
	/* Light text color */
	border-color: #475569;
	/* Darker border color for night mode */
}

.night-mode-active .search-box::placeholder {
	color: #94a3b8;
	/* Adjusted placeholder color for dark mode readability */
}

.night-mode-active .search-box:focus {
	border-color: #3b82f6;
	/* Brighter focus border color in night mode */
}

#contentContainer:not([dir="rtl"]) .search-box {
	padding-right: 50px;
}

#contentContainer[dir="rtl"] .search-box {
	padding-left: 50px;
}

.search-box:focus {
	border-color: #2563eb;
}

.clear-search-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
	padding: 3px 6px;
	margin-top: -10px;
	display: none;
	box-shadow: 3px 4px 0px 0px #848181;
	background: linear-gradient(to bottom, #f24437 5%, #c62d1f 100%);
	background-color: #c62d1f;
	border-radius: 11px;
	border: 1px solid #d02718;
	color: #ffffff;
	font-size: 17px;
	font-weight: bold;
	text-decoration: none;
	transition: all 0.1s ease;
}

.clear-search-btn:hover {
	background: linear-gradient(to bottom, #c62d1f 5%, #f24437 100%);
	background-color: #f24437;
}

#contentContainer:not([dir="rtl"]) .clear-search-btn {
	right: 4px;
}

#contentContainer[dir="rtl"] .clear-search-btn {
	left: 4px;
}

.table-responsive {
	width: 100%;
	max-height: 600px;
	overflow-y: auto;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 20px;
	border-radius: 8px;
	position: relative;
}

table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

th,
td {
	padding: 14px 10px;
	border-bottom: 1px solid #e2e8f0;
	font-size: 16px;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

th:first-child,
td:first-child {
	width: 60px;
	text-align: center;
}

th:last-child,
td:last-child {
	width: auto;
}

th {
	background-color: var(--primary);
	color: white;
	cursor: pointer;
	user-select: none;
	position: sticky;
	top: 0;
	z-index: 10;
	font-size: 18px;
	font-weight: bold;
}

.th-content-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 10px;
}

.th-left-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hadith-preview {
	display: -webkit-box;
	display: box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

#contentContainer[dir="rtl"] {
	direction: rtl;
	text-align: right;
}

#contentContainer[dir="rtl"] th,
#contentContainer[dir="rtl"] td {
	text-align: right;
	direction: rtl;
}

#contentContainer[dir="rtl"] th:first-child,
#contentContainer[dir="rtl"] td:first-child {
	text-align: center;
}

#contentContainer:not([dir="rtl"]) {
	direction: ltr;
	text-align: left;
}

#contentContainer:not([dir="rtl"]) th,
#contentContainer:not([dir="rtl"]) td {
	text-align: left;
	direction: ltr;
}

#contentContainer:not([dir="rtl"]) th:first-child,
#contentContainer:not([dir="rtl"]) td:first-child {
	text-align: center;
}

#contentContainer:not([dir="rtl"]) th:first-child {
	border-top-left-radius: 8px;
	border-top-right-radius: 0;
}

#contentContainer:not([dir="rtl"]) th:last-child {
	border-top-left-radius: 0;
	border-top-right-radius: 8px;
}

#contentContainer[dir="rtl"] th:first-child {
	border-top-left-radius: 0;
	border-top-right-radius: 8px;
}

#contentContainer[dir="rtl"] th:last-child {
	border-top-left-radius: 8px;
	border-top-right-radius: 0;
}

th:hover {
	background-color: #1d4ed8;
}

tr.clickable-row {
	cursor: pointer;
}

tr.clickable-row:hover {
	background-color: #f1f5f9;
}

.hadith-detail-card {
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	padding: 25px;
	margin-bottom: 25px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.detail-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 20px;
	border-bottom: 2px solid #f1f5f9;
	padding-bottom: 12px;
	gap: 12px;
}

.detail-buttons-group {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: nowrap;
	width: 100%;
}

.close-btn {
	background: linear-gradient(to bottom, #ff3b3b, #d30000);
	color: white;
	border: 1px solid #a80000;
	padding: 8px 14px;
	font-size: 15px;
	font-weight: bold;
	font-family: inherit;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
	transition: all 0.2s ease;
	white-space: nowrap;
}

.close-btn:hover {
	background: linear-gradient(to bottom, #ff5252, #e60000);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.close-btn:active {
	background: linear-gradient(to bottom, #b50000, #e60000);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.3);
	transform: translateY(1px);
}

.detail-section {
	margin-bottom: 15px;
}

.detail-section h4 {
	margin: 0 0 5px 0;
	font-size: 17px;
	font-weight: bold;
	color: var(--primary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.detail-section p {
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
}

.total-count {
	font-size: 15px;
	font-weight: bold;
	color: var(--text-muted);
	text-align: center;
	margin-top: 10px;
	margin-bottom: 15px;
}

.bottom-actions-wrapper {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-bottom: 25px;
}

.references-section {
	margin-top: 30px;
	padding: 20px;
	background-color: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 16px;
	line-height: 1.6;
}

.references-section h3 {
	margin-top: 0;
	margin-bottom: 12px;
	font-size: 18px;
	color: var(--primary);
}

.references-section ol {
	margin: 0;
	padding-left: 20px;
}

#contentContainer[dir="rtl"] .references-section ol {
	padding-left: 0;
	padding-right: 20px;
}

.references-section li {
	margin-bottom: 12px;
}

.references-section li:last-child {
	margin-bottom: 0;
}

.references-note {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	color: var(--text-muted);
}

/* Dynamic language switching rules for included weak narrators component */
html[lang="en"] .lang-ar {
	display: none !important;
}

html[lang="en"] .lang-en {
	display: block !important;
}

html[lang="ar"] .lang-en {
	display: none !important;
}

html[lang="ar"] .lang-ar {
	display: block !important;
}

@media (min-width: 768px) {
	.container {
		padding: 30px;
		margin: 20px auto;
	}

	th,
	td {
		font-size: 18px;
		padding: 16px 12px;
	}
}

/* Parent Container (.box) Night Mode Styling */
body.night-mode-active .box {
	background-color: #121212 !important;
	color: #e0e0e0 !important;
	border-color: #333333 !important;
}

/* Change main headers and reference headers to pure white, excluding table headers */
body.night-mode-active h1:not(#hadithTable th h3):not(#hadithTable th),
body.night-mode-active h3:not(#hadithTable th h3),
body.night-mode-active h4:not(#hadithTable th h4) {
	color: #ffffff !important;
}

/* Table Data Body Night Mode Styling (Leaving table headers untouched) */
#hadithTable.night-mode {
	background-color: #1a1a1a !important;
	color: #e0e0e0 !important;
}

#hadithTable.night-mode td {
	background-color: #1a1a1a !important;
	color: #e0e0e0 !important;
	border-color: #333333 !important;
}

#hadithTable.night-mode tr:hover td {
	background-color: #2a2a2a !important;
}

/* Hadith Details / Info Card Night Mode Styling */
body.night-mode-active .hadith-detail-card {
	background-color: #1a1a1a !important;
	color: #e0e0e0 !important;
	border-color: #333333 !important;
}

body.night-mode-active .hadith-detail-card .detail-section,
body.night-mode-active .hadith-detail-card .detail-header {
	background-color: #1a1a1a !important;
	color: #e0e0e0 !important;
	border-color: #333333 !important;
}

body.night-mode-active .hadith-detail-card p,
body.night-mode-active .hadith-detail-card strong {
	color: #e0e0e0 !important;
}

/* References Section Night Mode Styling */
body.night-mode-active .references-section {
	background-color: #000063 !important;
	color: #e0e0e0 !important;
	border-color: #333333 !important;
}

body.night-mode-active .references-section li,
body.night-mode-active .references-section strong,
body.night-mode-active .references-section span {
	color: #e0e0e0 !important;
}

/* end Hadeeth style