.aew-media-player {
	--aew-player-bg: #111318;
	--aew-control-color: #fff;
	--aew-control-hover-color: #fff;
	--aew-button-bg: transparent;
	--aew-button-hover-bg: rgba(255, 255, 255, 0.16);
	--aew-button-size: 38px;
	--aew-button-radius: 50%;
	--aew-icon-size: 20px;
	--aew-accent: #01b4cd;
	--aew-track: rgba(255, 255, 255, 0.28);
	--aew-buffer: rgba(255, 255, 255, 0.42);
	--aew-track-height: 5px;
	--aew-thumb-size: 12px;
	--aew-time-color: #fff;
	--aew-menu-bg: #1d222b;
	--aew-controls-angle: 128deg;
	--aew-controls-start: #05c8bf;
	--aew-controls-end: #08a8d3;
	--aew-big-play-size: 80px;
	--aew-big-play-color: #fff;
	--aew-big-play-bg: rgba(8, 12, 20, 0.55);
	--aew-big-play-border: rgba(255, 255, 255, 0.78);
	--aew-cover-size: 72px;
	position: relative;
	width: 100%;
	max-width: 100%;
	border-radius: 16px;
	background: var(--aew-player-bg);
	overflow: hidden;
	isolation: isolate;
}

.aew-media-player,
.aew-media-player * {
	box-sizing: border-box;
}

.aew-media-shell {
	position: relative;
	min-width: 0;
	width: 100%;
	border-radius: inherit;
	background: var(--aew-player-bg);
	overflow: hidden;
}

.aew-media-player--video .aew-media-shell {
	aspect-ratio: 16 / 9;
}

.aew-media-player--video {
	--aew-controls-start: rgba(4, 7, 13, 0.88);
	--aew-controls-end: rgba(4, 7, 13, 0);
}

.aew-media-player--video .aew-media-element,
.aew-media-player--video .plyr,
.aew-media-player--video .plyr__video-wrapper,
.aew-media-player--video video {
	width: 100%;
	height: 100%;
}

.aew-media-player--video .aew-media-element,
.aew-media-player--video video {
	display: block;
	object-fit: cover;
}

.aew-media-player .plyr {
	--plyr-color-main: var(--aew-accent);
	--plyr-video-background: var(--aew-player-bg);
	--plyr-video-control-color: var(--aew-control-color);
	--plyr-video-control-color-hover: var(--aew-control-hover-color);
	--plyr-video-control-background-hover: var(--aew-button-hover-bg);
	--plyr-audio-control-color: var(--aew-control-color);
	--plyr-audio-control-color-hover: var(--aew-control-hover-color);
	--plyr-audio-control-background-hover: var(--aew-button-hover-bg);
	--plyr-audio-controls-background: transparent;
	--plyr-control-icon-size: var(--aew-icon-size);
	--plyr-range-track-height: var(--aew-track-height);
	--plyr-range-thumb-height: var(--aew-thumb-size);
	--plyr-range-fill-background: var(--aew-accent);
	--plyr-video-progress-buffered-background: var(--aew-buffer);
	--plyr-audio-progress-buffered-background: var(--aew-buffer);
	--plyr-menu-background: var(--aew-menu-bg);
	--plyr-menu-color: var(--aew-control-color);
	--plyr-tooltip-background: var(--aew-menu-bg);
	--plyr-tooltip-color: var(--aew-control-color);
	width: 100%;
	min-width: 0;
	font-family: inherit;
}

.aew-media-player .plyr__poster {
	background-size: cover;
}

.aew-media-player .aew-media-controls {
	direction: ltr;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 12px 14px;
}

.aew-media-player--video .aew-media-controls {
	background-color: transparent !important;
	background-image: linear-gradient(0deg, var(--aew-controls-start) 0%, var(--aew-controls-end) 100%) !important;
}

.aew-media-player .plyr__control,
.aew-media-player button.plyr__control,
.aew-media-player a.plyr__control {
	flex: 0 0 auto;
	min-width: var(--aew-button-size);
	width: var(--aew-button-size);
	height: var(--aew-button-size);
	margin: 0;
	padding: calc((var(--aew-button-size) - var(--aew-icon-size)) / 2) !important;
	border: 0 !important;
	border-radius: var(--aew-button-radius) !important;
	background: var(--aew-button-bg) !important;
	box-shadow: none !important;
	color: var(--aew-control-color) !important;
	line-height: 1 !important;
	text-decoration: none !important;
}

.aew-media-player .plyr__control:hover,
.aew-media-player .plyr__control:focus-visible,
.aew-media-player .plyr__control[aria-expanded="true"],
.aew-media-player .plyr__control.plyr__tab-focus {
	background: var(--aew-button-hover-bg) !important;
	color: var(--aew-control-hover-color) !important;
}

.aew-media-player .plyr__control svg {
	display: block;
	width: var(--aew-icon-size);
	height: var(--aew-icon-size);
	fill: currentColor;
}

.aew-media-player .plyr__control--overlaid,
.aew-media-player button.plyr__control--overlaid {
	top: 50%;
	left: 50%;
	width: var(--aew-big-play-size);
	height: var(--aew-big-play-size);
	min-width: var(--aew-big-play-size);
	padding: calc(var(--aew-big-play-size) * 0.3) !important;
	border: 2px solid var(--aew-big-play-border) !important;
	border-radius: 50% !important;
	background: var(--aew-big-play-bg) !important;
	color: var(--aew-big-play-color) !important;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transform: translate(-50%, -50%);
}

.aew-media-player .plyr__control--overlaid:hover,
.aew-media-player .plyr__control--overlaid:focus-visible {
	background: color-mix(in srgb, var(--aew-big-play-bg), white 14%) !important;
	transform: translate(-50%, -50%) scale(1.06);
}

