/**
 * AS3SD HTML renderer — wrapper + custom overlays for Video.js v10 (@videojs/html).
 * Default skin styles ship inside the bundled video.js shadow DOM.
 *
 * Theme accent: --as3sd-primary-color (PHP inline on .as3sd-player-wrap).
 */

.as3sd-player-wrap.as3sd-html-v10 {
	position: relative;
	max-width: 100%;
	background: transparent;
	border-radius: var( --as3sd-player-border-radius, 16px );
	overflow: hidden;
	box-shadow: 0 16px 48px rgba( 0, 0, 0, 0.35 );
	border: 1px solid rgba( 255, 255, 255, 0.08 );
}

/*
 * Without Settings → player height, % heights on video-player/video-skin chain collapse and
 * following content (e.g. Elementor comment form) can overlap players. Reserve 16:9 from width.
 */
.as3sd-player-wrap.as3sd-html-v10:not(.as3sd-player-max-height) {
	width: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	aspect-ratio: var( --as3sd-player-aspect-ratio, 16 / 9 );
	min-height: 12.5rem;
}

.as3sd-player-wrap.as3sd-html-v10:not(.as3sd-player-max-height) > video-player {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	display: block !important;
}

/* Narrow + no settings height: same Elementor / cyclic % issue as max-height. */
@media (max-width: 782px) {
	.as3sd-player-wrap.as3sd-html-v10:not(.as3sd-player-max-height) {
		aspect-ratio: unset;
		min-height: 0;
		height: auto;
	}

	.as3sd-player-wrap.as3sd-html-v10:not(.as3sd-player-max-height) > video-player {
		height: auto;
		flex: 0 0 auto;
		aspect-ratio: var( --as3sd-player-aspect-ratio, 16 / 9 );
		min-height: 0;
		width: 100%;
	}

	.as3sd-player-wrap.as3sd-html-v10:not(.as3sd-player-max-height) video-skin.as3sd-v10-html-player {
		height: auto;
		min-height: 0;
	}
}

/*
 * Settings height is a max-height cap only — aspect ratio always drives proportions from width.
 * When the cap binds, width shrinks so the ratio is preserved (never a forced square/tall box).
 */
.as3sd-player-wrap.as3sd-player-max-height {
	width: min(
		100%,
		calc(
			min( var( --as3sd-player-max-height ), 90vh, 90dvh ) * var( --as3sd-aspect-w, 16 ) / var( --as3sd-aspect-h, 9 )
		)
	);
	max-width: 100%;
	box-sizing: border-box;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-height: 0;
	height: auto;
	margin-inline: auto;
	aspect-ratio: var( --as3sd-player-aspect-ratio, 16 / 9 );
	max-height: min( var( --as3sd-player-max-height ), 90vh, 90dvh );
}

.as3sd-player-wrap.as3sd-html-v10.as3sd-player-max-height > video-player {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	height: 100%;
}

.as3sd-player-wrap.as3sd-player-max-height.as3sd-html-v10 video-skin.as3sd-v10-html-player {
	min-height: 0;
	height: 100%;
}

.as3sd-html-v10 video-player {
	display: block;
	border-radius: inherit;
	overflow: hidden;
	height: 100%;
}

.as3sd-player-wrap.as3sd-html-v10 video-skin.as3sd-v10-html-player {
	width: 100%;
	display: block;
	min-height: 120px;
	border-radius: inherit;
	--media-border-radius: var( --as3sd-player-border-radius, 16px );
	height: 100%;
}

/* Outside controls: video area keeps aspect ratio; bar sits below without overlapping. */
.as3sd-player-wrap.as3sd-controls-outside.as3sd-html-v10 {
	overflow: visible;
}

.as3sd-player-wrap.as3sd-controls-outside.as3sd-html-v10:not(.as3sd-player-max-height) {
	aspect-ratio: unset;
	min-height: 0;
	height: auto;
}

.as3sd-player-wrap.as3sd-controls-outside.as3sd-html-v10:not(.as3sd-player-max-height) > video-player {
	flex: 0 0 auto;
	height: auto;
	min-height: 0;
	overflow: visible;
}

