/**
 * WaveSurfer mount: <music> tag replacement (.neel-music-player).
 */

.neel-music-player {
	--neel-music-surface: #f8f8f8;
    --neel-music-border: rgba(0, 0, 0, 0.085);
	--neel-music-wave: #9aa3b0;
	--neel-music-progress: #3d4555;
	--neel-music-cursor: #2d3340;

	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
	max-width: 100%;
	margin: 1.25em 0;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--neel-music-border);
	border-radius: 8px;
	background: var(--neel-music-surface);
}

.neel-music-player:last-child {
	margin-bottom: 0;
}

.neel-music-player__toolbar {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	margin: 0;
}

.neel-music-player__play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--neel-music-border);
	border-radius: 50%;
	background: #fff;
	color: #333;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.neel-music-player__play:hover,
.neel-music-player__play:focus {
	background: #e4e8ef;
	border-color: #b8c0cd;
	outline: none;
}

.neel-music-player__play:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Wave mount: same surface as card; fills remaining row width */
.neel-music-player__wave {
	flex: 1;
	min-width: 0;
	align-self: stretch;
	display: flex;
	align-items: center;
	min-height: 72px;
	border-radius: 6px;
	background: var(--neel-music-surface);
}

/* WaveSurfer v7 shadow host is the first child div */
.neel-music-player__wave > div {
	flex: 1;
	min-width: 0;
	min-height: 72px;
	border-radius: 6px;
	background: var(--neel-music-surface);
}

.neel-music-player__wave > div::part(scroll) {
	background: var(--neel-music-surface);
}

.neel-music-player__wave > div::part(wrapper) {
	background: transparent;
}

.neel-music-player--error .neel-music-player__wave {
	padding: 0.75rem;
	font-size: 0.875rem;
	color: #b91c1c;
}

.neel-dark-theme .neel-music-player {
	--neel-music-surface: #1e1e22;
	--neel-music-border: #3d4148;
	--neel-music-wave: #4a5160;
	--neel-music-progress: #c4c8d0;
	--neel-music-cursor: #e8eaed;
}

.neel-dark-theme .neel-music-player__play {
	background: var(--neel-music-surface);
	border-color: var(--neel-music-border);
	color: #e8eaed;
	box-shadow: none;
}

.neel-dark-theme .neel-music-player__play:hover,
.neel-dark-theme .neel-music-player__play:focus {
	background: #2a2a30;
	border-color: #5a6068;
}

.neel-dark-theme .neel-music-player--error .neel-music-player__wave {
	color: #fca5a5;
}
