/**
 * Church API — daily readings styles.
 * Designed to sit natively within the CozySoft/SoftMe homepage.
 * Brand green: #0D9B4D (from the child theme :root --dt-pri-color).
 */

:root {
	--church-green: #0D9B4D;
	--church-ink: #121212;
	--church-muted: #6b7280;
	--church-line: #e8eaed;
	--church-card-bg: #ffffff;
	--church-soft-bg: #f7f8fa;
}

/* ---------- Shared ---------- */
.church-readings {
	font-family: inherit;
	color: var(--church-ink);
	text-align: right;
}

.church-readings *,
.church-readings *::before,
.church-readings *::after {
	box-sizing: border-box;
}

/* ---------- Section wrapper ---------- */
.church-readings--card {
	padding: 70px 0;
	background: linear-gradient(180deg, #ffffff 0%, var(--church-soft-bg) 100%);
}

/* ---------- Own heading (replaces fragile theme heading) ---------- */
.church-readings__heading {
	text-align: center;
	margin-bottom: 40px;
}

.church-readings__eyebrow {
	display: inline-block;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--church-green);
	background: rgba(13, 155, 77, 0.1);
	padding: 6px 18px;
	border-radius: 999px;
	margin-bottom: 14px;
}

.church-readings__title {
	font-size: 2.3rem;
	font-weight: 800;
	line-height: 1.3;
	margin: 0;
	color: var(--church-ink);
}

/* ---------- Compact card ---------- */
.church-readings--card .church-readings__card {
	max-width: 780px;
	margin: 0 auto;
	background: var(--church-card-bg);
	border: 1px solid var(--church-line);
	border-radius: 20px;
	padding: 0;
	box-shadow: 0 24px 60px -32px rgba(18, 18, 18, 0.4);
	position: relative;
	overflow: hidden;
}

/* Green accent strip on the trailing (right, in RTL) edge */
.church-readings--card .church-readings__card::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 6px;
	height: 100%;
	background: var(--church-green);
}

.church-readings__date {
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
	padding: 24px 36px;
	background: linear-gradient(90deg, rgba(13, 155, 77, 0.07), transparent);
	border-bottom: 1px solid var(--church-line);
}

.church-readings__coptic {
	font-size: 1.85rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--church-green);
}

.church-readings__greg {
	font-size: 1rem;
	color: var(--church-muted);
}

.church-readings__rows {
	padding: 14px 36px;
}

.church-readings__row {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 16px 0;
}

.church-readings__row + .church-readings__row {
	border-top: 1px dashed var(--church-line);
}

.church-readings__label {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 132px;
	justify-content: center;
	font-size: 0.9rem;
	font-weight: 700;
	color: #fff;
	background: var(--church-green);
	padding: 8px 16px;
	border-radius: 10px;
	white-space: nowrap;
}

.church-readings__label i {
	font-size: 0.85em;
	opacity: 0.9;
}

.church-readings__value {
	flex: 1 1 auto;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.85;
	color: var(--church-ink);
	padding-top: 4px;
}

.church-readings__more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 18px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	background: var(--church-green);
	text-decoration: none;
	transition: background 0.2s ease, gap 0.2s ease;
}

.church-readings__more:hover {
	background: #0b8541;
	gap: 16px;
	color: #fff;
}

.church-readings__more i {
	/* Arrow points left in an RTL layout */
	transform: scaleX(-1);
}

/* ---------- Inline expand toggle ---------- */
.church-readings__toggle {
	width: 100%;
	border: 0;
	cursor: pointer;
	font-family: inherit;
}

.church-readings__toggle i {
	transform: none;
	transition: transform 0.25s ease;
}

.church-readings__toggle.is-open i {
	transform: rotate(180deg);
}

/* Swap the open/close labels based on state */
.church-readings__toggle .church-readings__toggle-close {
	display: none;
}