.as3sd-player-wrap.as3sd-controls-outside.as3sd-html-v10:not(.as3sd-player-max-height) video-skin.as3sd-v10-html-player {
	display: flex;
	flex-direction: column;
	height: auto;
	min-height: 0;
	overflow: visible;
}

.as3sd-player-wrap.as3sd-controls-outside.as3sd-html-v10 .as3sd-video-title-overlay {
	bottom: auto;
	top: 0;
}

.as3sd-player-wrap.as3sd-controls-outside.as3sd-player-max-height {
	aspect-ratio: unset;
	max-height: none;
	height: auto;
	width: 100%;
}

.as3sd-player-wrap.as3sd-controls-outside.as3sd-player-max-height > video-player {
	height: auto;
	flex: 0 0 auto;
	overflow: visible;
	min-height: 0;
}

.as3sd-player-wrap.as3sd-controls-outside.as3sd-player-max-height video-skin.as3sd-v10-html-player {
	display: flex;
	flex-direction: column;
	height: auto;
	max-height: none;
	min-height: 0;
	overflow: visible;
}

/* Fullscreen + outside (HTML): fullscreen target is media-container inside video-skin shadow (see as3sd-player.js). */
.as3sd-player-wrap.as3sd-controls-outside video-skin.as3sd-v10-html-player:is(:fullscreen, :-webkit-full-screen) {
	width: 100%;
	height: 100%;
	max-height: none;
}

.as3sd-player-wrap.as3sd-controls-outside.as3sd-player-max-height video-skin.as3sd-v10-html-player:is(:fullscreen, :-webkit-full-screen) {
	height: 100%;
	max-height: none;
}

@media (max-width: 782px) {
	.as3sd-player-wrap.as3sd-controls-outside.as3sd-html-v10:not(.as3sd-player-max-height) > video-player {
		aspect-ratio: unset;
	}
}

/* Progress / slider accent (--media-color-primary). Toolbar icons are overridden inside the shadow root via as3sd-player.js using --as3sd-control-icon-*. */
.as3sd-html-v10 video-skin.media-default-skin--video.as3sd-v10-html-player {
	--media-color-primary: var( --as3sd-primary-color, oklch( 100% 0 0 ) );
}

/* Skin option hints (v10 tokens) */
.as3sd-html-v10 .as3sd-skin-dark.media-default-skin--video {
	--media-surface-background-color: oklch( 0% 0 0 / 0.72 );
}

.as3sd-html-v10 .as3sd-skin-minimal.media-default-skin--video {
	--media-surface-background-color: oklch( 100% 0 0 / 0.06 );
}

.as3sd-player-wrap.as3sd-html-v10 .as3sd-speed-menu {
	position: absolute;
	left: 0;
	bottom: 5rem;
	right: auto;
	top: auto;
	background: rgba( 18, 20, 28, 0.94 ) !important;
	backdrop-filter: blur( 16px ) saturate( 1.4 );
	-webkit-backdrop-filter: blur( 16px ) saturate( 1.4 );
	color: #fff !important;
	padding: 8px;
	border-radius: 12px;
	border: 1px solid rgba( 255, 255, 255, 0.12 ) !important;
	box-shadow: 0 10px 28px rgba( 0, 0, 0, 0.35 );
	display: none;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 6px;
	min-width: 5.75rem;
	max-width: min( 9rem, calc( 100% - 20px ) );
	max-height: min( 50vh, 16rem );
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	z-index: 26;
}

/* Allow the speed popover to extend past the rounded player frame while open.
 * Keep z-index modest so stacked players / Elementor widgets below are not trapped underneath
 * an elevated stacking context (z-index: 100 caused sibling players/forms to hide visually). */
.as3sd-player-wrap.as3sd-html-v10.as3sd-speed-menu-open {
	overflow: visible;
	z-index: 12;
}

.as3sd-player-wrap.as3sd-html-v10 .as3sd-speed-menu.is-open {
	display: flex;
}

/* HLS manual quality menu (same shell as speed) */
.as3sd-player-wrap.as3sd-html-v10.as3sd-quality-menu-open {
	overflow: visible;
	z-index: 12;
}

