/* Keyboard-only accessibility styles. Nothing here appears for mouse or touch use. */

.nm-a11y-skip-nav {
	position: absolute;
	top: 0;
	left: 0;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
	overflow: visible;
}

.nm-a11y-skip {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 1000000;
	padding: 12px 18px;
	border-radius: 6px;
	background: #3f2496;
	color: #fff !important;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transform: translateY(-200%);
	opacity: 0;
	pointer-events: none;
}

.nm-a11y-skip:focus {
	transform: none;
	opacity: 1;
	pointer-events: auto;
}

.nm-a11y-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

:where(a, button, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
	outline: 2px solid #3f2496 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #fff !important;
}

#main[tabindex="-1"]:focus {
	outline: 0;
}

/* Pause control for looping videos, matched to the existing round sound button. */
.nm-video-pause-host {
	position: relative;
}

.nm-video-pause {
	position: absolute;
	right: clamp(10px, 2.5vw, 15px);
	bottom: clamp(10px, 2.5vw, 15px);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(40px, 10vw, 60px);
	height: clamp(40px, 10vw, 60px);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(99, 51, 207, 0.6);
	color: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background 0.3s ease, transform 0.2s ease;
}

.nm-video-pause--stacked {
	bottom: calc(clamp(10px, 2.5vw, 15px) + clamp(40px, 10vw, 60px) + 8px);
}

.nm-video-pause:hover {
	background: rgba(99, 51, 207, 0.9);
	transform: scale(1.1);
}

/* This video can show white frames, so the button needs a stronger background. */
.nm-video-pause-host .nm-video-pause {
	background: rgba(99, 51, 207, 0.85);
}

.nm-video-pause-host .nm-video-pause:hover {
	background: rgba(99, 51, 207, 0.95);
}

.nm-video-pause svg {
	display: block;
	width: 45%;
	height: 45%;
	fill: currentColor;
}

.nm-video-pause .nm-icon-play,
.nm-video-pause.is-paused .nm-icon-pause {
	display: none;
}

.nm-video-pause.is-paused .nm-icon-play {
	display: block;
}

/* Compact video controls. */
.vbm-video-banner .vbm-mute-button,
.vbm-video-banner .nm-video-pause,
.nm-video-pause-host .nm-video-pause {
	right: 12px;
	bottom: 12px;
	width: 36px;
	height: 36px;
	transition: opacity 0.2s ease, background 0.3s ease, transform 0.2s ease;
}

.vbm-video-banner .nm-video-pause--stacked {
	bottom: 54px;
}

.vbm-video-banner .vbm-mute-button svg,
.nm-video-pause svg {
	width: 50%;
	height: 50%;
}

/* Hover reveal only where a real hover exists. Touch screens keep the controls visible. */
@media (hover: hover) and (pointer: fine) {
	.vbm-video-banner .vbm-mute-button,
	.vbm-video-banner .nm-video-pause,
	.nm-video-pause-host .nm-video-pause {
		opacity: 0;
	}

	.vbm-video-banner:hover .vbm-mute-button,
	.vbm-video-banner:hover .nm-video-pause,
	.nm-video-pause-host:hover .nm-video-pause,
	.vbm-video-banner.is-paused .vbm-mute-button,
	.vbm-video-banner.is-paused .nm-video-pause,
	.nm-video-pause-host .nm-video-pause.is-paused,
	.vbm-video-banner .vbm-mute-button:focus-visible,
	.vbm-video-banner .nm-video-pause:focus-visible,
	.nm-video-pause-host .nm-video-pause:focus-visible {
		opacity: 1;
	}

	/* Watch Live and Sermons sit over the banner, so hovering them counts too. */
	.e-con:has(> .elementor-widget-shortcode .vbm-video-banner):hover .vbm-mute-button,
	.e-con:has(> .elementor-widget-shortcode .vbm-video-banner):hover .nm-video-pause {
		opacity: 1;
	}

	/* Keep both banner controls visible while either has keyboard focus. */
	.vbm-video-banner:has(.vbm-button:focus-visible) .vbm-mute-button,
	.vbm-video-banner:has(.vbm-button:focus-visible) .nm-video-pause,
	.vbm-video-banner:has(.nm-video-pause:focus-visible) .vbm-mute-button {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nm-a11y-skip,
	.nm-video-pause,
	.vbm-video-banner .vbm-mute-button,
	.vbm-video-banner .nm-video-pause,
	.nm-video-pause-host .nm-video-pause {
		transition: none;
	}

	.nm-video-pause:hover,
	.vbm-video-banner .vbm-mute-button:hover {
		transform: none;
	}
}
