/*
 * Church of Pentecost Youth Ministry Suite – core front-end styles, shared by every module.
 *
 * Every colour, font and size is a --cop-rtb-* variable on the .cop-rtb root each widget prints.
 * They are overridden, in this order, by:
 *   1. COP Suite → Appearance (site-wide, printed right after this file)
 *   2. each Elementor widget's Style tab (per widget)
 * All default values live here (not in module files), so the Appearance values always win.
 */
.cop-rtb {
	/* Colours */
	--cop-rtb-accent: #8a1c2b;
	--cop-rtb-accent-contrast: #ffffff;
	--cop-rtb-bg: transparent;
	--cop-rtb-surface: #ffffff;
	--cop-rtb-text: #1f1a17;
	--cop-rtb-muted: #6b625a;
	--cop-rtb-border: #e7e0d6;
	--cop-rtb-soft: rgba(138, 28, 43, .08);
	--cop-rtb-select: #f6e3a8;
	--cop-rtb-toast-bg: #1f1a17;
	--cop-rtb-toast-text: #ffffff;
	/* Fonts */
	--cop-rtb-font-display: 'Fraunces', Georgia, serif;
	--cop-rtb-font-scripture: 'Source Serif 4', Georgia, serif;
	--cop-rtb-font-ui: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
	/* Sizes */
	--cop-rtb-size-ui: 15px;
	--cop-rtb-size-title: clamp(32px, 4.2vw, 52px);
	--cop-rtb-size-heading: 23px;
	--cop-rtb-size-scripture: 20px;
	--cop-rtb-size-votd: clamp(22px, 2.4vw, 28px);
	--cop-rtb-line-scripture: 1.8;
	--cop-rtb-radius: 18px;
	--cop-rtb-radius-sm: 10px;
	--cop-rtb-font-scale: 1;

	position: relative;
	box-sizing: border-box;
	color: var(--cop-rtb-text);
	background: var(--cop-rtb-bg);
	font-family: var(--cop-rtb-font-ui);
	font-size: var(--cop-rtb-size-ui);
	line-height: 1.5;
}
@supports (background: color-mix(in srgb, red 10%, transparent)) {
	/* Soft tint follows the accent colour unless one is set explicitly. */
	.cop-rtb { --cop-rtb-soft: color-mix(in srgb, var(--cop-rtb-accent) 8%, transparent); }
}
.cop-rtb *, .cop-rtb *::before, .cop-rtb *::after { box-sizing: border-box; }
.cop-rtb .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.cop-rtb svg.cop-rtb-icon { flex: none; }
@media (max-width: 600px) {
	.cop-rtb { --cop-rtb-size-scripture: 18px; }
}

/* Anything the markup hides stays hidden, whatever display a rule gives it (e.g. the voice picker). */
.cop-rtb [hidden] { display: none !important; }

