/**
 * MediaCMS Connector – Frontend Styles
 *
 * Scoped entirely to plugin-specific elements.
 * Does NOT set global html/body/heading styles.
 */

/* ── Video container ─────────────────────────────────────────────────────── */

.mediacms-video-container {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 20px 0;
}

/* Ensure Video.js fills the container completely */
.mediacms-video-container .video-js {
	width: 100%;
	height: 100%;
	display: block;
}

/* ── Error message ───────────────────────────────────────────────────────── */

.mediacms-error {
	background-color: rgba(192, 21, 47, 0.08);
	color: #a01020;
	border: 1px solid rgba(192, 21, 47, 0.25);
	padding: 10px 16px;
	border-radius: 4px;
	margin: 10px 0;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.5;
}

/* ── Loading placeholder ─────────────────────────────────────────────────── */

.mediacms-loading {
	text-align: center;
	padding: 30px 20px;
	color: #666;
	font-size: 14px;
}

/* ── Tap-to-Unmute Button ─────────────────────────────────────────────────── */
/* Shown only when autoplay="yes" is set; displayed via JS after muted play starts. */

.mediacms-unmute-btn {
	position: absolute;
	bottom: 48px; /* above Video.js control bar */
	left: 12px;
	z-index: 100;
	display: none; /* JS sets display:flex once autoplay begins */
	align-items: center;
	gap: 6px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
	transition: background 150ms ease;
	/* Reset any theme button styles */
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.mediacms-unmute-btn:hover,
.mediacms-unmute-btn:focus-visible {
	background: rgba(0, 0, 0, 0.85);
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.mediacms-video-container {
		margin: 12px 0;
	}

	.mediacms-error {
		font-size: 12px;
		padding: 8px 12px;
	}

	.mediacms-loading {
		padding: 20px 12px;
		font-size: 12px;
	}

	.mediacms-unmute-btn {
		font-size: 11px;
		padding: 5px 10px;
		bottom: 44px;
	}
}
