/*
 * HmongLyrics UI refresh (theme v5.6.0)
 * Loaded after responsive.min.css. Kept as a separate, readable file so it
 * can be edited without rebuilding the minified stylesheets.
 *
 *  1. Logos for light / dark mode, dark header
 *  2. Lyrics toolbar label
 *  3. Home search box on phones
 *  4. Image placeholders
 *  5. A–Z bar as one swipeable row on phones
 *  6. Lyrics banner (cover + blurred background)
 *  7. Latest Lyrics thumbnails
 *  8. Tap-to-play YouTube player
 *  9. Phone action bar
 * 10. Sing-along mode
 */

:root {
	--hl-accent: var(--muusico-accent, #ff3f7f);
	--hl-surface: #171719;
	--hl-surface-2: #1f1d22;
	--hl-border: #393338;
}

/* 1. Logos -------------------------------------------------------------- */

.muusico-logo-for-dark { display: none !important; }
[data-bs-theme="dark"] .muusico-logo-for-light { display: none !important; }
[data-bs-theme="dark"] .muusico-logo-for-dark { display: inline-block !important; }

[data-bs-theme="dark"] .muusico-header-wrap,
[data-bs-theme="dark"] .muusico-site-header .navbar {
	background: #19191c !important;
}
[data-bs-theme="dark"] .muusico-site-header .navbar-toggler {
	border-color: rgba(255, 255, 255, .25);
}
[data-bs-theme="dark"] .muusico-site-header .navbar-toggler-icon {
	filter: invert(1);
}
[data-bs-theme="dark"] .hmonglyrics-footer-logo {
	background: transparent !important;
	padding-left: 0 !important;
}

/* 2. Lyrics toolbar: keep the "LYRICS" label on one line ---------------- */

.muusico-lyrics-toolbar {
	flex-wrap: wrap;
	row-gap: 12px;
}
.muusico-lyrics-toolbar-title {
	flex: 0 0 auto;
}
.muusico-lyrics-toolbar-title h4 {
	white-space: nowrap;
}
@media (min-width: 768px) {
	.muusico-lyrics-tools {
		flex: 1 1 320px;
		justify-content: flex-end;
	}
}
@media (max-width: 767.98px) {
	.muusico-lyrics-tools {
		flex: 0 0 auto !important;
		justify-content: center;
	}
}

/* 3. Home search box on phones -------------------------------------------
 * The button sits on its own row on phones. Remove the white seam above it
 * and inset it with rounded corners so it reads as part of the box. */

@media (max-width: 575.98px) {
	.muusico-home-search .muusico-search-box {
		padding: 6px !important;
		row-gap: 6px;
	}
	.muusico-home-search .muusico-search-box .btn {
		border-top: 0 !important;
		border-radius: 10px !important;
		min-height: 48px;
	}
	.muusico-home-search .muusico-search-box .input-group-text,
	.muusico-home-search .muusico-search-box .form-control {
		min-height: 50px !important;
	}
}

/* 4. Image placeholders --------------------------------------------------- */

.muusico-popular-image.is-placeholder,
.muusico-lyrics-hero-cover.is-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 30% 20%, rgba(255, 63, 127, .35), transparent 60%),
		linear-gradient(135deg, #2a1f2b 0%, #16141a 100%);
}
.muusico-card-placeholder,
.muusico-lyrics-hero-cover.is-placeholder i {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: var(--hl-accent);
	font-size: 24px;
}
.muusico-popular-image.is-placeholder {
	text-decoration: none;
}

/* 5. A–Z bar on phones: one swipeable row ------------------------------- */

