/* Barceligence WordPress Super Audio Player — thin see-through strip at the bottom, light letter-spaced type.
   Every look setting arrives from the dashboard as an optional --bsap-* variable on #bsap;
   anything left blank falls back to the Dark / Light defaults below. */
body.has-bsap { padding-bottom: 50px; }

.bsap {
	--bg-c: var(--bsap-bg, #14181a);
	--fg: var(--bsap-fg, #fff);
	--acc: var(--bsap-accent, #fff);

	--ic: var(--bsap-icon, var(--fg));
	--trail: var(--bsap-trail, var(--acc));
	--pointer: var(--bsap-pointer, var(--acc));
	--soft: color-mix(in srgb, var(--fg) 60%, transparent);
	--line: color-mix(in srgb, var(--fg) 9%, transparent);
	--hover: color-mix(in srgb, var(--fg) 5%, transparent);
	--track: var(--bsap-track, color-mix(in srgb, var(--fg) 18%, transparent));
	--bg: color-mix(in srgb, var(--bg-c) calc(100% - var(--bsap-see, 45) * 1%), transparent);
	--list-bg: color-mix(in srgb, var(--bg-c) calc(100% - var(--bsap-list-see, 6) * 1%), transparent);
	--blur: calc(var(--bsap-blur, 14) * 1px);
	--font: var(--bsap-font, Raleway, "Open Sans", "Helvetica Neue", Arial, sans-serif);
	--size: calc(var(--bsap-size, 11) * 1px);
	--ics: calc(var(--bsap-icon-size, 13) * 1px);
	--thumb: calc(var(--bsap-thumb-size, 10) * 1px);
	--thick: calc(var(--bsap-thick, 2) * 1px);

	position: fixed; right: 0; bottom: 0; left: 0; z-index: 1000;
	font: 300 12px/1.3 var(--font);
	color: var(--fg); text-align: left;
	-webkit-font-smoothing: antialiased;
}
.bsap[data-mode="light"] { --bg-c: var(--bsap-bg, #fff); --fg: var(--bsap-fg, #14181a); }
.bsap[data-mode="light"][data-accent="default"] { --acc: #14181a; }
@media (prefers-color-scheme: light) {
	.bsap[data-mode="auto"] { --bg-c: var(--bsap-bg, #fff); --fg: var(--bsap-fg, #14181a); }
	.bsap[data-mode="auto"][data-accent="default"] { --acc: #14181a; }
}

.bsap *, .bsap *:before, .bsap *:after { box-sizing: border-box; }
.bsap [hidden] { display: none !important; }

.bsap-bar {
	position: relative; z-index: 2; display: flex; align-items: stretch; height: 50px;
	background: var(--bg);
	-webkit-backdrop-filter: blur(var(--blur)) saturate(140%); backdrop-filter: blur(var(--blur)) saturate(140%);
	border-top: 1px solid var(--line);
}

/* ---------- buttons & icon styles ---------- */
.bsap-btn { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: calc(var(--ics) + 25px); min-width: 34px; height: 50px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none !important; color: var(--ic); cursor: pointer; opacity: .75; box-shadow: none; transition: opacity .2s; }
.bsap-btn:hover, .bsap-btn:focus-visible { opacity: 1; outline: 0; }
.bsap-btn:focus-visible { box-shadow: inset 0 0 0 1px var(--soft); }
.bsap-btn svg { width: var(--ics); height: var(--ics); overflow: visible; fill: currentColor; }
.bsap-play { opacity: .9; }
.bsap-play svg { width: calc(var(--ics) * 1.55); height: calc(var(--ics) * 1.55); }
.bsap-play .i-pause, .bsap.is-playing .bsap-play .i-play { display: none; }
.bsap.is-playing .bsap-play .i-pause { display: block; }
.bsap-toggle-bar { width: 22px; min-width: 22px; }
.bsap-toggle-bar svg { width: calc(var(--ics) * .6); height: calc(var(--ics) * .6); transform: rotate(180deg); transition: transform .2s; }
.bsap-btn[disabled] { opacity: .25; cursor: default; }
/* Rounded: same shapes with soft corners. Outline: thin line icons. */
.bsap[data-icons="round"] .bsap-btn svg path { stroke: currentColor; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.bsap[data-icons="line"] .bsap-btn svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.bsap-art { flex: 0 0 50px; width: 50px; height: 50px; margin-right: 4px; background: rgba(0,0,0,.25); }
.bsap-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bsap-art img:not([src]) { visibility: hidden; }

/* ---------- seek area: faint fill and/or a line in the accent colour ---------- */
.bsap-rail { position: relative; flex: 1 1 auto; min-width: 0; margin-left: 10px; cursor: pointer; overflow: hidden; }
.bsap-progress { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: color-mix(in srgb, var(--acc) 9%, transparent); border-right: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); pointer-events: none; transition: width .25s linear; }
.bsap-progress:before { content: ""; position: absolute; top: -1px; left: 0; right: -1px; height: calc(var(--bsap-prog-thick, 2) * 1px); background: var(--acc); }
.bsap[data-progress="line"] .bsap-progress { background: none; border-right: 0; }
.bsap[data-progress="fill"] .bsap-progress:before { display: none; }
.bsap-details { position: absolute; top: 50%; left: 14px; right: 110px; transform: translateY(-50%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.bsap-title { font-weight: var(--bsap-weight, 400); font-size: var(--size); letter-spacing: calc(var(--bsap-spacing, 16) * .01em); text-transform: var(--bsap-case, uppercase); }
.bsap-artist { margin-left: .9em; color: var(--soft); font-size: var(--size); letter-spacing: .06em; }
.bsap-time { position: absolute; top: 0; right: 14px; line-height: 50px; font-size: var(--size); letter-spacing: .08em; color: var(--soft); font-variant-numeric: tabular-nums; pointer-events: none; }
.bsap-rail.is-embed { cursor: default; }

/* ---------- volume: only the speaker shows; the slider rises on hover / focus ---------- */
.bsap-vol { position: relative; display: flex; flex: 0 0 auto; }
.bsap-vol-pop {
	position: absolute; bottom: 100%; left: 50%; width: 38px; height: 130px; margin-left: -19px;
	display: flex; align-items: center; justify-content: center;
	background: var(--bg); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
	border: 1px solid var(--line); border-bottom: 0;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.bsap-vol:hover .bsap-vol-pop, .bsap-vol:focus-within .bsap-vol-pop, .bsap-vol.is-open .bsap-vol-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s; }

.bsap-volume {
	-webkit-appearance: none; appearance: none; writing-mode: vertical-lr; direction: rtl;
	width: max(var(--thumb), 18px); height: 100px; margin: 0; padding: 0; background: transparent; cursor: pointer;
}
/* the trail: coloured below the pointer (--v set by the script), plain track above */
.bsap-volume::-webkit-slider-runnable-track { width: var(--thick); border-radius: var(--thick); background: linear-gradient(to top, var(--trail) var(--v, 80%), var(--track) var(--v, 80%)); }
.bsap-volume::-moz-range-track { width: var(--thick); border-radius: var(--thick); background: var(--track); }
.bsap-volume::-moz-range-progress { width: var(--thick); border-radius: var(--thick); background: var(--trail); }
.bsap-volume::-webkit-slider-thumb { -webkit-appearance: none; width: var(--thumb); height: var(--thumb); margin-left: calc((var(--thick) - var(--thumb)) / 2); border: 0; border-radius: 50%; background: var(--pointer); }
.bsap-volume::-moz-range-thumb { width: var(--thumb); height: var(--thumb); border: 0; border-radius: 50%; background: var(--pointer); }
/* pointer shapes */
.bsap[data-thumb="square"] .bsap-volume::-webkit-slider-thumb { border-radius: 1px; }
.bsap[data-thumb="square"] .bsap-volume::-moz-range-thumb { border-radius: 1px; }
.bsap[data-thumb="bar"] .bsap-volume::-webkit-slider-thumb { width: calc(var(--thumb) * 1.8); height: 3px; border-radius: 2px; margin-left: calc((var(--thick) - var(--thumb) * 1.8) / 2); }
.bsap[data-thumb="bar"] .bsap-volume::-moz-range-thumb { width: calc(var(--thumb) * 1.8); height: 3px; border-radius: 2px; }
.bsap[data-thumb="ring"] .bsap-volume::-webkit-slider-thumb { background: var(--bg-c); box-shadow: inset 0 0 0 2px var(--pointer); }
.bsap[data-thumb="ring"] .bsap-volume::-moz-range-thumb { background: var(--bg-c); box-shadow: inset 0 0 0 2px var(--pointer); }
.bsap[data-thumb="none"] .bsap-volume::-webkit-slider-thumb { opacity: 0; }
.bsap[data-thumb="none"] .bsap-volume::-moz-range-thumb { opacity: 0; }
.bsap.is-muted .bsap-mute { opacity: .3; }

.bsap-list { width: 48px; border-left: 1px solid var(--line); }
.bsap.is-list-open .bsap-list { opacity: 1; }

/* ---------- song list ---------- */
.bsap-tracks { position: absolute; right: 0; bottom: 50px; left: 0; max-height: calc(100vh - 50px); margin: 0; padding: 0; overflow: auto; list-style: none; background: var(--list-bg); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); border-top: 1px solid var(--line); counter-reset: bsap; -webkit-overflow-scrolling: touch; }
.bsap-tracks li { display: flex; align-items: center; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: var(--size); letter-spacing: .05em; cursor: pointer; counter-increment: bsap; transition: background .15s; }
.bsap-tracks li:before { content: counter(bsap, decimal-leading-zero); flex: 0 0 20px; color: var(--soft); font-variant-numeric: tabular-nums; }
.bsap-tracks li.is-current:before { content: "\25B6"; color: var(--acc); }
.bsap-tracks li.is-current .t { color: var(--acc); }
.bsap-tracks li:hover { background: var(--hover); }
.bsap-tracks li img { width: 34px; height: 34px; object-fit: cover; }
.bsap-tracks .t { display: block; margin-bottom: 2px; color: var(--fg); font-size: calc(var(--size) + 1px); font-weight: var(--bsap-weight, 400); letter-spacing: calc(var(--bsap-spacing, 16) * .01em); text-transform: var(--bsap-case, uppercase); }
.bsap-tracks .k { margin-left: auto; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; }

/* YouTube / Spotify players are shown in a small window above the bar (both services require a visible player) */
.bsap-media { position: absolute; right: 12px; bottom: 62px; width: 356px; max-width: calc(100vw - 24px); background: #000; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.bsap-media.is-youtube { height: 200px; }
.bsap-media.is-spotify { height: 152px; background: transparent; box-shadow: none; }
.bsap-media iframe, .bsap-media > div { display: block; width: 100% !important; height: 100% !important; border: 0; }
.bsap.is-list-open .bsap-media { bottom: auto; top: 0; transform: translateY(-100%); }

/* folded into the corner (remembered per visitor) */
.bsap.is-closed { right: auto; width: 114px; opacity: .55; transition: opacity .2s; }
.bsap.is-closed:hover { opacity: 1; }
.bsap.is-closed .bsap-bar > :not(.bsap-toggle-bar):not(.bsap-art):not(.bsap-play) { display: none; }
.bsap.is-closed .bsap-toggle-bar svg { transform: none; }
.bsap.is-closed .bsap-tracks, .bsap.is-closed .bsap-media { display: none !important; }

/* dashboard live preview: same bar, sitting in the page instead of fixed */
.bsap.bsap-preview { position: relative; z-index: 1; }

@media (max-width: 640px) {
	.bsap:not(.bsap-preview) .bsap-vol, .bsap:not(.bsap-preview) .bsap-time, .bsap:not(.bsap-preview) .bsap-prev { display: none; } /* phones use their own volume buttons */
	.bsap-details { right: 10px; }
	.bsap-media { right: 8px; left: 8px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.bsap *, .bsap { transition: none !important; }
}