.as3sd-player-wrap.as3sd-html-v10 .as3sd-quality-menu {
	position: absolute;
	left: 0;
	bottom: 5rem;
	right: auto;
	top: auto;
	background: rgba( 18, 20, 28, 0.94 ) !important;
	backdrop-filter: blur( 16px ) saturate( 1.4 );
	-webkit-backdrop-filter: blur( 16px ) saturate( 1.4 );
	color: #fff !important;
	padding: 8px;
	border-radius: 12px;
	border: 1px solid rgba( 255, 255, 255, 0.12 ) !important;
	box-shadow: 0 10px 28px rgba( 0, 0, 0, 0.35 );
	display: none;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 6px;
	min-width: 5.75rem;
	max-width: min( 11rem, calc( 100% - 20px ) );
	max-height: min( 50vh, 18rem );
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	z-index: 26;
}

.as3sd-player-wrap.as3sd-html-v10 .as3sd-quality-menu.is-open {
	display: flex;
}

.as3sd-player-wrap.as3sd-html-v10 button.as3sd-speed-pill {
	-webkit-appearance: none !important;
	appearance: none !important;
	margin: 0 !important;
	background-color: transparent !important;
	background-image: none !important;
	color: rgba( 255, 255, 255, 0.95 ) !important;
	border: 1px solid rgba( 255, 255, 255, 0.16 ) !important;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 12px !important;
	line-height: 1.25 !important;
	font-weight: 500 !important;
	cursor: pointer;
	transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	font-variant-numeric: tabular-nums;
	text-decoration: none !important;
	text-shadow: none !important;
	box-shadow: none !important;
}

.as3sd-player-wrap.as3sd-html-v10 button.as3sd-speed-pill:hover,
.as3sd-player-wrap.as3sd-html-v10 button.as3sd-speed-pill:focus {
	background-color: rgba( 255, 255, 255, 0.12 ) !important;
	color: #fff !important;
	border-color: rgba( 255, 255, 255, 0.28 ) !important;
	outline: none !important;
}

.as3sd-player-wrap.as3sd-html-v10 button.as3sd-speed-pill:focus-visible {
	outline: 2px solid rgba( 255, 255, 255, 0.65 ) !important;
	outline-offset: 2px;
}

.as3sd-player-wrap.as3sd-html-v10 button.as3sd-speed-pill:active {
	background-color: rgba( 255, 255, 255, 0.18 ) !important;
	color: #fff !important;
}

.as3sd-player-wrap.as3sd-html-v10 button.as3sd-speed-pill.is-active {
	background-color: rgba( 255, 255, 255, 0.22 ) !important;
	color: #fff !important;
	border-color: rgba( 255, 255, 255, 0.38 ) !important;
	font-weight: 600 !important;
}

.as3sd-player-wrap.as3sd-html-v10 .as3sd-quality-menu button.as3sd-quality-pill.is-playing {
	position: relative;
	padding-right: 1.35rem !important;
}

.as3sd-player-wrap.as3sd-html-v10 .as3sd-quality-menu button.as3sd-quality-pill.is-playing::after {
	content: '\2713';
	position: absolute;
	right: 0.35rem;
	top: 50%;
	transform: translateY( -50% );
	font-size: 0.62rem;
	font-weight: 700;
	opacity: 0.9;
	line-height: 1;
}

.as3sd-speed-overlay {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba( 0, 0, 0, 0.65 );
	backdrop-filter: blur( 8px );
	color: #fff;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 13px;
	letter-spacing: 0.02em;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
	z-index: 24;
}

.as3sd-speed-overlay.is-visible {
	opacity: 1;
}

.as3sd-loop-overlay {
	position: absolute;
	top: 0;
	bottom: 0;
	background: rgba( 255, 196, 0, 0.28 );
	border-left: 2px solid #ffc400;
	border-right: 2px solid #ffc400;
	border-radius: 4px;
	pointer-events: none;
	box-sizing: border-box;
}

.as3sd-chapter-marker {
	position: absolute;
	top: 50%;
	width: 3px;
	height: 12px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 2px;
	background: rgba( 255, 255, 255, 0.92 );
	box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.35 );
	transform: translate( -50%, -50% );
	cursor: pointer;
	z-index: 2;
}