@media (max-width: 767.98px) {
	.muusico-alphabet-bar {
		padding: 8px 0 !important;
	}
	.muusico-alphabet-row {
		flex-direction: row !important;
		align-items: center !important;
		flex-wrap: nowrap !important;
		justify-content: flex-start !important;
		gap: 8px !important;
	}
	.muusico-alphabet-label {
		flex: 0 0 auto;
		font-size: 11px;
		letter-spacing: .08em;
		opacity: .75;
	}
	.muusico-alphabet-links {
		flex-wrap: nowrap !important;
		justify-content: flex-start !important;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		-webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
		mask-image: linear-gradient(to right, #000 85%, transparent);
		padding-right: 24px;
	}
	.muusico-alphabet-links::-webkit-scrollbar {
		display: none;
	}
	.muusico-alphabet-link {
		flex: 0 0 auto;
		min-width: 34px !important;
		padding: 6px 8px !important;
		text-align: center;
	}
}

/* 6. Lyrics banner ---------------------------------------------------------- */

.muusico-lyrics-hero {
	position: relative !important;
	overflow: hidden;
	height: auto !important;
	min-height: 0 !important;
	padding: 0 !important;
	background: #141216 !important;
}
.muusico-lyrics-hero.has-image::before {
	content: "";
	position: absolute;
	inset: -40px;
	background-image: var(--muusico-hero-image);
	background-size: cover;
	background-position: center;
	filter: blur(28px) saturate(1.2);
	opacity: .55;
	transform: scale(1.1);
}
.muusico-lyrics-hero .single-lyrics-overlay {
	position: relative;
	height: auto !important;
	min-height: 0 !important;
	padding: 0 !important;
	background: linear-gradient(180deg, rgba(17, 17, 19, .25) 0%, rgba(17, 17, 19, .85) 100%) !important;
}
.muusico-lyrics-hero-inner {
	display: flex !important;
	align-items: flex-end !important;
	gap: 28px;
	height: auto !important;
	padding-top: 40px !important;
	padding-bottom: 36px !important;
}
.muusico-lyrics-hero-cover {
	flex: 0 0 auto;
	width: 168px;
	height: 168px;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
	background: #222;
}
.muusico-lyrics-hero-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.muusico-lyrics-hero-title {
	min-width: 0;
	position: static !important;
}
.muusico-lyrics-hero-title h1 {
	overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
	.muusico-lyrics-hero-inner {
		gap: 16px;
		align-items: center !important;
		padding-top: 20px !important;
		padding-bottom: 20px !important;
	}
	.muusico-lyrics-hero-cover {
		width: 84px;
		height: 84px;
		border-radius: 10px;
	}
	.muusico-lyrics-hero-cover.is-placeholder i {
		width: 44px;
		height: 44px;
		font-size: 18px;
	}
	.muusico-lyrics-hero-title h1 {
		font-size: clamp(24px, 7vw, 32px) !important;
		line-height: 1.15 !important;
		margin-bottom: 0 !important;
		padding-bottom: 0 !important;
	}
	.muusico-lyrics-artists,
	.muusico-lyrics-album {
		font-size: 14px !important;
	}
	/* Breadcrumbs repeat the banner on small screens. */
	.muusico-lyrics-page .muusico-breadcrumbs {
		display: none;
	}
	/* Hide the low-use Print button on phones. */
	.muusico-print-lyrics {
		display: none !important;
	}
}

/* 7. Latest Lyrics thumbnails --------------------------------------------- */

.muusico-latest-thumb {
	flex: 0 0 auto;
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 10px;
	overflow: hidden;
	background: rgba(127, 127, 127, .15);
}
.muusico-latest-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.muusico-latest-item {
	align-items: center;
}
/* Songs without an image: same footprint as a thumbnail so titles line up. */
.muusico-latest-item .muusico-latest-icon {
	flex: 0 0 56px;
	width: 56px !important;
	height: 56px !important;
	border-radius: 10px !important;
}

/* 8. Tap-to-play YouTube player ------------------------------------------- */

.muusico-youtube-player.is-facade {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 8px;
	background: #000;
}
.muusico-youtube-facade {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: #000;
	cursor: pointer;
}
.muusico-youtube-facade img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .9;
	transition: opacity .2s ease;
}
.muusico-youtube-facade:hover img,
.muusico-youtube-facade:focus-visible img {
	opacity: 1;
}
.muusico-youtube-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	transform: translate(-50%, -50%);
	border-radius: 14px;
	background: rgba(23, 23, 25, .82);
	transition: background .2s ease;
}
.muusico-youtube-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent #fff;
}
.muusico-youtube-facade:hover .muusico-youtube-play,
.muusico-youtube-facade:focus-visible .muusico-youtube-play {
	background: #ff0033;
}
.muusico-youtube-facade:focus-visible {
	outline: 3px solid var(--hl-accent);
	outline-offset: 2px;
}

/* 9. Phone action bar ----------------------------------------------------- */

