:root {
	--lpl-player-notice-bg: #1AAFFF;
}

/* Reserve the video aspect-ratio before Plyr initializes, so the player does
   not collapse and shove the page (cumulative layout shift). The renderer emits
   --lpl-ratio from the configured ratio (e.g. 16/9); empty/auto falls back here.
   Video only — audio has no ratio. Once Plyr takes over, it owns sizing inside
   .plyr, and these element-level reservations no longer drive layout. */
video.lpl-player--video,
.plyr__video-embed.lpl-player--video {
	aspect-ratio: var(--lpl-ratio, 16 / 9);
	width: 100%;
	height: auto;
}

/* Plyr colours the volume thumb with --plyr-color-main but leaves the progress thumb white at position 0 — visually inconsistent before playback starts. This ties both thumbs to the same colour. */
.plyr {
	--plyr-range-thumb-background: var(--plyr-color-main, #00b2ff);
}

.plyr__controls input[type=range]::-webkit-slider-runnable-track{
	box-shadow: none;
}

.plyr--audio .plyr__controls{
	background: transparent;
}

.lpl-not-found{
	text-align: center;
	background: var(--lpl-player-notice-bg, var(--lex-color-brand-primary));
	color: var(--wp-color-white);
	padding-block: var(--lex-space-4, 16px);
	padding-inline: var(--lex-space-0, 0);
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	    -ms-flex-align: center;
	        align-items: center;
	-webkit-box-pack: center;
	    -ms-flex-pack: center;
	        justify-content: center;
}

/* ─── Audio player: poster card ─────────────────────────────────────────── */

/*
 * Token system mirrors playlist.css:
 *   --lpl-audio-bg        card background
 *   --lpl-audio-text      title + control icon colour
 *   --lpl-audio-border    card border colour
 *   --lpl-audio-radius    card corner radius
 *   --lpl-audio-shadow    card box-shadow
 *   --lpl-audio-backdrop  backdrop-filter (glass only)
 *
 * Skins via data-skin attribute (matches playlist data-skin pattern):
 *   default  →  A: light card
 *   dark     →  C: dark / night
 *   glass    →  F: glassmorphism
 */

.lpl-player-wrap.lpl-audio.has-poster {
    /* layout tokens */
    --lpl-audio-radius:   12px;
    --lpl-audio-thumb-radius: 6px;
    --lpl-audio-thumb-size:   64px;
    --lpl-audio-gap:      12px;
    --lpl-audio-pad-x:    16px;
    --lpl-audio-pad-y:    12px;
    --lpl-audio-title-size: 13px;
    --lpl-audio-title-weight: 600;
    --lpl-audio-info-gap: 6px;

    /* skin tokens — default (A: light card) */
    --lpl-audio-bg:       #ffffff;
    --lpl-audio-text:     #1a1d23;
    --lpl-audio-border:   #e2e4e7;
    --lpl-audio-shadow:   0 1px 4px rgba(0, 0, 0, 0.06);
    --lpl-audio-backdrop: none;

    /* structure */
    display: flex;
    align-items: center;
    gap: var(--lpl-audio-gap);
    padding: var(--lpl-audio-pad-y) var(--lpl-audio-pad-x);
    border: 1px solid var(--lpl-audio-border);
    border-radius: var(--lpl-audio-radius);
    background: var(--lpl-audio-bg);
    box-shadow: var(--lpl-audio-shadow);
    backdrop-filter: var(--lpl-audio-backdrop);
    color: var(--lpl-audio-text);
}

/* skin: dark (C) */
.lpl-player-wrap.lpl-audio[data-skin="dark"] {
    --lpl-audio-bg:     #1a1d23;
    --lpl-audio-text:   #e0e3ea;
    --lpl-audio-border: #2e3138;
    --lpl-audio-shadow: 0 2px 8px rgba(0, 0, 0, 0.40);
    --plyr-color-main:            #60a5fa;
    --plyr-audio-control-color:   #9ca3af;
    --plyr-audio-controls-background: transparent;
    --plyr-range-fill-background: #60a5fa;
    --plyr-range-thumb-background: #60a5fa;
}

/* skin: glass (F) */
.lpl-player-wrap.lpl-audio[data-skin="glass"] {
    --lpl-audio-bg:       rgba(255, 255, 255, 0.55);
    --lpl-audio-text:     #1a1d23;
    --lpl-audio-border:   rgba(255, 255, 255, 0.50);
    --lpl-audio-shadow:   0 4px 24px rgba(0, 0, 0, 0.08);
    --lpl-audio-backdrop: blur(12px);
}

/* poster image */
.lpl-player-wrap.lpl-audio img.lpl-audio-poster {
    flex-shrink: 0;
    width: var(--lpl-audio-thumb-size);
    height: var(--lpl-audio-thumb-size);
    border-radius: var(--lpl-audio-thumb-radius);
    object-fit: cover;
    align-self: center;
}

/* info column: title + player stacked */
.lpl-audio-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--lpl-audio-info-gap);
}