.as3sd-chapter-marker:hover,
.as3sd-chapter-marker:focus-visible {
	background: var( --as3sd-primary-color, #2271b1 );
	outline: none;
}

.as3sd-chapter-track-tooltip {
	position: absolute;
	bottom: calc( 100% + 10px );
	left: 50%;
	transform: translateX( -50% );
	z-index: 6;
	max-width: min( 16rem, 80vw );
	padding: 4px 10px;
	border-radius: 6px;
	background: oklch( 0% 0 0 / 0.82 );
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease, visibility 0.12s ease;
	box-sizing: border-box;
}

.as3sd-chapter-track-tooltip.is-visible {
	opacity: 1;
	visibility: visible;
}

.as3sd-chapters-menu {
	position: absolute;
	z-index: 10050;
	display: none;
	flex-direction: column;
	min-width: 220px;
	max-width: min( 320px, calc( 100vw - 24px ) );
	max-height: min( 280px, 50vh );
	overflow: auto;
	padding: 6px 0;
	background: oklch( 0% 0 0 / 0.88 );
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	border-radius: 10px;
	box-shadow: 0 8px 28px rgba( 0, 0, 0, 0.35 );
	backdrop-filter: blur( 14px );
	-webkit-backdrop-filter: blur( 14px );
}

.as3sd-chapters-menu.is-open {
	display: flex;
}

.as3sd-chapters-menu-item {
	display: flex;
	align-items: baseline;
	gap: 10px;
	width: 100%;
	padding: 8px 14px;
	border: none;
	background: transparent;
	color: #fff;
	text-align: left;
	cursor: pointer;
	font: inherit;
}

.as3sd-chapters-menu-item:hover,
.as3sd-chapters-menu-item:focus-visible {
	background: rgba( 255, 255, 255, 0.08 );
	outline: none;
}

.as3sd-chapters-menu-item.is-active {
	background: rgba( 255, 255, 255, 0.12 );
	font-weight: 600;
}

.as3sd-chapters-menu-item__time {
	flex-shrink: 0;
	font-size: 0.75rem;
	opacity: 0.75;
	font-variant-numeric: tabular-nums;
}

.as3sd-chapters-menu-item__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.as3sd-chapters-button svg {
	display: block;
}

/* Unified settings (gear) menu — nests speed, quality, chapters, PiP */
.as3sd-player-wrap.as3sd-html-v10 .as3sd-settings-menu {
	position: absolute;
	left: 0;
	bottom: 5rem;
	right: auto;
	top: auto;
	background: rgba( 18, 20, 28, 0.94 ) !important;
	backdrop-filter: blur( 16px ) saturate( 1.4 );
	-webkit-backdrop-filter: blur( 16px ) saturate( 1.4 );
	color: #fff !important;
	padding: 0;
	border-radius: 12px;
	border: 1px solid rgba( 255, 255, 255, 0.12 ) !important;
	box-shadow: 0 10px 28px rgba( 0, 0, 0, 0.35 );
	display: none;
	flex-direction: column;
	min-width: 14rem;
	max-width: min( 18rem, calc( 100% - 20px ) );
	max-height: min( 50vh, 20rem );
	overflow: hidden;
	z-index: 28;
	box-sizing: border-box;
}

.as3sd-player-wrap.as3sd-html-v10.as3sd-settings-menu-open {
	overflow: visible;
	z-index: 12;
}

.as3sd-player-wrap.as3sd-html-v10 .as3sd-settings-menu.is-open {
	display: flex;
}

.as3sd-settings-view {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1 1 auto;
	overflow: hidden;
}

.as3sd-settings-view[hidden] {
	display: none !important;
}

.as3sd-settings-row[hidden] {
	display: none !important;
}

.as3sd-settings-back {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: none;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.1 );
	background: transparent;
	color: rgba( 255, 255, 255, 0.92 );
	font-size: 0.8125rem;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.as3sd-settings-back::before {
	content: "\2039";
	font-size: 1.1rem;
	line-height: 1;
	opacity: 0.85;
}

.as3sd-settings-back:hover,
.as3sd-settings-back:focus-visible {
	background: rgba( 255, 255, 255, 0.08 );
	outline: none;
}

.as3sd-settings-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: none;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.06 );
	background: transparent;
	color: rgba( 255, 255, 255, 0.95 );
	font-size: 0.8125rem;
	text-align: left;
	cursor: pointer;
}

