/* Wolf Alex & Mila Mi — Music Library
   Shared styles for the homepage "Нові релізи" preview and the
   dedicated /music/ Music Library page. Written by hand (not Tailwind)
   because the compiled index-*.css only contains utility classes that
   were actually used in the original build; new layout needs new rules.
   Uses the same CSS custom properties defined in index-*.css :root. */

/* ---------- Homepage preview grid ---------- */
.wa-preview-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}
@media (min-width: 640px) {
	.wa-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}
@media (min-width: 768px) {
	.wa-preview-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.wa-preview-card { display: flex; flex-direction: column; gap: 0.6rem; text-align: center; }

/* ---------- Mobile nav overlay (used on the /music/ page) ---------- */
.ml-mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 70;
	background: hsl(224 52% 4% / .98);
	backdrop-filter: blur(8px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2rem;
}
.ml-mobile-nav[hidden] { display: none; }
.ml-mobile-nav-close {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	background: none;
	border: none;
	color: hsl(var(--foreground));
	cursor: pointer;
	padding: 0.5rem;
}
.ml-mobile-nav-links {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.75rem;
}
.ml-mobile-nav-links a {
	font-family: "Great Vibes", cursive;
	font-size: 2.25rem;
	color: hsl(var(--foreground) / .85);
	text-decoration: none;
	transition: color .2s;
}
.ml-mobile-nav-links a:hover,
.ml-mobile-nav-links a[aria-current="page"] { color: hsl(var(--primary)); }

/* ==================================================================
   Dedicated Music Library page (/music/)
   ================================================================== */

.ml-page {
	min-height: 100vh;
	background: hsl(var(--background));
	color: hsl(var(--foreground));
	padding-top: 5rem; /* clears the fixed 80px header */
	padding-bottom: 6.5rem; /* clears the fixed bottom player */
}

.ml-container {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 1.25rem;
}
@media (min-width: 768px) {
	.ml-container { padding: 0 2rem; }
}

/* ---------- Page hero ---------- */
.ml-hero { padding: 3rem 0 2rem; text-align: center; }
.ml-hero h1 {
	font-family: "Great Vibes", cursive;
	font-weight: 400;
	font-size: 3rem;
	line-height: 1.1;
	color: hsl(var(--primary));
	text-shadow: 0 0 18px hsl(43 88% 56% / .45), 0 0 60px hsl(43 88% 50% / .25);
}
@media (min-width: 768px) {
	.ml-hero h1 { font-size: 4.5rem; }
}
.ml-hero p {
	margin-top: 0.75rem;
	color: hsl(var(--muted-foreground));
	font-size: 0.95rem;
}

/* ---------- Controls: search, tabs, sort ---------- */
.ml-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 auto 2.5rem;
	max-width: 64rem;
}

.ml-search { position: relative; flex: 1 1 240px; min-width: 0; }
.ml-search input {
	width: 100%;
	background: hsl(0 0% 100% / .04);
	border: 1px solid hsl(0 0% 100% / .12);
	color: hsl(var(--foreground));
	border-radius: 999px;
	padding: 0.65rem 1.1rem 0.65rem 2.6rem;
	font-size: 0.875rem;
	font-family: inherit;
	outline: none;
	transition: border-color .2s, background-color .2s;
}
.ml-search input::placeholder { color: hsl(var(--muted-foreground)); }
.ml-search input:focus-visible {
	border-color: hsl(var(--primary) / .6);
	background: hsl(0 0% 100% / .06);
}
.ml-search svg {
	position: absolute;
	left: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: hsl(var(--muted-foreground));
	pointer-events: none;
}

.ml-tabs {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
	background: hsl(0 0% 100% / .03);
	border: 1px solid hsl(0 0% 100% / .08);
	border-radius: 999px;
	padding: 0.3rem;
}
.ml-tab {
	appearance: none;
	background: transparent;
	border: none;
	color: hsl(var(--muted-foreground));
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: .02em;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	cursor: pointer;
	transition: color .2s, background-color .2s;
	white-space: nowrap;
}
.ml-tab:hover { color: hsl(var(--foreground)); }
.ml-tab[aria-selected="true"] {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}
.ml-tab:focus-visible, .ml-search input:focus-visible, .ml-sort select:focus-visible {
	outline: 2px solid hsl(var(--primary));
	outline-offset: 2px;
}

.ml-sort select {
	appearance: none;
	background: hsl(0 0% 100% / .04) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8adbd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 0.85rem center;
	border: 1px solid hsl(0 0% 100% / .12);
	color: hsl(var(--foreground));
	border-radius: 999px;
	padding: 0.6rem 2.2rem 0.6rem 1.1rem;
	font-size: 0.8rem;
	font-family: inherit;
	cursor: pointer;
}
.ml-sort select option { background: hsl(var(--card)); color: hsl(var(--foreground)); }