/* track title — mirrors .lpl-playlist__item-title sizing */
.lpl-audio-title {
    font-size: var(--lpl-audio-title-size);
    font-weight: var(--lpl-audio-title-weight);
    line-height: 1.2;
    margin: 0;
    color: var(--lpl-audio-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* strip plyr's internal padding so controls sit flush inside info column */
.lpl-audio-info .plyr--audio .plyr__controls {
    padding: 0;
    background: transparent;
}

/*customify theme support*/
.theme-customify .plyr [data-plyr=airplay],
.theme-customify .plyr [data-plyr=captions],
.theme-customify .plyr [data-plyr=fullscreen],
.theme-customify .plyr [data-plyr=pip],
body.theme-customify .elementor-widget-vapfem_audio_player .plyr__control--overlaid{
    display: none;
}
.theme-customify .plyr--full-ui input[type=range]{
	box-shadow: none;
}

/*astra theme support*/
body.wp-theme-astra .plyr__menu button[data-plyr="speed"]:focus {
    background-color: unset;
}

/* Preview page playlist - With default WordPress themes the container is too small so player controls are cramped */
.wp-singular.lean_playlist-template-default .lpl-playlist-wrap{
    max-width: 80%;
}

/* silverstorm-theme support */


/* ── Theme compat: blanket clearfix pseudo neutralizer ────────────────────────
 *
 * Covers both the single player and the playlist. Lives here rather than in
 * playlist.css because the two share the 'frontend' asset context and always
 * load together, so one rule in one file serves both.
 *
 * Some themes ship a Bootstrap-era global clearfix that injects `content: ""`
 * on every block element on the page, e.g. the Silverstorm theme (v1.0.33,
 * themes/silverstorm/style.css) with:
 *
 *   html.silverstorm-theme div:before,
 *   html.silverstorm-theme div:after { content: ""; display: table; order: 1; }
 *
 * Inside our flex/grid containers those pseudos become flex/grid items. They
 * are zero-width, so they look harmless, but the `gap` around them is not:
 * every gap container silently loses 2 x gap from its flex-grow child, and
 * grid containers gain a phantom auto-placed row. Measured on Silverstorm:
 * track titles 16px narrower (premature ellipsis), now-playing info 32px
 * narrower, items list 12px taller, .lpl-playlist grid rows 360px -> 360px 0px.
 *
 * Written generically (no theme class) because this clearfix is a common
 * pattern, not a Silverstorm quirk.
 *
 * Specificity: theme selectors of this shape are 0-1-3, so we need two classes
 * to outrank them. The doubled class and the descendant scope both land at
 * 0-2-x, which wins regardless of stylesheet load order.
 *
 * Scope is `div` only: our frontend markup emits no other block tag inside
 * these wrappers. The .plyr exclusion protects Plyr's own pseudos (menu arrow)
 * without styling the third-party lib.
 *
 * NOTE: any future pseudo-element on a div inside these wrappers will be
 * silently suppressed by this rule. Put frontend pseudos on spans, or add an
 * exclusion here.
 * ─────────────────────────────────────────────────────────────────────────── */
.lpl-player-wrap.lpl-player-wrap::before,
.lpl-player-wrap.lpl-player-wrap::after,
.lpl-playlist.lpl-playlist::before,
.lpl-playlist.lpl-playlist::after,
.lpl-playlist-wrap.lpl-playlist-wrap::before,
.lpl-playlist-wrap.lpl-playlist-wrap::after,
.lpl-player-wrap div:not(.plyr, .plyr *)::before,
.lpl-player-wrap div:not(.plyr, .plyr *)::after,
.lpl-playlist div:not(.plyr, .plyr *)::before,
.lpl-playlist div:not(.plyr, .plyr *)::after {
    content: none;
}

/* ── Theme compat: universal margin/padding reset guard ──────────────────────
 *
 * Themes that ship `* { margin: 0; padding: 0 }` (Silverstorm v1.0.33 uses
 * `html.silverstorm-theme *`) land at specificity 0-1-1, which outranks every
 * single-class Plyr rule (0-1-0). Plyr rules using two or more classes survive
 * untouched, so only the six declarations below actually get clobbered.
 * `box-sizing` needs no guard: Plyr is already border-box.
 *
 * Prefixing with `.plyr ` lifts each rule to 0-2-0, winning regardless of
 * stylesheet load order. Values mirror plyr.css, including its var fallbacks,
 * so per-player token overrides still apply.
 *
 * Written generically (no theme class) because this reset is a common pattern.
 * ─────────────────────────────────────────────────────────────────────────── */
.plyr .plyr__control {
    padding: calc(var(--plyr-control-spacing, 10px) * 0.7);
}

.plyr .plyr__control--overlaid {
    padding: calc(var(--plyr-control-spacing, 10px) * 1.5);
}

.plyr .plyr__progress {
    margin-right: var(--plyr-range-thumb-height, 13px);
}

.plyr .plyr__progress__buffer {
    margin: calc(var(--plyr-range-track-height, 5px) / 2 * -1)
        calc(var(--plyr-range-thumb-height, 13px) / 2 * -1) 0;
}

.plyr .plyr__tooltip {
    padding: calc(var(--plyr-control-spacing, 10px) / 2)
        calc(var(--plyr-control-spacing, 10px) / 1.333);
    margin-bottom: var(--plyr-control-spacing, 10px);
}

.plyr .plyr__menu__container {
    margin-bottom: var(--plyr-control-spacing, 10px);
}

