/* ----------------------------------------------------------------
   Archive: force articles visible even if Hazel animation JS
   doesn't fire on CPT archive / taxonomy pages
---------------------------------------------------------------- */
.post-type-archive-sikh_panth_post article.not-in-view,
.tax-sikh_category article.not-in-view,
.tax-sikh_topic article.not-in-view,
.tax-sikh_tag article.not-in-view,
.tax-sikh_person article.not-in-view {
	opacity: 1 !important;
	-webkit-transform: none !important;
	transform: none !important;
}

/* ----------------------------------------------------------------
   Single post: black readable text
---------------------------------------------------------------- */
.single-sikh_panth_post .sph-post-content,
.single-sikh_panth_post .sph-post-content p,
.single-sikh_panth_post .sph-post-content li,
.single-sikh_panth_post .sph-post-content blockquote,
.single-sikh_panth_post .the_content,
.single-sikh_panth_post .the_content p,
.single-sikh_panth_post .the_content li,
.single-sikh_panth_post .the_content blockquote {
	color: #222 !important;
}

/* ----------------------------------------------------------------
   Single post: paragraph spacing
---------------------------------------------------------------- */
.single-sikh_panth_post .the_content p {
	margin-bottom: 1.6em;
}

.single-sikh_panth_post .sph-post-meta {
	color: #888;
	margin-bottom: 28px;
}

.single-sikh_panth_post {
	--sggs-ink: #222222;
	--sggs-muted: #66615a;
	--sggs-gurmukhi: #550000;
}

/* ----------------------------------------------------------------
   SGGS refs block
---------------------------------------------------------------- */
.sph-sggs-refs {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid #e5e5e5;
}

.sph-sggs-refs h4 {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 12px;
	color: #333;
}

.sph-sggs-refs ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sph-sggs-refs .sph-sggs-ref-item {
	margin-bottom: 10px;
}

/* ----------------------------------------------------------------
   Sikh figures: roles and mention cards
---------------------------------------------------------------- */
.sph-figure-panel {
	margin: 42px 0 36px;
	padding: 22px;
	border-top: 1px solid rgba(20, 23, 28, 0.12);
	border-bottom: 1px solid rgba(20, 23, 28, 0.12);
	background: linear-gradient(180deg, rgba(250, 250, 248, 0.96), rgba(244, 247, 247, 0.96));
}

.sph-section-heading h4 {
	margin: 0 0 16px;
	color: #1f2a33;
	font-size: 18px;
	letter-spacing: 0;
	text-transform: none;
}

.sph-figure-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.sph-figure-card {
	margin: 0;
}

.sph-figure-card-link {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 12px;
	min-height: 100%;
	padding: 14px;
	background: #fff;
	box-shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
	color: #14171c;
	text-decoration: none !important;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.sph-figure-card-link:hover {
	color: #14171c;
	transform: translateY(-2px);
	box-shadow: 0 20px 52px rgba(0, 0, 0, 0.12);
}

.sph-figure-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	overflow: hidden;
	background: #14171c;
	color: #d5a64c;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.sph-figure-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sph-figure-card-body {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 7px;
}

.sph-figure-card-body strong {
	color: #14171c;
	font-size: 15px;
	line-height: 1.25;
}

.sph-figure-roles,
.sph-archive-figures {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sph-figure-roles em,
.sph-archive-figures a span {
	display: inline-flex;
	padding: 3px 7px;
	border: 1px solid rgba(79, 168, 155, 0.28);
	background: rgba(79, 168, 155, 0.08);
	color: #0f6f62;
	font-size: 10px;
	font-style: normal;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
}

.sph-figure-description {
	color: #667079;
	font-size: 12px;
	line-height: 1.45;
}

.sph-archive-figures {
	margin: -12px 0 16px;
}

.sph-archive-figures a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 8px;
	border: 1px solid rgba(20, 23, 28, 0.12);
	background: #fff;
	color: #1f2a33;
	font-size: 12px;
	line-height: 1.25;
	text-decoration: none !important;
}

.sph-archive-figures a:hover {
	border-color: #4fa89b;
	color: #0f6f62;
}

/* ----------------------------------------------------------------
   Inline Gurmukhi highlight
---------------------------------------------------------------- */
.sph-gurbani-link {
	text-decoration: none !important;
}

.sggs-reader__sggs-ref-chip {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border: 1px solid rgba(85, 0, 0, 0.28);
	background: rgba(85, 0, 0, 0.06);
	color: var(--sggs-gurmukhi) !important;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	vertical-align: middle;
}