.church-readings__toggle.is-open .church-readings__toggle-open {
	display: none;
}

.church-readings__toggle.is-open .church-readings__toggle-close {
	display: inline;
}

.church-readings__expand {
	border-top: 1px solid var(--church-line);
	padding: 8px 28px 28px;
	background: var(--church-soft-bg);
	animation: church-fade-in 0.3s ease;
}

@keyframes church-fade-in {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Tabs ---------- */
.church-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 22px;
	border-bottom: 2px solid var(--church-line);
	padding-bottom: 0;
}

.church-tabs__tab {
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--church-muted);
	padding: 12px 22px;
	cursor: pointer;
	position: relative;
	border-radius: 10px 10px 0 0;
	transition: color 0.2s ease, background 0.2s ease;
}

.church-tabs__tab:hover {
	color: var(--church-green);
	background: rgba(13, 155, 77, 0.06);
}

.church-tabs__tab.is-active {
	color: var(--church-green);
}

.church-tabs__tab.is-active::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 100%;
	height: 3px;
	background: var(--church-green);
	border-radius: 3px;
}

.church-tabs__tab:focus-visible {
	outline: 2px solid var(--church-green);
	outline-offset: 2px;
}

.church-tabs__panel {
	animation: church-fade-in 0.25s ease;
}

.church-tabs__panel[hidden] {
	display: none;
}


/* ---------- Full readings page (shortcode) ---------- */
.church-readings--full {
	max-width: 820px;
	margin: 0 auto;
	line-height: 1.95;
}

.church-readings__header {
	text-align: center;
	margin-bottom: 36px;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--church-green);
}

.church-readings__header h2 {
	margin: 0 0 6px;
	font-size: 2rem;
	font-weight: 800;
}

.church-readings--full .church-readings__date {
	display: inline-flex;
	gap: 14px;
	align-items: baseline;
	border: 0;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.church-readings__section {
	margin-bottom: 30px;
}

.church-readings__section-title {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--church-green);
	margin: 0 0 16px;
	padding: 8px 16px;
	background: var(--church-soft-bg);
	border-right: 5px solid var(--church-green);
	border-radius: 6px;
}

.church-readings__sub {
	margin: 0 0 22px;
	padding: 0 8px;
}

.church-readings__sub-title {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 8px;
	color: var(--church-ink);
}

.church-readings__reading {
	margin-bottom: 18px;
}

.church-readings__reading-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 6px;
}

.church-readings__ref {
	display: inline-block;
	font-size: 0.9rem;
	font-weight: 700;
	color: #fff;
	background: var(--church-green);
	padding: 3px 12px;
	border-radius: 999px;
	margin: 0 0 10px;
}

.church-readings__intro,
.church-readings__conclusion {
	color: var(--church-muted);
	font-style: italic;
	margin: 8px 0;
}

.church-readings__text {
	font-size: 1.12rem;
}

.church-readings__verse {
	display: inline;
}

.church-readings__vnum {
	color: var(--church-green);
	font-weight: 800;
	font-size: 0.72em;
	margin-inline-start: 2px;
}

.church-readings__credit {
	text-align: center;
	color: var(--church-muted);
	font-size: 0.9rem;
	margin-top: 36px;
	padding-top: 16px;
	border-top: 1px solid var(--church-line);
}

/* ---------- Error / empty ---------- */
.church-readings--error {
	max-width: 600px;
	margin: 20px auto;
	padding: 20px;
	text-align: center;
	color: var(--church-muted);
	background: var(--church-soft-bg);
	border-radius: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
	.church-readings--card .church-readings__card {
		padding: 24px 20px;
	}
	.church-readings__coptic {
		font-size: 1.5rem;
	}
	.church-readings__value {
		font-size: 1rem;
		flex-basis: 100%;
	}
	.church-readings__section-title {
		font-size: 1.25rem;
	}
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	.church-readings__more {
		transition: none;
	}
}
