/**
 * Music Core — structural Apple Music-like shell.
 * Brand tokens overridden in child theme.
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--mc-font);
	background: var(--mc-bg);
	color: var(--mc-text);
	line-height: 1.4;
}

a,
a:hover,
a:focus,
a:active {
	color: inherit;
	text-decoration: none;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* App shell — floating sidebar/topbar (shell.css); content offset here */
.mc-app {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--mc-bg, #1f1f1f);
}

.mc-main {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	padding-left: var(--bl-sidebar-footprint, 244px);
	box-sizing: border-box;
}

.mc-brand-link {
	font-family: var(--mc-font-display);
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.mc-pjax-root {
	flex: 1;
	overflow: auto;
	padding:
		var(--bl-content-offset, 100px)
		var(--bl-content-gutter, 12px)
		calc(var(--mc-player-height, 72px) + var(--bl-content-bottom, 2.75rem));
	outline: none;
}

.mc-pjax-root.is-loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 120ms ease;
}

/* Swup fade on content container only (shell stays put) */
.mc-pjax-root.transition-fade {
	transition: opacity 180ms ease;
	opacity: 1;
}

html.is-changing .mc-pjax-root.transition-fade,
.mc-pjax-root.transition-fade.is-animating-out,
.mc-pjax-root.transition-fade.is-changing {
	opacity: 0.35;
}

html.is-animating .mc-pjax-root.transition-fade {
	opacity: 0.35;
}


/* Legacy mc-player shell removed — use #sticky-audio-player (global-media-player). */

/* Typography / page */
.mc-page-title {
	margin: 0 0 0.35rem;
	font-family: var(--mc-font-display);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	letter-spacing: -0.03em;
}

.mc-page-lede {
	margin: 0 0 1.75rem;
	color: var(--mc-text-muted);
	max-width: 40rem;
}

.mc-hero-head {
	margin-bottom: 0.5rem;
}

.mc-empty {
	color: var(--mc-text-muted);
}

/* Rails */
.mc-rails {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.mc-rail__title {
	margin: 0 0 0.85rem;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.mc-rail__scroller {
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.mc-rail__list {
	display: flex;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0 0 0.5rem;
}

.mc-card {
	flex: 0 0 160px;
	width: 160px;
}

.mc-card__media {
	position: relative;
	border-radius: var(--mc-radius);
	overflow: hidden;
	background: var(--mc-bg-elevated);
}

.mc-card__cover-link {
	display: block;
	text-decoration: none;
}

.mc-card__media img {
	width: 160px;
	height: 160px;
	object-fit: cover;
}

.mc-card__play {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	border-radius: 50%;
	background: var(--mc-accent);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 140ms ease, transform 140ms ease;
}

.mc-card__media:hover .mc-card__play,
.mc-card__play:focus-visible {
	opacity: 1;
	transform: none;
}

.mc-card__title {
	display: block;
	margin-top: 0.55rem;
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none;
}

.mc-card__sub {
	color: var(--mc-text-muted);
	font-size: 0.8rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Table catalog */
.mc-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--mc-border);
	border-radius: 12px;
	background: rgba(18, 18, 18, 0.55);
}

.mc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.mc-table th {
	text-align: left;
	padding: 0.75rem 1rem;
	color: var(--mc-text-muted);
	font-weight: 600;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 1px solid var(--mc-border);
}

.mc-table td {
	padding: 0.55rem 1rem;
	border-bottom: 1px solid var(--mc-border);
	vertical-align: middle;
}

.mc-row:hover td {
	background: var(--mc-bg-row-hover);
}

.mc-row__link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
}

.mc-row__cover {
	width: 40px;
	height: 40px;
	border-radius: 4px;
	object-fit: cover;
	background: var(--mc-bg-elevated);
}

.mc-row__title {
	display: block;
	font-weight: 600;
}

.mc-row__sub,
.mc-row__bits {
	color: var(--mc-text-muted);
	font-size: 0.8rem;
}

.mc-table__col-play {
	width: 3rem;
}

.mc-table__col-price,
.mc-table__col-action {
	white-space: nowrap;
}

/* Buttons */
.mc-btn,
.edd-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.45rem 0.9rem;
	border-radius: 980px;
	border: 0;
	font: inherit;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	text-decoration: none;
}

.mc-btn--accent,
.edd-submit {
	background: var(--mc-accent);
	color: #fff;
}

.mc-btn--ghost {
	background: transparent;
	color: var(--mc-text);
	border: 1px solid var(--mc-border);
}

.mc-icon-btn {
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--mc-text);
	cursor: pointer;
}

.mc-icon-btn--play {
	background: var(--mc-text);
	color: #000;
}

.mc-icon-btn--play::before {
	content: "";
	display: block;
	width: 0;
	height: 0;
	margin-left: 2px;
	border-style: solid;
	border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent currentColor;
}

.mc-single-hero {
	display: flex;
	gap: 1.5rem;
	align-items: flex-end;
	margin-bottom: 2rem;
}

.mc-single-cover {
	width: 220px;
	height: 220px;
	border-radius: 10px;
	object-fit: cover;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.mc-single-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1rem;
}

.mc-pagination .page-numbers {
	display: flex;
	gap: 0.35rem;
	list-style: none;
	padding: 1rem 0;
	margin: 0;
}

.mc-pagination a,
.mc-pagination span {
	display: inline-block;
	padding: 0.35rem 0.65rem;
	border-radius: 6px;
	color: var(--mc-text-muted);
}

.mc-pagination .current {
	background: var(--mc-bg-row-hover);
	color: var(--mc-text);
}

@media (max-width: 1024px) {
	.mc-main {
		padding-left: 0;
	}

	.mc-single-hero {
		flex-direction: column;
		align-items: flex-start;
	}

	.mc-single-cover {
		width: 160px;
		height: 160px;
	}

	.mc-table__col-meta {
		display: none;
	}
}