/* ---------- Section headings within the library ---------- */
.ml-section-title {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
	margin: 2.5rem 0 1.25rem;
}
.ml-section-title:first-child { margin-top: 0; }

/* ---------- Album grid ---------- */
.ml-album-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}
@media (min-width: 640px) {
	.ml-album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.ml-album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
}

.ml-album-card {
	display: block;
	text-align: left;
	background: hsl(0 0% 100% / .03);
	border: 1px solid hsl(0 0% 100% / .08);
	border-radius: 1rem;
	padding: 0.85rem;
	cursor: pointer;
	transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
	font-family: inherit;
	color: inherit;
	width: 100%;
}
.ml-album-card:hover, .ml-album-card:focus-visible {
	border-color: hsl(var(--primary) / .4);
	background: hsl(0 0% 100% / .05);
	transform: translateY(-3px);
}
.ml-album-cover-wrap {
	position: relative;
	aspect-ratio: 1 / 1;
	width: 100%;
	overflow: hidden;
	border-radius: 0.65rem;
	background: hsl(0 0% 100% / .05);
	margin-bottom: 0.85rem;
}
.ml-album-cover-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ml-album-play-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: hsl(0 0% 0% / .45);
	opacity: 0;
	transition: opacity .2s ease;
}
.ml-album-card:hover .ml-album-play-overlay,
.ml-album-card:focus-visible .ml-album-play-overlay { opacity: 1; }
.ml-album-play-overlay svg { color: #fff; filter: drop-shadow(0 2px 8px rgb(0 0 0 / .5)); }

.ml-album-title {
	font-size: 0.95rem;
	font-weight: 600;
	color: hsl(var(--foreground));
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ml-album-meta {
	margin-top: 0.2rem;
	font-size: 0.78rem;
	color: hsl(var(--muted-foreground));
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Empty states ---------- */
.ml-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: hsl(var(--muted-foreground));
	font-size: 0.9rem;
	border: 1px dashed hsl(0 0% 100% / .12);
	border-radius: 1rem;
}

/* ---------- Track list (Усі пісні / album detail / search results) ---------- */
.ml-track-list {
	border: 1px solid hsl(0 0% 100% / .1);
	border-radius: 1rem;
	overflow: hidden;
	background: hsl(0 0% 0% / .15);
}
.ml-track-row {
	display: grid;
	grid-template-columns: 2rem auto 1fr auto auto;
	align-items: center;
	gap: 0.85rem;
	padding: 0.65rem 1rem;
	border-bottom: 1px solid hsl(0 0% 100% / .07);
	background: transparent;
	transition: background-color .2s;
}
.ml-track-row:last-child { border-bottom: none; }
.ml-track-row:hover { background: hsl(0 0% 100% / .04); }
.ml-track-row.is-active { background: hsl(0 0% 100% / .08); }

.ml-track-num {
	font-size: 0.8rem;
	color: hsl(var(--muted-foreground));
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.ml-track-row.is-active .ml-track-num { color: hsl(var(--primary)); }

.ml-track-thumb {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.4rem;
	overflow: hidden;
	background: hsl(0 0% 100% / .06);
	flex-shrink: 0;
	display: none;
}
.ml-track-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 480px) { .ml-track-thumb { display: block; } }

.ml-track-info { min-width: 0; }
.ml-track-title {
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(var(--foreground));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ml-track-row.is-active .ml-track-title { color: hsl(var(--primary)); }
.ml-track-album {
	font-size: 0.75rem;
	color: hsl(var(--muted-foreground));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ml-track-duration {
	font-size: 0.78rem;
	color: hsl(var(--muted-foreground));
	font-variant-numeric: tabular-nums;
	display: none;
}
@media (min-width: 640px) { .ml-track-duration { display: block; } }

.ml-track-play {
	appearance: none;
	background: hsl(0 0% 100% / .05);
	border: 1px solid hsl(0 0% 100% / .12);
	color: hsl(var(--foreground));
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color .2s, border-color .2s, color .2s;
}
.ml-track-play:hover { background: hsl(var(--primary) / .15); border-color: hsl(var(--primary) / .5); }
.ml-track-row.is-active .ml-track-play { color: hsl(var(--primary)); border-color: hsl(var(--primary) / .5); }

/* ---------- Album detail view ---------- */
.ml-back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	color: hsl(var(--muted-foreground));
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	padding: 0;
	margin-bottom: 1.5rem;
	transition: color .2s;
}
.ml-back-link:hover { color: hsl(var(--primary)); }

.ml-album-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1.25rem;
	margin-bottom: 2rem;
}
@media (min-width: 640px) {
	.ml-album-header { flex-direction: row; text-align: left; align-items: flex-end; }
}
.ml-album-header-cover {
	width: 11rem;
	height: 11rem;
	border-radius: 1rem;
	overflow: hidden;
	border: 1px solid hsl(0 0% 100% / .1);
	box-shadow: 0 20px 60px hsl(0 0% 0% / .5);
	flex-shrink: 0;
}
.ml-album-header-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ml-album-header-info { min-width: 0; }
.ml-album-header-info .ml-eyebrow {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: hsl(var(--primary));
}
.ml-album-header-info h2 {
	font-family: "Great Vibes", cursive;
	font-weight: 400;
	font-size: 2.75rem;
	line-height: 1.15;
	color: hsl(var(--foreground));
	margin: 0.25rem 0 0.5rem;
}
.ml-album-header-meta {
	font-size: 0.85rem;
	color: hsl(var(--muted-foreground));
	margin-bottom: 1rem;
}
.ml-play-album-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: none;
	border-radius: 999px;
	padding: 0.75rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	box-shadow: 0 0 24px hsl(43 88% 56% / .35);
	transition: box-shadow .2s, transform .15s;
}
.ml-play-album-btn:hover { box-shadow: 0 0 36px hsl(43 88% 56% / .55); }
.ml-play-album-btn:active { transform: scale(.98); }

/* ---------- Global bottom player ---------- */
.ml-player {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 60;
	background: hsl(224 52% 4% / .92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-top: 1px solid hsl(0 0% 100% / .1);
	transform: translateY(100%);
	transition: transform .3s ease;
}
.ml-player.is-visible { transform: translateY(0); }

.ml-player-inner {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0.6rem 1rem;
	display: grid;
	grid-template-columns: minmax(0,1fr) auto;
	align-items: center;
	gap: 0.75rem;
}
@media (min-width: 768px) {
	.ml-player-inner { grid-template-columns: minmax(0,260px) auto minmax(0,220px); padding: 0.75rem 1.5rem; }
}

.ml-player-track { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.ml-player-cover {
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 0.5rem;
	overflow: hidden;
	background: hsl(0 0% 100% / .06);
	flex-shrink: 0;
}
.ml-player-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ml-player-title { font-size: 0.82rem; font-weight: 600; color: hsl(var(--foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-player-album { font-size: 0.72rem; color: hsl(var(--muted-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ml-player-main { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; min-width: 0; grid-column: 1 / -1; order: 3; }
@media (min-width: 768px) {
	.ml-player-main { grid-column: auto; order: 0; }
}
.ml-player-buttons { display: flex; align-items: center; gap: 0.75rem; }
.ml-player-buttons button {
	appearance: none;
	background: none;
	border: none;
	color: hsl(var(--foreground) / .7);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem;
	transition: color .2s;
}
.ml-player-buttons button:hover { color: hsl(var(--foreground)); }
.ml-player-buttons button.is-active { color: hsl(var(--primary)); }
.ml-player-buttons .ml-play-pause {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}
.ml-player-buttons .ml-play-pause:hover { color: hsl(var(--primary-foreground)); background: hsl(var(--primary) / .85); }

.ml-player-progress { display: flex; align-items: center; gap: 0.5rem; width: 100%; max-width: 34rem; }
.ml-player-time { font-size: 0.68rem; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; width: 2.4rem; flex-shrink: 0; }
.ml-player-time.end { text-align: right; }
.ml-player-progress input[type="range"] { flex: 1; accent-color: hsl(var(--primary)); cursor: pointer; height: 4px; }

.ml-player-volume { display: none; align-items: center; gap: 0.5rem; justify-self: end; }
@media (min-width: 768px) { .ml-player-volume { display: flex; } }
.ml-player-volume button { appearance: none; background: none; border: none; color: hsl(var(--foreground) / .7); cursor: pointer; display:flex; }
.ml-player-volume input[type="range"] { width: 5.5rem; accent-color: hsl(var(--primary)); cursor: pointer; height: 4px; }

/* Range input base reset (Safari/WebKit friendly) */
.ml-player input[type="range"], .ml-controls input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	background: hsl(0 0% 100% / .15);
	border-radius: 999px;
}
.ml-player input[type="range"]::-webkit-slider-thumb,
.ml-controls input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: hsl(var(--primary));
	cursor: pointer;
}
.ml-player input[type="range"]::-moz-range-thumb,
.ml-controls input[type="range"]::-moz-range-thumb {
	width: 11px;
	height: 11px;
	border: none;
	border-radius: 50%;
	background: hsl(var(--primary));
	cursor: pointer;
}

/* No horizontal overflow anywhere on the library page */
.ml-page, .ml-page * { max-width: 100%; }
.ml-page { overflow-x: hidden; }