/* ---------- Buttons, selects, share menu ---------- */
.cop-rtb .cop-rtb-btn, .cop-rtb .cop-rtb-switch-select {
	display: inline-flex; align-items: center; gap: 8px; font-family: var(--cop-rtb-font-ui); font-size: 14px; font-weight: 600; line-height: 1;
	padding: 0 14px; min-height: 44px; border: 1px solid var(--cop-rtb-border); border-radius: var(--cop-rtb-radius-sm);
	background: var(--cop-rtb-surface); color: var(--cop-rtb-text); cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.cop-rtb .cop-rtb-btn:hover, .cop-rtb .cop-rtb-btn:focus-visible, .cop-rtb .cop-rtb-btn[aria-expanded="true"] { background: var(--cop-rtb-soft); border-color: var(--cop-rtb-accent); color: var(--cop-rtb-accent); }
.cop-rtb .cop-rtb-btn:focus-visible, .cop-rtb a:focus-visible, .cop-rtb select:focus-visible, .cop-rtb input:focus-visible { outline: 2px solid var(--cop-rtb-accent); outline-offset: 2px; }
.cop-rtb .cop-rtb-btn.is-primary { background: var(--cop-rtb-accent); border-color: var(--cop-rtb-accent); color: var(--cop-rtb-accent-contrast); }
.cop-rtb .cop-rtb-btn.is-primary:hover, .cop-rtb .cop-rtb-btn.is-primary:focus-visible { background: var(--cop-rtb-accent); color: var(--cop-rtb-accent-contrast); opacity: .9; }
.cop-rtb-switch { display: inline-flex; align-items: center; gap: 8px; color: var(--cop-rtb-muted); font-size: 14px; }
.cop-rtb-share { position: relative; }
.cop-rtb-share-menu { position: absolute; right: 0; max-width: calc(100vw - 32px); top: calc(100% + 6px); z-index: 20; min-width: 200px; background: var(--cop-rtb-menu-bg, var(--cop-rtb-surface)); color: var(--cop-rtb-menu-text, var(--cop-rtb-text)); border: 1px solid var(--cop-rtb-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(31, 26, 23, .14); padding: 6px; display: flex; flex-direction: column; }
.cop-rtb-share-menu[hidden] { display: none; }
.cop-rtb .cop-rtb-share-menu a, .cop-rtb .cop-rtb-share-menu button { display: block; text-align: left; font-family: var(--cop-rtb-font-ui); font-size: 15px; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; background: none; border: 0; cursor: pointer; }
.cop-rtb .cop-rtb-share-menu a:hover, .cop-rtb .cop-rtb-share-menu button:hover { background: var(--cop-rtb-soft); }

/* ---------- Toast ---------- */
.cop-rtb-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--cop-rtb-toast-bg); color: var(--cop-rtb-toast-text); padding: 12px 18px; border-radius: var(--cop-rtb-radius-sm); font-family: var(--cop-rtb-font-ui); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 99999; max-width: calc(100vw - 32px); }
.cop-rtb-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Read aloud ---------- */
.cop-rtb-tts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cop-rtb-tts[hidden] { display: none; }
.cop-rtb .cop-rtb-tts-play.is-playing { background: var(--cop-rtb-accent); border-color: var(--cop-rtb-accent); color: var(--cop-rtb-accent-contrast); }
.cop-rtb-tts-icon-play { display: inline-flex; }
.cop-rtb-tts-icon-pause { display: none; }
.cop-rtb .cop-rtb-tts-play.is-playing .cop-rtb-tts-icon-pause { display: inline-flex; }
.cop-rtb .cop-rtb-tts-play.is-playing .cop-rtb-tts-icon-play { display: none; }
.cop-rtb .cop-rtb-tts-stop { padding: 0 12px; }
.cop-rtb .cop-rtb-tts-stop[hidden] { display: none; }
.cop-rtb-tts-note { display: none; font-size: 12px; color: var(--cop-rtb-muted); }
.cop-rtb-tts--nomatch .cop-rtb-tts-note { display: inline; }
.cop-rtb-tts--compact { gap: 6px; }
@media (max-width: 600px) {
	.cop-rtb-tts { width: 100%; }
	.cop-rtb-tts .cop-rtb-tts-field { flex: 1 1 40%; }
	.cop-rtb-tts .cop-rtb-switch-select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.cop-rtb-toast { transition: none; }
}

/* ---------- Module page templates (events, directorate…): the content area ---------- */
.cop-ev-main, .cop-suite-main { box-sizing: border-box; width: 100%; max-width: none; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 32px clamp(40px, 6vw, 72px); }
@media (max-width: 767px) { .cop-ev-main, .cop-suite-main { padding-left: 16px; padding-right: 16px; } }

/* ---------- Elementor editor: hint shown in place of an empty widget ---------- */
.cop-suite-editor-empty { padding: 18px 20px; border: 1px dashed #c3c4c7; border-radius: 8px; background: #f6f7f7; color: #50575e; font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; text-align: center; }
