/**
 * MagnusPrime - 06. Signal
 * Single Signal template styles extracted from single-song.php.
 *
 * Dependencies:
 * - 00-magnusprime-tokens.css
 * - 03-magnusprime-components.css
 */

/* ── Reset & base ────────────────────────────────────────────────────────── */
.mp-wrap *{ box-sizing: border-box; }

.visually-hidden{
	position:absolute !important;
	width:1px !important;
	height:1px !important;
	padding:0 !important;
	margin:-1px !important;
	overflow:hidden !important;
	clip:rect(0,0,0,0) !important;
	white-space:nowrap !important;
	border:0 !important;
}

/* Ensure the page background covers everything — no theme colour bleeding through */
html, body{
	background: #05070b !important;
}

/* Tab panel wrapper — no background/border, just visibility control */
.mp-tab-panel{ display: none; padding: 1.5rem 0; }
.mp-tab-panel.is-active{ display: block; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.mp-hero{
	position: relative;
	width: 100%;
	/* Fits in viewport below admin bar (32px) leaving room for tabs + player */
	min-height: 400px;
	overflow: hidden;
	display: flex;
	align-items: stretch;
}

/* When WP admin bar is present, push hero down so it's not behind the bar */
.admin-bar .mp-hero{
	scroll-margin-top: 32px;
}

/* Blurred full-bleed background */
.mp-hero-bg{
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 15%;
	filter: brightness(.85) saturate(1.4) blur(6px);
	transform: scale(1.1);
	z-index: 0;
}

.mp-hero-bg-fallback{
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #1a0830 0%, #2d0a1a 40%, #0a0510 100%);
	z-index: 0;
}

/* Gradient overlay — stronger on right side for text legibility */
.mp-hero-grad{
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to right,  rgba(5,7,11,.05) 0%, rgba(5,7,11,.55) 60%, rgba(5,7,11,.85) 100%),
		linear-gradient(to bottom, rgba(5,7,11,.05) 0%, rgba(5,7,11,.55) 100%);
	z-index: 1;
}

/* 2-column grid inside hero */
.mp-hero-content{
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 2rem 0 0;
	display: grid;
	grid-template-columns: 5fr 7fr;
	gap: clamp(1.5rem, 3vw, 2.5rem);
	align-items: center;
	align-self: stretch; /* fill full hero height */
}

/* Left col — artwork card */
.mp-hero-art-col{
	display: flex;
	align-items: stretch;
	align-self: stretch;
	/* Bleed flush to the left edge of the content area */
	margin-left: -2rem;
}

.mp-hero-art-card{
	width: 100%;
	height: 100%; /* fills exactly the hero height, no overflow */
	min-height: 400px;
	border-radius: 0 1rem 1rem 0;
	overflow: hidden;
	border-right: 1px solid rgba(140,220,255,.18);
	border-top: none;
	border-bottom: none;
	border-left: none;
	box-shadow: 4px 0 40px rgba(0,0,0,.5);
	background: rgba(10,12,18,.6);
}