.sggs-reader__sggs-ref-chip:hover {
	background: rgba(85, 0, 0, 0.13);
	color: var(--sggs-gurmukhi) !important;
}

.sggs-reader__sggs-ref-block {
	display: block;
	position: relative;
	margin: 8px 0;
	padding: 10px 12px 10px 38px;
	border: 1px solid rgba(85, 0, 0, 0.22);
	background: rgba(85, 0, 0, 0.04);
	color: inherit;
	text-decoration: none !important;
	cursor: pointer;
	border-radius: 3px;
}

.sggs-reader__sggs-ref-block::before {
	content: "📖";
	position: absolute;
	left: 10px;
	top: 10px;
	font-size: 15px;
	line-height: 1;
}

.sggs-reader__sggs-ref-block:hover {
	background: rgba(85, 0, 0, 0.09);
	border-color: rgba(85, 0, 0, 0.38);
}

.sggs-reader__sggs-ref-block-body {
	display: block;
}

.sggs-reader__sggs-ref-block-body span {
	display: block;
	overflow-wrap: anywhere;
	line-height: 1.5;
}

.sggs-reader__sggs-ref-block-gurmukhi {
	color: var(--sggs-gurmukhi);
	font-size: 16px;
	line-height: 1.55;
}

.sggs-reader__sggs-ref-block-transliteration {
	margin-top: 6px;
	color: var(--sggs-muted);
	font-size: 13px;
	font-style: italic;
	white-space: pre-line;
}

.sggs-reader__sggs-ref-block-translation {
	margin-top: 6px;
	color: inherit;
	font-size: 14px;
	white-space: pre-line;
}

.sggs-reader__sggs-ref-block-meta {
	display: inline-flex;
	align-items: center;
	margin-top: 6px;
	padding: 2px 7px;
	background: rgba(85, 0, 0, 0.06);
	border: 1px solid rgba(85, 0, 0, 0.18);
	border-radius: 2px;
	color: var(--sggs-gurmukhi);
	font-size: 11px;
	font-weight: 600;
}

/* ----------------------------------------------------------------
   SGGS reader sidebar panel (right side)
---------------------------------------------------------------- */
#sph-sggs-panel {
	position: fixed;
	top: 0;
	right: -52vw;
	width: 50vw;
	max-width: 50vw;
	height: 100vh;
	background: #fff;
	box-shadow: -4px 0 28px rgba(0, 0, 0, 0.18);
	z-index: 99999;
	transition: right 0.3s ease;
	display: flex;
	flex-direction: column;
}

#sph-sggs-panel.sph-panel-open {
	right: 0;
}

body.sph-sggs-split-open {
	overflow-x: hidden;
}

body.sph-sggs-split-open.single-sikh_panth_post .blog-default,
body.sph-sggs-split-open.single-sikh_panth_post .sph-cin-post {
	width: 50vw;
	max-width: 50vw;
	transition: width 0.3s ease, max-width 0.3s ease;
}

body.sph-sggs-split-open.single-sikh_panth_post .master_container.container {
	width: 100%;
	max-width: 100%;
}

body.sph-sggs-split-open.single-sikh_panth_post .sph-cin-theme-toggle {
	right: calc(50vw + 28px);
}

#sph-sggs-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	background: #f5f0e8;
	border-bottom: 1px solid #e0d8cc;
	flex-shrink: 0;
}

#sph-sggs-panel-title {
	font-size: 13px;
	font-weight: 600;
	color: #666;
}

#sph-sggs-panel-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

#sph-sggs-panel-fullpage {
	font-size: 12px;
	font-weight: 600;
	color: #c06000;
	text-decoration: none;
	padding: 4px 8px;
	border: 1px solid rgba(192, 96, 0, 0.3);
	border-radius: 3px;
	white-space: nowrap;
}

#sph-sggs-panel-fullpage:hover {
	background: rgba(192, 96, 0, 0.06);
}

#sph-sggs-panel-close {
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: #888;
	padding: 4px 6px;
	border-radius: 3px;
}

#sph-sggs-panel-close:hover {
	color: #333;
	background: rgba(0, 0, 0, 0.06);
}

#sph-sggs-panel iframe {
	flex: 1;
	width: 100%;
	border: none;
	background: #fff;
}