.as3sd-settings-row:last-child {
	border-bottom: none;
}

.as3sd-settings-row:hover,
.as3sd-settings-row:focus-visible {
	background: rgba( 255, 255, 255, 0.08 );
	outline: none;
}

.as3sd-settings-row__label {
	min-width: 0;
	font-weight: 500;
}

.as3sd-settings-row__value {
	font-size: 0.75rem;
	opacity: 0.72;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	max-width: 7rem;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: right;
}

.as3sd-settings-row__chevron {
	opacity: 0.65;
	font-size: 1rem;
	line-height: 1;
}

.as3sd-settings-row--action {
	grid-template-columns: 1fr;
}

.as3sd-settings-row.is-disabled {
	opacity: 0.42;
	cursor: not-allowed;
}

.as3sd-settings-row.is-disabled:hover,
.as3sd-settings-row.is-disabled:focus-visible {
	background: transparent;
}

.as3sd-settings-subview-body {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1 1 auto;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 4px 0;
	gap: 0;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.as3sd-settings-options {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.as3sd-settings-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	margin: 0;
	padding: 10px 14px;
	border: none;
	border-radius: 0;
	background: transparent;
	color: rgba( 255, 255, 255, 0.95 );
	font-size: 0.8125rem;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}

.as3sd-settings-option:hover,
.as3sd-settings-option:focus-visible {
	background: rgba( 255, 255, 255, 0.1 );
	outline: none;
}

.as3sd-settings-option.is-active {
	background: rgba( 255, 255, 255, 0.14 );
	font-weight: 600;
}

.as3sd-settings-option__main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
	min-width: 0;
	flex: 1 1 auto;
}

.as3sd-settings-option__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.as3sd-settings-option__sublabel {
	font-size: 0.72rem;
	opacity: 0.68;
	font-variant-numeric: tabular-nums;
}

.as3sd-settings-option__check {
	flex: 0 0 auto;
	opacity: 0;
	font-size: 0.9rem;
	line-height: 1;
}

.as3sd-settings-option.is-active .as3sd-settings-option__check {
	opacity: 1;
}

.as3sd-settings-menu .as3sd-settings-options,
.as3sd-settings-menu .as3sd-speed-menu--embedded,
.as3sd-settings-menu .as3sd-quality-menu--embedded,
.as3sd-settings-menu .as3sd-chapters-menu--embedded {
	position: static !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	bottom: auto !important;
	display: flex !important;
	flex-direction: column;
	min-width: 0;
	max-width: none;
	max-height: none;
	padding: 0;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	z-index: auto;
}

.as3sd-settings-button svg {
	display: block;
}

/*
 * Elementor (frontend.css, ≤767px): .e-con.e-flex sets --flex-wrap: var(--flex-wrap-mobile); .e-con defaults
 * --flex-wrap-mobile: wrap. .e-con-inner then uses flex-wrap: var(--flex-wrap) in a column flex context.
 * That interacts badly with .e-con .elementor-widget-container { height: 100% }, collapsing custom
 * video-player layout (~6px / overlap). Neutralize wrap only for containers that include AS3SD players
 * (same effect as commenting out Elementor’s --flex-wrap assignment — without editing Elementor core).
 */
@media (max-width: 767px) {
	.e-con.e-flex:has( .elementor-widget-as3sd_stream_players ),
	.e-con.e-flex:has( .as3sd-players-grid ),
	.e-con.e-flex:has( .as3sd-player-wrap.as3sd-html-v10 ),
	.e-con.e-flex:has( .as3sd-react-player-root ) {
		--flex-wrap: nowrap !important;
	}
}

/* Poster fallback grid (access denied / posters only) */
.as3sd-player-poster-cell {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-width: 0;
}

