/*
 * Media Store Theme — Library & Artist Page Styles
 * Scoped with .mst-library-page and .mst-artist-page prefixes.
 */

/* ============================================================
   Shared
   ============================================================ */
.mst-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255,255,255,.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mst-spin .7s linear infinite;
	vertical-align: middle;
}

@keyframes mst-spin { to { transform: rotate(360deg); } }

.mst-library-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 40px 0;
	color: rgba(255,255,255,.5);
	font-size: .9rem;
}

/* ============================================================
   My Library page
   ============================================================ */
.mst-library-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px 80px;
}

/* Header */
.mst-library-header {
	margin-bottom: 36px;
}

.mst-library-header__inner {
	display: flex;
	align-items: center;
	gap: 18px;
}

.mst-library-header__avatar img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
}

.mst-library-header__title {
	font-size: 2rem;
	font-weight: 800;
	margin: 0 0 2px;
	letter-spacing: -.02em;
}

.mst-library-header__user {
	font-size: .875rem;
	opacity: .6;
	margin: 0;
}

/* Tab bar */
.mst-library-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid rgba(255,255,255,.1);
	margin-bottom: 32px;
}

.mst-library-tab {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	color: rgba(255,255,255,.55);
	font-size: .9rem;
	font-weight: 500;
	cursor: pointer;
	transition: color .15s, border-color .15s;
}

.mst-library-tab:hover,
.mst-library-tab.is-active {
	color: #fff;
}

.mst-library-tab.is-active {
	border-bottom-color: #fff;
}

.mst-library-tab__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	background: rgba(255,255,255,.12);
	border-radius: 10px;
	font-size: .7rem;
	font-weight: 700;
}

/* Tab panels */
.mst-library-panel { display: none; }
.mst-library-panel.is-active { display: block; }

/* Item grid */
.mst-library-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 20px;
}

/* Library item card */
.mst-library-card {
	background: rgba(255,255,255,.04);
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 10px;
	overflow: hidden;
	transition: transform .15s, box-shadow .15s;
}

.mst-library-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.mst-library-card__cover {
	position: relative;
	aspect-ratio: 1;
	background: rgba(255,255,255,.06);
	overflow: hidden;
}

.mst-library-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mst-library-card__cover-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,.2);
}

.mst-library-card__actions {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	opacity: 0;
	background: rgba(0,0,0,.5);
	transition: opacity .15s;
}

.mst-library-card:hover .mst-library-card__actions { opacity: 1; }

.mst-library-card__action-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: rgba(255,255,255,.15);
	border: none;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background .15s;
}

.mst-library-card__action-btn:hover { background: rgba(255,255,255,.3); }

.mst-library-card__info {
	padding: 12px;
}

.mst-library-card__title {
	font-size: .875rem;
	font-weight: 600;
	margin: 0 0 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mst-library-card__title a {
	color: inherit;
	text-decoration: none;
}

.mst-library-card__title a:hover { text-decoration: underline; }

.mst-library-card__creator {
	font-size: .775rem;
	opacity: .55;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mst-library-card__badge {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: .65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-top: 6px;
	background: rgba(99,210,172,.18);
	color: #63d2ac;
}

/* Empty state */
.mst-library-empty {
	text-align: center;
	padding: 60px 20px;
	opacity: .5;
}

.mst-library-empty__icon {
	font-size: 3rem;
	margin-bottom: 12px;
}

.mst-library-empty p {
	margin: 0 0 16px;
	font-size: .9rem;
}

.mst-library-empty a {
	color: #fff;
}

/* Download status message */
.mst-download-msg {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: rgba(30,30,40,.95);
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 8px;
	padding: 12px 20px;
	font-size: .875rem;
	color: #fff;
	z-index: 9999;
	opacity: 0;
	transition: opacity .2s, transform .2s;
	pointer-events: none;
	white-space: nowrap;
}

.mst-download-msg.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Favorite button on single item page
   ============================================================ */
.mst-btn.mst-btn--icon {
	width: 42px;
	height: 42px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.15);
	border-radius: 50%;
	transition: background .15s, border-color .15s;
}

.mst-btn.mst-btn--icon:hover { background: rgba(255,255,255,.16); }

.mst-favorite-btn.is-favorited svg { fill: #e8375a; stroke: #e8375a; }

/* ============================================================
   Artist landing page
   ============================================================ */
.mst-artist-page {
	/* Full-width; inner sections constrain width */
}

/* Hero */
.mst-artist-hero {
	position: relative;
	overflow: hidden;
	min-height: 340px;
	display: flex;
	align-items: flex-end;
}

.mst-artist-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.mst-artist-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(28px) brightness(.55) saturate(1.4);
	transform: scale(1.1);
}

.mst-artist-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(10,10,14,.9) 0%, rgba(10,10,14,.4) 60%, transparent 100%);
	z-index: 1;
}

