/* ============================================================ *
 * EGW Bible — Frontend styling
 *
 * Two responsibilities:
 *   1) Maintenance / disabled HTML (rendered in `the_content`).
 *   2) Feature-toggle gating via [data-feature-*] attributes set by the plugin
 *      on <html>. The theme template (page-ephesus-bible.php) declares its
 *      gated UI with classes like .strongs-trigger, .reading-mode-switcher,
 *      .search-trigger etc.; we hide those when the corresponding feature
 *      flag is off.
 * ============================================================ */

/* ---------- Maintenance / disabled blocks ---------- */
.egw-bible-maintenance,
.egw-bible-disabled {
	min-height: 70vh;
	display: flex; align-items: center; justify-content: center;
	padding: 64px 24px;
	background: linear-gradient(180deg, #FFF8E7 0%, #FFF1D3 100%);
	color: #000;
}
[data-theme="dark"] .egw-bible-maintenance,
[data-theme="dark"] .egw-bible-disabled {
	background: linear-gradient(180deg, #14171F 0%, #1F2A44 100%);
	color: #F5F1E2;
}
.egw-bible-maintenance__inner,
.egw-bible-disabled__inner {
	max-width: 640px; text-align: center;
	background: rgba(255,255,255,0.65);
	padding: 48px 36px;
	border-radius: 24px;
	border: 1px solid rgba(0,0,0,0.08);
	backdrop-filter: blur(12px) saturate(1.4);
	-webkit-backdrop-filter: blur(12px) saturate(1.4);
	box-shadow:
		0 1px 2px rgba(0,0,0,0.06),
		0 8px 24px rgba(0,0,0,0.08),
		0 24px 64px rgba(0,0,0,0.10);
}
[data-theme="dark"] .egw-bible-maintenance__inner,
[data-theme="dark"] .egw-bible-disabled__inner {
	background: rgba(31,42,68,0.70);
	border-color: rgba(255,241,211,0.14);
	color: #F5F1E2;
}
.egw-bible-maintenance__badge {
	display: inline-flex; width: 72px; height: 72px;
	align-items: center; justify-content: center;
	background: #1F2A44; color: #FFF1D3;
	border-radius: 50%; margin-bottom: 18px;
	box-shadow:
		0 1px 2px rgba(0,0,0,0.10),
		0 8px 22px rgba(31,42,68,0.30);
}
.egw-bible-maintenance__title,
.egw-bible-disabled__inner h1 {
	font-size: clamp(24px, 3.5vw, 32px);
	font-weight: 700;
	color: #1F2A44;
	margin: 0 0 12px;
	font-family: var(--font-heading, Georgia, serif);
}
[data-theme="dark"] .egw-bible-maintenance__title,
[data-theme="dark"] .egw-bible-disabled__inner h1 {
	color: #FFF1D3;
}
.egw-bible-maintenance__message {
	font-size: 16px; line-height: 1.65; color: #000;
}
[data-theme="dark"] .egw-bible-maintenance__message { color: #F5F1E2; }
.egw-bible-maintenance__eta {
	margin-top: 14px; font-size: 13px; color: #6B4A00;
	background: #FFE7B0; display: inline-block;
	padding: 6px 14px; border-radius: 9999px;
}
.egw-bible-maintenance__actions {
	margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.egw-bible-maintenance__btn-primary,
.egw-bible-maintenance__btn-ghost {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 24px; border-radius: 9999px;
	font-size: 14px; font-weight: 600;
	text-decoration: none;
	transition: transform 200ms ease, box-shadow 200ms ease;
	min-height: 44px;
}
.egw-bible-maintenance__btn-primary {
	background: #1F2A44; color: #FFF1D3;
	box-shadow:
		0 1px 2px rgba(0,0,0,0.10),
		0 8px 22px rgba(31,42,68,0.25);
}
.egw-bible-maintenance__btn-primary:hover {
	transform: translateY(-1px);
	box-shadow:
		0 1px 2px rgba(0,0,0,0.10),
		0 14px 28px rgba(31,42,68,0.30);
}
.egw-bible-maintenance__btn-ghost {
	background: transparent;
	color: #1F2A44;
	border: 1px solid rgba(31,42,68,0.18);
}
[data-theme="dark"] .egw-bible-maintenance__btn-ghost {
	color: #FFF1D3; border-color: rgba(255,241,211,0.30);
}
.egw-bible-maintenance__btn-ghost:hover {
	background: rgba(31,42,68,0.06);
}

.egw-bible-maintenance__admin-note {
	margin-top: 28px; font-size: 12px; color: #6B4A00;
	padding-top: 14px; border-top: 1px dashed rgba(0,0,0,0.10);
}
.egw-bible-maintenance__pill {
	background: #1F2A44; color: #FFF1D3;
	font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
	padding: 2px 8px; border-radius: 9999px; margin-right: 6px;
	text-transform: uppercase;
}
.egw-bible-maintenance__admin-note a { color: #1F2A44; text-decoration: underline; }
[data-theme="dark"] .egw-bible-maintenance__admin-note { color: #FFF1D3; }
[data-theme="dark"] .egw-bible-maintenance__admin-note a { color: #FFF1D3; }

/* ---------- Feature gating via [data-*] attributes on <html> ----------
   The plugin sets attributes like:
     data-feature-strongs="off"
     data-feature-search="off"
     data-feature-reading-modes="off"
   When set to "off", we hide the corresponding UI from the theme template.
*/
html[data-feature-strongs="off"] .strongs-toggle,
html[data-feature-strongs="off"] .strongs-panel,
html[data-feature-strongs="off"] .strongs-trigger,
html[data-feature-strongs="off"] [data-strongs] { display: none !important; }

html[data-feature-search="off"] .search-trigger,
html[data-feature-search="off"] .bible-search,
html[data-feature-search="off"] .search-panel { display: none !important; }

html[data-feature-reading-modes="off"] .reading-mode-switcher,
html[data-feature-reading-modes="off"] [data-reading-mode-toggle] { display: none !important; }

html[data-feature-compare-versions="off"] .compare-versions,
html[data-feature-compare-versions="off"] .parallel-view,
html[data-feature-compare-versions="off"] [data-compare-toggle] { display: none !important; }

html[data-feature-bookmarks="off"] .bookmark-trigger,
html[data-feature-bookmarks="off"] .bookmarks-panel { display: none !important; }

html[data-feature-highlights="off"] .highlight-trigger,
html[data-feature-highlights="off"] .highlight-toolbar { display: none !important; }

html[data-feature-notes="off"] .verse-note-trigger,
html[data-feature-notes="off"] .notes-panel { display: none !important; }

html[data-feature-share-verse="off"] .share-trigger,
html[data-feature-share-verse="off"] .verse-share { display: none !important; }

html[data-feature-copy-verse="off"] .verse-copy,
html[data-feature-copy-verse="off"] [data-copy-verse] { display: none !important; }

html[data-feature-print-chapter="off"] .print-chapter,
html[data-feature-print-chapter="off"] [data-print-chapter] { display: none !important; }

html[data-feature-font-controls="off"] .font-controls,
html[data-feature-font-controls="off"] [data-font-control] { display: none !important; }

html[data-feature-red-letters="off"] .verse-text .word-of-christ,
html[data-feature-red-letters="off"] .red-letter { color: inherit !important; }

html[data-feature-verse-numbers="off"] .verse-number { display: none !important; }

html[data-feature-audio-bible="off"] .audio-bible-trigger,
html[data-feature-audio-bible="off"] .audio-player-bar { display: none !important; }

html[data-feature-quick-lookup="off"] .quick-lookup-popover,
html[data-feature-quick-lookup="off"] [data-quick-lookup] { display: none !important; }

html[data-feature-chapter-intro="off"] .chapter-intro { display: none !important; }

html[data-feature-cross-refs="off"] .cross-ref,
html[data-feature-cross-refs="off"] .verse-cross-refs { display: none !important; }

html[data-feature-setup-guides="off"] .setup-guide-trigger,
html[data-feature-setup-guides="off"] .setup-guide-drawer { display: none !important; }

/* Update-status indicators for refresh / upgrade events
   (the page-ephesus-bible.php template can opt into showing these). */
.egw-bible-update-toast {
	position: fixed; bottom: 24px; right: 24px;
	background: #1F2A44; color: #FFF1D3;
	padding: 14px 20px; border-radius: 12px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.10), 0 14px 28px rgba(31,42,68,0.30);
	font-size: 13px; font-weight: 500;
	display: flex; align-items: center; gap: 10px;
	z-index: 9999;
	transform: translateY(20px); opacity: 0;
	transition: transform 240ms ease, opacity 240ms ease;
	pointer-events: none;
}
.egw-bible-update-toast.is-visible {
	transform: translateY(0); opacity: 1; pointer-events: auto;
}
.egw-bible-update-toast .spinner {
	width: 14px; height: 14px; border: 2px solid rgba(255,241,211,0.35);
	border-top-color: #FFF1D3; border-radius: 50%;
	animation: egwBibleSpin 800ms linear infinite;
}
@keyframes egwBibleSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.egw-bible-update-toast .spinner { animation: none; }
	.egw-bible-update-toast { transition: none; }
}
