.asp-player-shell {
	--asp-player-accent: #ff4d00;
	--asp-player-surface: #303033;
	--asp-player-track: #858589;
	--asp-player-loaded: #a6a6aa;
	--asp-player-text: #f5f5f7;

	width: 100%;
	min-width: 0;
	margin-bottom: 18px;
}

.asp-visualizer {
	width: 100%;
	overflow: hidden;
	border-radius: 14px 14px 0 0;
	line-height: 0;
	margin-bottom: -1px;
}

.asp-visualizer canvas {
	width: 100%;
	height: 100%;
	display: block;
}

/* Clickable idle/loading state centered over the desktop visualizer. */
.asp-visualizer-status {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 11px;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 16px 54px;
	appearance: none;
	background: radial-gradient(circle at center, rgba(255, 255, 255, 0.035), transparent 48%);
	border: 0;
	border-radius: inherit;
	box-sizing: border-box;
	color: rgba(255, 255, 255, 0.82);
	cursor: pointer;
	font: 600 12px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
}

.asp-visualizer-status:hover {
	background-color: rgba(255, 255, 255, 0.025);
	color: #fff;
}

.asp-visualizer-status:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.9);
	outline-offset: -6px;
}

.asp-visualizer-status.is-loading {
	cursor: wait;
}

.asp-visualizer-status.is-playing {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.asp-visualizer-status__play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding-left: 2px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	box-sizing: border-box;
	color: #fff;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.asp-visualizer-status:hover .asp-visualizer-status__play {
	border-color: #fff;
	transform: scale(1.05);
}

.asp-visualizer-status__spinner {
	display: none;
	width: 30px;
	height: 30px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-top-color: #fff;
	border-radius: 50%;
	box-sizing: border-box;
	animation: asp-status-spin 0.8s linear infinite;
}

.asp-visualizer-status.is-loading .asp-visualizer-status__play {
	display: none;
}

.asp-visualizer-status.is-loading .asp-visualizer-status__spinner {
	display: inline-block;
}

.asp-visualizer-status.is-error .asp-visualizer-status__play {
	border-color: rgba(255, 255, 255, 0.75);
}

@keyframes asp-status-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.asp-visualizer-status,
	.asp-visualizer-status__play {
		transition: none;
	}

	.asp-visualizer-status__spinner {
		animation: none;
	}
}

/* The uninitialized player remains a self-contained rounded control. */
.asp-player-shell > .mejs-container,
.asp-player-shell > audio.wp-audio-shortcode {
	margin-top: 0;
}

.asp-player-shell > .wp-block-audio {
	width: 100%;
	margin: 0 !important;
}

.asp-player-shell > .wp-block-audio .mejs-container {
	margin: 0;
}

/*
 * MediaElement skin. Only presentation changes here; MediaElement retains
 * its own controls, state, events, keyboard behavior and ARIA attributes.
 */