.mst-artist-hero__inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	gap: 28px;
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
	padding: 40px 24px 36px;
}

.mst-artist-hero__avatar {
	flex-shrink: 0;
	width: 130px;
	height: 130px;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid rgba(255,255,255,.15);
	box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

.mst-artist-hero__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mst-artist-hero__eyebrow {
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	opacity: .6;
	margin: 0 0 4px;
}

.mst-artist-hero__name {
	font-size: clamp(1.8rem, 5vw, 3.5rem);
	font-weight: 900;
	margin: 0 0 12px;
	letter-spacing: -.02em;
	line-height: 1.05;
}

.mst-artist-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 14px;
}

.mst-artist-hero__meta-item {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: .825rem;
	opacity: .75;
}

.mst-artist-hero__meta-link {
	color: inherit;
	text-decoration: none;
}

.mst-artist-hero__meta-link:hover { opacity: 1; text-decoration: underline; }

.mst-artist-hero__socials {
	display: flex;
	gap: 10px;
}

.mst-artist-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255,255,255,.1);
	border-radius: 50%;
	color: rgba(255,255,255,.8);
	text-decoration: none;
	transition: background .15s, color .15s;
}

.mst-artist-social-btn:hover {
	background: rgba(255,255,255,.2);
	color: #fff;
}

/* Artist body */
.mst-artist-body {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 24px 80px;
}

.mst-artist-section {
	margin-bottom: 48px;
}

.mst-artist-section__heading {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 20px;
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.mst-artist-section__count {
	font-size: .75rem;
	font-weight: 500;
	opacity: .45;
}

.mst-artist-bio__text {
	font-size: .95rem;
	line-height: 1.75;
	opacity: .8;
	max-width: 700px;
}

.mst-artist-pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 32px;
}

.mst-artist-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255,255,255,.06);
	border-radius: 6px;
	color: rgba(255,255,255,.7);
	text-decoration: none;
	font-size: .875rem;
	transition: background .15s;
}

.mst-artist-pagination .page-numbers.current,
.mst-artist-pagination .page-numbers:hover {
	background: rgba(255,255,255,.15);
	color: #fff;
}

/* ============================================================
   Artist mood chips ("Sounds Like" section)
   ============================================================ */
.mst-artist-mood-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mst-mood-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 20px;
	font-size: .8rem;
	color: rgba(255,255,255,.8);
	text-decoration: none;
	transition: background .15s, border-color .15s;
	cursor: default;
}

a.mst-mood-chip {
	cursor: pointer;
}

a.mst-mood-chip:hover {
	background: rgba(255,255,255,.16);
	border-color: rgba(255,255,255,.25);
	color: #fff;
	text-decoration: none;
}

.mst-mood-chip__count {
	font-size: .7rem;
	opacity: .5;
	font-variant-numeric: tabular-nums;
}

/* Responsive */
@media (max-width: 640px) {
	.mst-library-grid { grid-template-columns: repeat(2, 1fr); }
	.mst-artist-hero__inner { flex-direction: column; align-items: flex-start; }
	.mst-artist-hero__avatar { width: 90px; height: 90px; }
}