.as3sd-player-poster-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.as3sd-player-poster-link:hover,
.as3sd-player-poster-link:focus {
	text-decoration: none;
	opacity: 0.92;
}

.as3sd-player-poster-wrap {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	aspect-ratio: var( --as3sd-player-aspect-ratio, 16 / 9 );
	border-radius: var( --as3sd-player-border-radius, 16px );
	overflow: hidden;
	background: #0a0a0a;
	box-shadow: 0 16px 48px rgba( 0, 0, 0, 0.35 );
	border: 1px solid rgba( 255, 255, 255, 0.08 );
}

.as3sd-player-poster-wrap img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.as3sd-player-poster-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 8rem;
	color: rgba( 255, 255, 255, 0.7 );
	font-size: 0.95rem;
}

.as3sd-player-poster-play {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.as3sd-player-poster-play__circle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: var( --as3sd-poster-play-size, 4.5rem );
	height: var( --as3sd-poster-play-size, 4.5rem );
	border-radius: var( --as3sd-poster-play-radius, 50% );
	box-shadow: var( --as3sd-poster-play-shadow, 0 4px 28px rgba( 0, 0, 0, 0.45 ) );
	transition: transform 0.2s ease;
}

.as3sd-player-poster-play__circle::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var( --as3sd-poster-play-bg, #c5a059 );
	opacity: var( --as3sd-poster-play-bg-opacity, 0.88 );
	z-index: 0;
}

.as3sd-player-poster-play__icon {
	position: relative;
	z-index: 1;
	display: block;
	width: 42%;
	height: 42%;
	fill: var( --as3sd-poster-play-color, #ffffff );
	margin-left: 0.12em;
}

.as3sd-player-poster-link:hover .as3sd-player-poster-play__circle,
.as3sd-player-poster-wrap:hover .as3sd-player-poster-play__circle {
	transform: scale( 1.05 );
}

/* Multi-player shortcode / Elementor grid */
.as3sd-player-cell {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-width: 0;
}

.as3sd-player-heading {
	margin: 0 0 0.65rem;
	padding: 0;
	text-align: center;
	font-size: clamp( 1rem, 2.2vw, 1.35rem );
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
}

.as3sd-players-grid {
	display: grid;
	grid-template-columns: repeat( var( --as3sd-player-columns, 1 ), minmax( 0, 1fr ) );
	gap: 1.25rem;
	width: 100%;
	align-items: start;
	position: relative;
	isolation: isolate;
}

.as3sd-players-grid .as3sd-player-cell,
.as3sd-players-grid .as3sd-player-wrap {
	min-width: 0;
	align-self: stretch;
}

/* Elementor: avoid a stretched flex row collapsing player block height; keep normal column flow */
.elementor-widget-as3sd_stream_players .elementor-widget-container {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	align-content: flex-start;
	width: 100%;
	position: relative;
	z-index: auto;
	row-gap: 20px;
}

.elementor-widget-as3sd_stream_players .as3sd-players-grid,
.elementor-widget-container .as3sd-players-grid {
	flex: 0 0 auto;
	width: 100%;
	min-width: 0;
}

.elementor-widget-as3sd_stream_players .as3sd-player-wrap,
.elementor-widget-container .as3sd-player-wrap {
	flex-shrink: 0;
	width: 100%;
	max-width: 100%;
}

/* Responsive columns: phone → 1 col, tablet → max 2, desktop → shortcode count */
@media (max-width: 782px) {
	.as3sd-players-grid {
		grid-template-columns: minmax( 0, 1fr ) !important;
	}
}

@media (min-width: 783px) and (max-width: 1024px) {
	.as3sd-players-grid {
		grid-template-columns: repeat(
			min( 2, var( --as3sd-player-columns, 1 ) ),
			minmax( 0, 1fr )
		) !important;
	}
}

/* WooCommerce single product: trailer stream replaces product image gallery */
.as3sd-product-trailer-gallery {
	width: 100%;
	max-width: 100%;
	margin-bottom: 1.5rem;
}

.as3sd-product-trailer-gallery .as3sd-player-wrap {
	width: 100%;
}