.muusico-mobile-actions {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1040;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 6px;
	padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, .96);
	border-top: 1px solid rgba(0, 0, 0, .1);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, .12);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
[data-bs-theme="dark"] .muusico-mobile-actions {
	background: rgba(23, 23, 25, .96);
	border-top-color: var(--hl-border);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, .45);
}
.muusico-mobile-actions[hidden] {
	display: none;
}
.muusico-mobile-actions .muusico-lyrics-tool {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 100%;
	height: auto !important;
	min-height: 52px;
	margin: 0 !important;
	padding: 6px 4px !important;
	border: 0 !important;
	background: transparent !important;
	font-size: 12px !important;
	line-height: 1.2;
}
.muusico-mobile-actions .muusico-lyrics-tool .fa {
	font-size: 19px;
}
.muusico-mobile-actions .hmonglyrics-like-count {
	position: absolute;
	margin: -4px 0 0 30px;
	font-size: 11px;
	opacity: .8;
}
.muusico-mobile-actions .hmonglyrics-like-button {
	position: relative;
}
.muusico-mobile-actions .is-liked .fa,
.muusico-mobile-actions .is-favorite .fa {
	color: var(--hl-accent);
}
body.has-mobile-actions {
	padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
@media print {
	.muusico-mobile-actions { display: none !important; }
	body.has-mobile-actions { padding-bottom: 0; }
}

/* 10. Sing-along mode ------------------------------------------------------- */

.muusico-singalong-open,
.muusico-singalong-open body {
	overflow: hidden !important;
}
.muusico-singalong {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	flex-direction: column;
	background: #0d0c0f;
	color: #f7f4f5;
}
.muusico-singalong-top,
.muusico-singalong-controls {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px max(16px, env(safe-area-inset-left, 0px));
	background: rgba(23, 23, 25, .95);
}
.muusico-singalong-top {
	justify-content: space-between;
	border-bottom: 1px solid var(--hl-border);
	padding-top: max(12px, env(safe-area-inset-top, 0px));
}
.muusico-singalong-titles {
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.muusico-singalong .muusico-singalong-titles strong {
	font-family: Oswald, sans-serif;
	font-size: 20px !important;
	line-height: 1.3;
	color: #fff;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.muusico-singalong .muusico-singalong-titles span {
	color: var(--hl-accent);
	font-size: 14px !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.muusico-singalong-scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	outline: none;
}
.muusico-singalong-text {
	max-width: 900px;
	margin: 0 auto;
	padding: 36px 24px 50vh;
	line-height: 1.6;
	text-align: center;
	color: #f7f4f5;
}
.muusico-singalong-text p {
	margin: 0 0 1.1em;
}
.muusico-singalong-text a {
	color: inherit;
}
.muusico-singalong-controls {
	justify-content: center;
	flex-wrap: wrap;
	border-top: 1px solid var(--hl-border);
	padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.muusico-singalong-group {
	display: flex;
	align-items: center;
	gap: 6px;
}
.muusico-singalong-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--hl-border);
	border-radius: 10px;
	background: var(--hl-surface-2);
	color: #f7f4f5;
	font-size: 15px;
}
.muusico-singalong-btn:hover,
.muusico-singalong-btn:focus-visible {
	border-color: var(--hl-accent);
	outline: none;
}
.muusico-singalong-btn .fa-minus,
.muusico-singalong-btn .fa-plus {
	font-size: 10px;
}
.muusico-singalong-a {
	font-weight: 700;
}
.muusico-singalong-play {
	min-width: 150px;
	background: var(--hl-accent);
	border-color: var(--hl-accent);
	font-weight: 700;
}
.muusico-singalong-play.is-playing {
	background: var(--hl-surface-2);
}
.muusico-singalong-speed {
	min-width: 64px;
	text-align: center;
	font-size: 13px;
	opacity: .8;
}
.muusico-singalong-close {
	flex: 0 0 auto;
	font-size: 18px;
}
@media (max-width: 575.98px) {
	.muusico-singalong-controls { gap: 8px; }
	.muusico-singalong-play { min-width: 0; flex: 1 1 100%; order: -1; }
	.muusico-singalong-text { padding: 24px 18px 50vh; }
}
@media (prefers-reduced-motion: reduce) {
	.muusico-youtube-facade img,
	.muusico-youtube-play { transition: none; }
}