.mp-hero-art-card img{
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

/* Right col — metadata */
.mp-hero-meta{
	display: flex;
	flex-direction: column;
	gap: .4rem;
}

.mp-hero-eyebrow{
	font-size: .68rem;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: rgba(140,220,255,.75);
	margin-bottom: .2rem;
}

.mp-hero-title{
	font-size: clamp(1.6rem, 4vw, 2.8rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.035em;
	margin-bottom: .5rem;
}

.mp-hero-tagline{
	font-size: .9rem;
	color: rgba(245,248,255,.6);
	margin-bottom: .6rem;
	max-width: 56ch;
}

.mp-hero-chips{
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

/* ── Main container ──────────────────────────────────────────────────────── */
.mp-main{
	max-width: 860px;
	margin: 0 auto;
	padding: 0 1.5rem 100px;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.mp-tabs{
	display: flex;
	gap: 2px;
	border-bottom: 1px solid rgba(120,200,255,.12);
	margin: .5rem 0 0;
}

.mp-tab{
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	font: inherit;
	padding: .75rem 1.1rem;
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(245,248,255,.4);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color .2s, border-color .2s;
	user-select: none;
}

.mp-tab:hover{ color: rgba(245,248,255,.7); }

.mp-tab.is-active{
	color: rgba(140,220,255,.95);
	border-color: rgba(140,220,255,.7);
}

/* ── Audio player card ───────────────────────────────────────────────────── */
.mp-player-card{
	padding: 1.1rem 1.3rem;
	margin-bottom: .85rem;
}

.mp-player-row{
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.mp-play-btn{
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: rgba(140,220,255,.12);
	border: 1.5px solid rgba(140,220,255,.38);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background .2s, border-color .2s;
}

.mp-play-btn:hover{
	background: rgba(140,220,255,.25);
	border-color: rgba(140,220,255,.6);
}

.mp-play-btn svg{ display: block; }

.mp-track-info{ flex: 1; min-width: 0; }

.mp-track-title{
	font-size: .95rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mp-track-sub{
	font-size: .76rem;
	color: rgba(245,248,255,.45);
	margin-top: .2rem;
}

.mp-track-dur{
	font-size: .8rem;
	color: rgba(245,248,255,.45);
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
}

.mp-progress{
	height: 4px;
	background: rgba(120,200,255,.12);
	border-radius: 2px;
	margin-bottom: .5rem;
	cursor: pointer;
	position: relative;
}

.mp-progress-fill{
	height: 4px;
	background: linear-gradient(90deg, rgba(140,220,255,.8), rgba(190,160,255,.8));
	border-radius: 2px;
	pointer-events: none;
	width: 0%;
	transition: width .1s linear;
}

.mp-progress-thumb{
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(200,240,255,.95);
	position: absolute;
	top: -4px;
	left: 0%;
	margin-left: -6px;
	pointer-events: none;
	transition: left .1s linear;
	opacity: 0;
	transition: opacity .2s, left .1s linear;
}

.mp-progress:hover .mp-progress-thumb{ opacity: 1; }

.mp-time-row{
	display: flex;
	justify-content: space-between;
	font-size: .7rem;
	color: rgba(245,248,255,.38);
	font-variant-numeric: tabular-nums;
	margin-bottom: .55rem;
}

.mp-volume-row{
	display: flex;
	align-items: center;
	gap: .65rem;
}

.mp-volume-bar{
	flex: 1;
	height: 3px;
	background: rgba(120,200,255,.1);
	border-radius: 2px;
	cursor: pointer;
}

.mp-volume-fill{
	height: 3px;
	background: rgba(140,220,255,.5);
	border-radius: 2px;
	width: 75%;
}

/* ── YouTube embed ───────────────────────────────────────────────────────── */
.mp-video{
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 1.15rem;
	border: 1px solid rgba(120,200,255,.14);
	background: #000;
	margin-bottom: 1.25rem;
}

.mp-video iframe{
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ── Play tab artwork ────────────────────────────────────────────────────── */
.mp-play-artwork{
	border-radius: 1.25rem;
	overflow: hidden;
	border: 1px solid rgba(120,200,255,.14);
	margin-bottom: 1.25rem;
	max-height: 420px;
}
.mp-play-artwork img{
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

/* ── Signal feed note ────────────────────────────────────────────────────── */
.mp-signal-feed-note{
	display: flex;
	align-items: center;
	gap: .65rem;
	padding: .85rem 1.1rem;
	margin-bottom: 1rem;
	font-size: .82rem;
	color: rgba(140,220,255,.75);
	letter-spacing: .03em;
}

/* ── Signal Visualizer ──────────────────────────────────────────────────── */
.mp-visualizer{
	position: relative;
	width: 100%;
	height: 64px;
	margin-bottom: .75rem;
	border-radius: 1rem;
	overflow: hidden;
	background: rgba(5,7,11,.6);
	border: 1px solid rgba(120,200,255,.1);
}

.mp-visualizer canvas{
	width: 100%;
	height: 100%;
	display: block;
}

.mp-visualizer-label{
	position: absolute;
	top: .5rem;
	left: .75rem;
	font-size: .6rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: rgba(140,220,255,.35);
	pointer-events: none;
}

.mp-visualizer-idle{
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .72rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: rgba(245,248,255,.2);
	pointer-events: none;
	transition: opacity .3s;
}

.mp-visualizer.is-active .mp-visualizer-idle{
	opacity: 0;
}

/* ── Share row ───────────────────────────────────────────────────────────── */
.mp-share{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: .75rem;
}

.mp-share-btn{
	border: 1px solid rgba(120,200,255,.18);
	border-radius: 999px;
	padding: .42rem 1rem;
	font-size: .78rem;
	color: rgba(245,248,255,.7);
	background: rgba(10,12,18,.3);
	cursor: pointer;
	transition: border-color .2s, color .2s;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
}

.mp-share-btn:hover{
	border-color: rgba(140,220,255,.38);
	color: rgba(245,248,255,.95);
}

/* ── Signal Data grid ────────────────────────────────────────────────────── */
.mp-signal-grid{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 1.25rem;
}

.mp-signal-item{
	background: rgba(10,12,18,.5);
	border: 1px solid rgba(120,200,255,.12);
	border-radius: 1rem;
	padding: 1rem 1.1rem;
}

.mp-signal-value{
	font-size: .95rem;
	font-weight: 500;
	color: rgba(245,248,255,.9);
	margin-top: .4rem;
}

.mp-signal-value a{
	color: rgba(140,220,255,.85);
	text-decoration: none;
}

.mp-signal-value a:hover{ color: rgba(180,240,255,.95); }

.mp-signal-full{ grid-column: 1 / -1; }

.mp-genre-chips{
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: .55rem;
}

.mp-genre-chip{
	border: 1px solid rgba(120,200,255,.2);
	border-radius: 999px;
	padding: .35rem .85rem;
	font-size: .78rem;
	color: rgba(245,248,255,.75);
	background: rgba(10,12,18,.3);
	text-decoration: none;
	transition: border-color .2s, color .2s;
}

.mp-genre-chip:hover{
	border-color: rgba(140,220,255,.4);
	color: rgba(245,248,255,.95);
}

.mp-movement-chip{
	border: 1px solid rgba(140,220,255,.32);
	border-radius: 999px;
	padding: .35rem .85rem;
	font-size: .78rem;
	color: rgba(140,220,255,.9);
	background: rgba(140,220,255,.08);
	display: inline-block;
}

.mp-theme-chip{
	border: 1px solid rgba(190,160,255,.28);
	border-radius: 999px;
	padding: .35rem .85rem;
	font-size: .78rem;
	color: rgba(210,185,255,.85);
	background: rgba(190,160,255,.07);
	display: inline-block;
}

/* ── Lyrics fullscreen ───────────────────────────────────────────────────── */
.mp-lyrics-fs-btn{
	display: flex;
	align-items: center;
	gap: .45rem;
	margin-bottom: .75rem;
	border: 1px solid rgba(120,200,255,.18);
	border-radius: 999px;
	padding: .35rem .85rem;
	font-size: .75rem;
	color: rgba(245,248,255,.55);
	background: transparent;
	cursor: pointer;
	transition: color .2s, border-color .2s;
	margin-left: auto;
}
.mp-lyrics-fs-btn:hover{
	color: rgba(245,248,255,.9);
	border-color: rgba(140,220,255,.35);
}

.mp-lyrics-fullscreen{
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(5,7,11,.97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}
.mp-lyrics-fullscreen.is-open{
	display: flex;
}

.mp-lyrics-fs-close{
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	border: 1px solid rgba(120,200,255,.2);
	border-radius: 999px;
	padding: .5rem 1rem;
	font-size: .8rem;
	color: rgba(245,248,255,.6);
	background: transparent;
	cursor: pointer;
}
.mp-lyrics-fs-close:hover{ color: rgba(245,248,255,.95); border-color: rgba(140,220,255,.4); }

.mp-lyrics-fs-title{
	font-size: 1rem;
	font-weight: 700;
	color: rgba(245,248,255,.85);
	margin-bottom: .25rem;
	letter-spacing: .02em;
}
.mp-lyrics-fs-sub{
	font-size: .8rem;
	color: rgba(245,248,255,.4);
	margin-bottom: 2rem;
}

.mp-lyrics-fs-stage{
	width: 100%;
	max-width: 640px;
	height: 60vh;
	position: relative;
	overflow: hidden;
}
.mp-lyrics-fs-stage::before,
.mp-lyrics-fs-stage::after{
	content: '';
	position: absolute;
	left: 0; right: 0;
	height: 120px;
	z-index: 2;
	pointer-events: none;
}
.mp-lyrics-fs-stage::before{
	top: 0;
	background: linear-gradient(to bottom, rgba(5,7,11,.97), transparent);
}
.mp-lyrics-fs-stage::after{
	bottom: 0;
	background: linear-gradient(to top, rgba(5,7,11,.97), transparent);
}
/* ── Synced Lyrics stage ─────────────────────────────────────────────────── */
.mp-lyrics-stage{
	height: 320px;
	overflow: hidden;
	position: relative;
}

.mp-lyrics-stage::before,
.mp-lyrics-stage::after{
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	height: 100px;
	z-index: 2;
	pointer-events: none;
}

.mp-lyrics-stage::before{
	top: 0;
	background: linear-gradient(to bottom, #05070b, transparent);
}

.mp-lyrics-stage::after{
	bottom: 0;
	background: linear-gradient(to top, #05070b, transparent);
}

.mp-lyrics-scroll{
	padding: 80px 0;
	transition: transform .38s cubic-bezier(.22,.68,0,1.15);
}

/* Plain lyrics fallback (no LRC) */
.mp-lyrics-plain{
	white-space: pre-wrap;
	line-height: 1.9;
	color: rgba(245,248,255,.8);
	font-family: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
	font-size: .92rem;
	max-height: 420px;
	overflow-y: auto;
	padding-right: .4rem;
}

.mp-lyrics-plain::-webkit-scrollbar{ width: 3px; }
.mp-lyrics-plain::-webkit-scrollbar-thumb{ background: rgba(140,220,255,.2); border-radius: 2px; }

.mp-lyric-line{
	padding: .5rem .5rem;
	font-size: 1rem;
	line-height: 1.55;
	color: rgba(245,248,255,.2);
	transition: color .3s, font-size .3s, font-weight .3s;
	text-align: center;
	cursor: pointer;
	border-radius: .5rem;
}

.mp-lyric-line:hover{ color: rgba(245,248,255,.45); }

.mp-lyric-line.is-near{ color: rgba(245,248,255,.52); font-size: 1.04rem; }

.mp-lyric-line.is-active{
	color: rgba(245,248,255,.97);
	font-size: 1.18rem;
	font-weight: 700;
}

.mp-lyric-line.is-section{
	font-size: .65rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: rgba(140,220,255,.35);
	padding: .9rem .5rem .3rem;
	font-weight: 400;
	cursor: default;
}

.mp-lyric-line.is-section.is-active{
	color: rgba(140,220,255,.72);
	font-size: .65rem;
	font-weight: 500;
}



/* ── Lyrics accordion ────────────────────────────────────────────────────── */
.mp-lyrics-accordion{
	border: 1px solid rgba(120,200,255,.14);
	border-radius: 1rem;
	overflow: hidden;
	margin-top: 1.25rem;
}

.mp-lyrics-accordion-trigger{
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .9rem 1.1rem;
	background: rgba(10,12,18,.5);
	border: none;
	color: rgba(245,248,255,.7);
	font-size: .8rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .2s, color .2s;
	gap: .75rem;
}
.mp-lyrics-accordion-trigger:hover{
	background: rgba(10,12,18,.75);
	color: rgba(245,248,255,.95);
}

.mp-lyrics-accordion-icon{
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	transition: transform .3s ease;
	color: rgba(140,220,255,.6);
}
.mp-lyrics-accordion.is-open .mp-lyrics-accordion-icon{
	transform: rotate(180deg);
}

.mp-lyrics-accordion-body{
	display: none;
	padding: 1.25rem 1.5rem 1.5rem;
	background: rgba(5,7,11,.4);
}
.mp-lyrics-accordion.is-open .mp-lyrics-accordion-body{
	display: block;
}

.mp-lyrics-full{
	white-space: pre-wrap;
	line-height: 2;
	color: rgba(245,248,255,.75);
	font-size: .92rem;
	font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

.mp-lyrics-full-section{
	display: block;
	margin-top: 1.5rem;
	margin-bottom: .35rem;
	font-size: .68rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: rgba(140,220,255,.6);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-style: normal;
}

/* Bold in lyrics — section headers and emphasis use the cyan accent */
.mp-lyrics-full strong,
.mp-lyrics-plain strong{
	color: rgba(140,220,255,.9);
	font-weight: 700;
}

/* ── Analysis panel ──────────────────────────────────────────────────────── */
.mp-analysis-body{
	line-height: 1.8;
	color: rgba(245,248,255,.8);
	font-size: .97rem;
	padding: 1.4rem 1.5rem;
}

.mp-analysis-body p + p{ margin-top: 1em; }

/* ── Signal Context (post content) ──────────────────────────────────────── */
.mp-context{
	padding: 1.4rem 1.5rem;
	line-height: 1.8;
	color: rgba(245,248,255,.8);
	font-size: .97rem;
}


/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
	.mp-hero{ min-height: auto; }

	.mp-hero-content{
		grid-template-columns: 1fr;
		padding: 2rem 1.25rem;
		gap: 1.25rem;
	}

	/* On mobile: artwork sits above, smaller */
	.mp-hero-art-col{
		margin-left: -1.25rem; /* match mobile content padding */
	}

	.mp-hero-art-card{
		height: 100%; /* fill stacked column naturally on mobile */
		border-radius: 0 .75rem .75rem 0;
	}

	.mp-hero-title{ font-size: clamp(1.8rem, 8vw, 2.8rem); }

	.mp-signal-grid{ grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.mp-lyrics-scroll{ transition: none; }
	.mp-progress-fill,
	.mp-progress-thumb{ transition: none; }
}