/* MM Blog Play Badge — Frontend Styles
 * All colours fall back to CSS custom properties set by the theme.
 * Override via --mmbpb-color and --mmbpb-font-size on the badge element.
 */

.mmbpb-badge {
	--mmbpb-color: currentColor;
	--mmbpb-font-size: inherit;

	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 10px;
	border: 1.5px solid var(--mmbpb-color);
	border-radius: 999px;
	background: transparent;
	color: var(--mmbpb-color);
	font-family: inherit;                 /* inherits theme font-family */
	font-size: var(--mmbpb-font-size);
	line-height: 1.2;
	cursor: default;
	margin-bottom: 1.4em;
	vertical-align: middle;
	box-sizing: border-box;

	/* Smooth state transitions */
	transition: opacity .2s ease, box-shadow .2s ease;
}

/* Buttons */
.mmbpb-btn {
	background: none;
	border: none;
	padding: 2px;
	margin: 0;
	cursor: pointer;
	color: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	flex-shrink: 0;
	transition: background .15s ease, outline .1s;
}
.mmbpb-btn:hover:not([disabled]) {
	background: rgba(128,128,128,.12);
}
.mmbpb-btn:focus-visible {
	outline: 2px solid var(--mmbpb-color);
	outline-offset: 2px;
}
.mmbpb-btn[disabled] {
	opacity: .4;
	cursor: not-allowed;
}

/* Icons */
.mmbpb-icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
	display: block;
}

/* Label */
.mmbpb-label {
	font-size: var(--mmbpb-font-size);
	font-weight: 500;
	white-space: nowrap;
	user-select: none;
}

/* Playing state */
.mmbpb-badge[data-state="playing"] {
	box-shadow: 0 0 0 3px rgba(var(--mmbpb-color-rgb, 0,0,0), .12);
}
.mmbpb-badge[data-state="playing"] .mmbpb-icon-play  { display: none; }
.mmbpb-badge[data-state="playing"] .mmbpb-icon-pause { display: block !important; }

/* Paused state */
.mmbpb-badge[data-state="paused"] .mmbpb-icon-play  { display: block; }
.mmbpb-badge[data-state="paused"] .mmbpb-icon-pause { display: none !important; }

/* Idle / stopped (default) */
.mmbpb-badge[data-state="idle"] .mmbpb-icon-play  { display: block; }
.mmbpb-badge[data-state="idle"] .mmbpb-icon-pause { display: none !important; }

/* Screen-reader only helper */
.mmbpb-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Error state */
.mmbpb-badge--error {
	border-color: #c00;
	color: #c00;
}

/* ── Elementor wrapper ────────────────────────────────────────────── */
.mmbpb-elementor-wrap {
	display: flex;
	align-items: center;
}

/* Anteprima nell'editor Elementor: disabilitata ma visibile */
.mmbpb-badge--editor-preview {
	pointer-events: none;
	opacity: .85;
	cursor: default;
}