@media (max-width: 786px) {
	.sph-figure-panel {
		padding: 16px;
	}

	.sph-figure-grid {
		grid-template-columns: 1fr;
	}

	#sph-sggs-panel {
		right: -100vw;
		width: 100vw;
		max-width: 100vw;
	}

	body.sph-sggs-split-open.single-sikh_panth_post .blog-default,
	body.sph-sggs-split-open.single-sikh_panth_post .sph-cin-post {
		width: 100%;
		max-width: 100%;
	}

	body.sph-sggs-split-open.single-sikh_panth_post .sph-cin-theme-toggle {
		right: 28px;
	}
}

#sph-sggs-panel.sph-panel-day {
	background: #fff7e6;
	box-shadow: -14px 0 46px rgba(75, 42, 123, 0.16);
}

#sph-sggs-panel.sph-panel-night {
	background: #0d0a14;
	box-shadow: -14px 0 46px rgba(0, 0, 0, 0.46);
}

#sph-sggs-panel.sph-panel-day #sph-sggs-panel-header {
	background: rgba(255, 247, 230, 0.94);
	border-bottom-color: rgba(75, 42, 123, 0.16);
}

#sph-sggs-panel.sph-panel-night #sph-sggs-panel-header {
	background: #171120;
	border-bottom-color: rgba(244, 185, 66, 0.18);
}

#sph-sggs-panel.sph-panel-day #sph-sggs-panel-title {
	color: #1f1b24;
}

#sph-sggs-panel.sph-panel-night #sph-sggs-panel-title {
	color: #f7efe2;
}

#sph-sggs-panel.sph-panel-day #sph-sggs-panel-fullpage {
	color: #1f1b24;
	border-color: rgba(75, 42, 123, 0.24);
	background: #fff;
}

#sph-sggs-panel.sph-panel-night #sph-sggs-panel-fullpage {
	color: #f4b942;
	border-color: rgba(244, 185, 66, 0.24);
	background: rgba(244, 185, 66, 0.08);
}

#sph-sggs-panel.sph-panel-day #sph-sggs-panel-close {
	color: #1f1b24;
}

#sph-sggs-panel.sph-panel-night #sph-sggs-panel-close {
	color: #b7a8c9;
}

#sph-sggs-panel.sph-panel-day iframe {
	background: #fff7e6;
}

#sph-sggs-panel.sph-panel-night iframe {
	background: #0d0a14;
}

#sph-sggs-panel-loader {
	position: absolute;
	inset: 45px 0 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: rgba(255, 247, 230, 0.92);
	color: #1f1b24;
	font-size: 13px;
	font-weight: 700;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
}

#sph-sggs-panel.sph-panel-night #sph-sggs-panel-loader {
	background: rgba(13, 10, 20, 0.92);
	color: #f7efe2;
}

#sph-sggs-panel.sph-panel-loading #sph-sggs-panel-loader {
	opacity: 1;
	pointer-events: auto;
}

.sph-sggs-loader-orb {
	width: 46px;
	height: 46px;
	border-radius: 999px;
	background:
		radial-gradient(circle at 50% 50%, #fff 0 34%, transparent 36%),
		conic-gradient(from 0deg, #ff8c1a, #f4b942, #4b2a7b, #ff8c1a);
	box-shadow: 0 16px 38px rgba(75, 42, 123, 0.18);
	animation: sph-sggs-loader-spin 900ms linear infinite;
}

#sph-sggs-panel.sph-panel-night .sph-sggs-loader-orb {
	background:
		radial-gradient(circle at 50% 50%, #171120 0 34%, transparent 36%),
		conic-gradient(from 0deg, #ff8c1a, #f4b942, #7a6a8f, #ff8c1a);
}

@keyframes sph-sggs-loader-spin {
	to { transform: rotate(360deg); }
}

/* Refine SGGS side panel colors. */
#sph-sggs-panel.sph-panel-day #sph-sggs-panel-title,
#sph-sggs-panel.sph-panel-day #sph-sggs-panel-fullpage,
#sph-sggs-panel.sph-panel-day #sph-sggs-panel-loader {
	color: #1f1b24;
}

#sph-sggs-panel.sph-panel-day #sph-sggs-panel-fullpage {
	border-color: rgba(31, 27, 36, 0.18);
}

#sph-sggs-panel.sph-panel-night,
#sph-sggs-panel.sph-panel-night iframe,
#sph-sggs-panel.sph-panel-night #sph-sggs-panel-loader {
	background: #0d0a14;
}

#sph-sggs-panel.sph-panel-night #sph-sggs-panel-header {
	background: #0d0a14;
}

#sph-sggs-panel.sph-panel-night #sph-sggs-panel-fullpage,
#sph-sggs-panel.sph-panel-night #sph-sggs-panel-close {
	background: #120d19;
}