.aew-media-player .plyr--video .plyr__control--overlaid svg {
	left: 1px;
	width: 100%;
	height: 100%;
}

.aew-media-player .plyr__progress__container {
	flex: 1 1 180px;
	min-width: 72px;
}

.aew-media-player .plyr__progress input[type="range"],
.aew-media-player .plyr__volume input[type="range"] {
	color: var(--aew-accent) !important;
}

/* Isolate Plyr sliders from the theme's generic form-field skin. */
.aew-media-player .plyr input[type="range"] {
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	line-height: normal !important;
}

.aew-media-player .plyr--full-ui input[type="range"]::-webkit-slider-runnable-track {
	background-color: var(--aew-track);
}

.aew-media-player .plyr--full-ui input[type="range"]::-moz-range-track {
	background-color: var(--aew-track);
}

.aew-media-player .plyr__volume {
	flex: 0 1 116px;
	min-width: 76px;
	width: 116px;
}

.aew-media-player .aew-media-time,
.aew-media-player .plyr__time {
	flex: 0 0 auto;
	color: var(--aew-time-color);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.aew-media-player .plyr__menu__container {
	direction: rtl;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	background: var(--aew-menu-bg);
	box-shadow: 0 16px 46px rgba(0, 0, 0, 0.26);
	color: var(--aew-control-color);
}

.aew-media-player .plyr__menu__container .plyr__control {
	width: 100%;
	height: auto;
	min-height: 36px;
	padding: 8px 12px !important;
	border-radius: 8px !important;
	color: inherit !important;
}

.aew-media-player .plyr__menu__container .plyr__control > span {
	display: flex;
	align-items: center;
	gap: 8px;
}

.aew-media-player--audio {
	--aew-controls-start: #05c8bf;
	--aew-controls-end: #08a8d3;
	display: flex;
	align-items: stretch;
	gap: 14px;
	padding: 12px;
	border: 1px solid #e1e7ef;
	background: #fff;
	overflow: visible;
}

.aew-media-player--audio-row {
	flex-direction: row;
}

.aew-media-player--audio-stacked {
	flex-direction: column;
}

.aew-media-player--audio .aew-media-meta {
	display: flex;
	flex: 0 1 270px;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 4px 2px;
}

.aew-media-cover {
	flex: 0 0 var(--aew-cover-size);
	width: var(--aew-cover-size);
	height: var(--aew-cover-size);
	border-radius: 10px;
	object-fit: cover;
	box-shadow: 0 5px 16px rgba(25, 35, 55, 0.12);
}

.aew-media-copy {
	min-width: 0;
	text-align: right;
}

.aew-media-title,
.aew-media-artist {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aew-media-title {
	color: #20242b;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.6;
}

.aew-media-artist {
	margin-top: 2px;
	color: #6b7280;
	font-size: 12px;
	line-height: 1.6;
}

.aew-media-player--audio .aew-media-shell {
	flex: 1 1 480px;
	align-self: center;
	background: transparent;
	overflow: visible;
}

.aew-media-player--audio .plyr {
	border-radius: 14px;
	overflow: visible;
}

.aew-media-player--audio .aew-media-controls {
	min-height: 76px;
	border-radius: 14px;
	background-color: var(--aew-controls-start) !important;
	background-image: linear-gradient(var(--aew-controls-angle), var(--aew-controls-start) 0%, var(--aew-controls-end) 100%) !important;
	box-shadow: 0 9px 24px rgba(4, 171, 198, 0.18);
}

.aew-media-player--audio-stacked .aew-media-meta {
	flex-basis: auto;
	width: 100%;
}

.aew-media-player--audio-stacked .aew-media-shell {
	flex-basis: auto;
}

.aew-media-element {
	display: block;
	width: 100%;
	max-width: 100%;
}

.aew-media-player:not(.is-enhanced) .aew-media-element {
	min-height: 54px;
}

.aew-media-empty {
	padding: 24px;
	border: 1px dashed #aeb5c0;
	border-radius: 12px;
	background: #f7f8fa;
	color: #596170;
	font-size: 14px;
	text-align: center;
}

@media (max-width: 900px) {
	.aew-media-player--audio-row {
		flex-direction: column;
	}

	.aew-media-player--audio .aew-media-meta {
		flex-basis: auto;
		width: 100%;
	}

	.aew-media-player--audio .aew-media-shell {
		flex-basis: auto;
	}
}

@media (max-width: 767px) {
	.aew-media-player {
		--aew-button-size: 34px;
		--aew-icon-size: 17px;
		--aew-big-play-size: 64px;
	}

	.aew-media-player .aew-media-controls {
		flex-wrap: wrap;
		gap: 4px;
		padding: 10px;
	}

	.aew-media-player .plyr__progress__container {
		order: -2;
		flex: 1 0 100%;
		width: 100%;
		min-width: 100%;
		margin: 0 0 3px;
	}

	.aew-media-player .plyr__volume {
		flex-basis: 82px;
		width: 82px;
		min-width: 58px;
	}

	.aew-media-player--audio {
		gap: 10px;
		padding: 10px;
	}

	.aew-media-player--audio .aew-media-controls {
		min-height: 88px;
	}
}

@media (max-width: 479px) {
	.aew-media-player {
		--aew-button-size: 32px;
		--aew-icon-size: 16px;
		--aew-cover-size: 58px;
	}

	.aew-media-player .aew-media-controls {
		justify-content: flex-start;
		padding: 9px 8px;
	}

	.aew-media-player .plyr__volume {
		flex: 1 1 76px;
		max-width: 96px;
	}

	.aew-media-title {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aew-media-player *,
	.aew-media-player *::before,
	.aew-media-player *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