.asp-player-shell .mejs-container {
	width: 100% !important;
	max-width: none;
	min-width: 0 !important;
	height: 56px !important;
	background: linear-gradient(180deg, #343437 0%, var(--asp-player-surface) 100%);
	border: 1px solid rgba(255, 255, 255, 0.055);
	border-radius: 14px;
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
	overflow: visible;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.asp-player-shell .mejs-inner,
.asp-player-shell .mejs-mediaelement {
	height: 100%;
	overflow: visible;
}

.asp-player-shell .mejs-controls {
	display: flex;
	align-items: center;
	gap: 0;
	width: 100%;
	height: 56px;
	padding: 0 20px;
	background: transparent;
	box-sizing: border-box;
}

.asp-player-shell .mejs-controls > div {
	float: none;
}

.asp-player-shell .mejs-controls .mejs-button {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	height: 56px;
}

.asp-player-shell .mejs-controls .mejs-button > button {
	margin: 0;
	opacity: 0.92;
	filter: brightness(0) invert(1);
	transform: scale(1.12);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.asp-player-shell .mejs-controls .mejs-button > button:hover {
	opacity: 1;
	transform: scale(1.18);
}

.asp-player-shell .mejs-controls button:focus-visible {
	outline: 2px solid var(--asp-player-accent);
	outline-offset: 4px;
	border-radius: 3px;
}

.asp-player-shell .mejs-controls .mejs-time {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	height: auto;
	padding: 0 8px;
	color: var(--asp-player-text);
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	text-shadow: none;
}

.asp-player-shell .mejs-controls .mejs-time span {
	color: inherit;
	font: inherit;
	line-height: inherit;
}

.asp-player-shell .mejs-controls .mejs-time-rail {
	position: relative;
	flex: 1 1 auto;
	width: auto !important;
	min-width: 48px;
	height: 24px;
	margin: 0 10px;
	padding: 0;
}

.asp-player-shell .mejs-time-rail .mejs-time-total {
	top: 9px;
	width: 100% !important;
	height: 6px;
	margin: 0;
	background: var(--asp-player-track);
	border-radius: 999px;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.asp-player-shell .mejs-time-rail .mejs-time-buffering,
.asp-player-shell .mejs-time-rail .mejs-time-loaded,
.asp-player-shell .mejs-time-rail .mejs-time-current,
.asp-player-shell .mejs-time-rail .mejs-time-hovered {
	height: 6px;
	border-radius: 999px;
}

.asp-player-shell .mejs-time-rail .mejs-time-buffering {
	background: rgba(255, 255, 255, 0.28);
}

.asp-player-shell .mejs-time-rail .mejs-time-loaded {
	background: var(--asp-player-loaded);
}

.asp-player-shell .mejs-time-rail .mejs-time-current {
	background: var(--asp-player-accent);
}

.asp-player-shell .mejs-time-rail .mejs-time-hovered {
	background: rgba(255, 255, 255, 0.32);
}

.asp-player-shell .mejs-time-rail .mejs-time-handle,
.asp-player-shell .mejs-time-rail .mejs-time-handle-content {
	border: 0;
	border-radius: 50%;
}

.asp-player-shell .mejs-time-rail .mejs-time-handle-content {
	top: -4px;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	background: #f4f4f6;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
	transform: scale(0);
	transition: transform 0.15s ease;
}

.asp-player-shell .mejs-time-rail:hover .mejs-time-handle-content,
.asp-player-shell .mejs-time-rail:focus-within .mejs-time-handle-content {
	transform: scale(1);
}

.asp-player-shell .mejs-time-float {
	background: #111116;
	border: 1px solid #45454d;
	border-radius: 4px;
	color: var(--asp-player-text);
}

.asp-player-shell .mejs-time-float-corner {
	border-top-color: #45454d;
}

.asp-player-shell .mejs-controls .mejs-horizontal-volume-slider {
	position: absolute;
	right: 14px;
	bottom: 46px;
	z-index: 4;
	flex: none;
	width: 132px;
	height: 42px;
	margin: 0;
	padding: 0 14px;
	background: #19191e;
	border: 1px solid #3b3b44;
	border-radius: 9px;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(5px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.asp-player-shell .mejs-volume-button:hover + .mejs-horizontal-volume-slider,
.asp-player-shell .mejs-volume-button:focus-within + .mejs-horizontal-volume-slider,
.asp-player-shell .mejs-horizontal-volume-slider:hover,
.asp-player-shell .mejs-horizontal-volume-slider:focus-within {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.asp-player-shell .mejs-horizontal-volume-total {
	top: 17px;
	left: 14px;
	width: 102px;
	height: 6px;
	background: #5b5b63;
	border-radius: 999px;
}

.asp-player-shell .mejs-horizontal-volume-current {
	top: 0;
	left: 0;
	height: 6px;
	background: var(--asp-player-text);
	border-radius: 999px;
}

.asp-player-shell .mejs-horizontal-volume-handle {
	top: -3px;
	width: 12px;
	height: 12px;
	background: var(--asp-player-accent);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* Native-control fallback for sites where WordPress does not use MediaElement. */
.asp-player-shell > audio.wp-audio-shortcode,
.asp-player-shell > .wp-block-audio > audio {
	display: block;
	width: 100%;
	height: 56px;
	background: var(--asp-player-surface);
	border: 1px solid rgba(255, 255, 255, 0.055);
	border-radius: 14px;
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
	color-scheme: dark;
	accent-color: var(--asp-player-accent);
}

/*
 * Once the visualizer exists, canvas, effects and transport become one deck.
 * The panel may be hidden, but the transport always closes the lower edge.
 */
.asp-player-shell.has-asp-visualizer .asp-panel {
	margin-bottom: 0;
	border-radius: 0;
	box-shadow: none;
}

.asp-player-shell.has-asp-visualizer > .mejs-container,
.asp-player-shell.has-asp-visualizer > audio.wp-audio-shortcode,
.asp-player-shell.has-asp-visualizer > .wp-block-audio {
	margin-top: 0 !important;
}

.asp-player-shell.has-asp-visualizer .mejs-container,
.asp-player-shell.has-asp-visualizer > audio.wp-audio-shortcode,
.asp-player-shell.has-asp-visualizer > .wp-block-audio > audio {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 0 0 14px 14px;
}

@media (max-width: 600px) {
	.asp-player-shell .mejs-container,
	.asp-player-shell .mejs-controls,
	.asp-player-shell > audio.wp-audio-shortcode,
	.asp-player-shell > .wp-block-audio > audio {
		height: 54px !important;
	}

	.asp-player-shell .mejs-controls {
		padding: 0 10px;
	}

	.asp-player-shell .mejs-controls .mejs-button {
		height: 54px;
		flex-basis: 36px;
		width: 36px;
	}

	.asp-player-shell .mejs-controls .mejs-time {
		padding: 0 5px;
		font-size: 11px;
	}

	.asp-player-shell .mejs-controls .mejs-time-rail {
		margin: 0 6px;
	}

	.asp-player-shell .mejs-controls .mejs-horizontal-volume-slider {
		display: none;
	}
}
