/* ============================================================
   Queer Press Music — Frontend CSS
   Prefix: .qpm-
   Font: Inter (from theme)
   ============================================================ */

:root {
	--qpm-white:       #ffffff;
	--qpm-text:        #262626;
	--qpm-text-muted:  #6b6b6b;
	--qpm-pink:        #ff5b93;
	--qpm-pink-glow:   rgba(255, 91, 147, 0.18);
	--qpm-purple:      #7c3aed;
	--qpm-gray:        #f7f7f7;
	--qpm-border:      #ececec;
	--qpm-radius:      28px;
	--qpm-radius-sm:   16px;
	--qpm-shadow:      0 12px 40px rgba(0, 0, 0, 0.06);
	--qpm-shadow-hover:0 24px 60px rgba(255, 91, 147, 0.14);
	--qpm-transition:  300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────── */

.qpm-grid,
.qpm-card,
.qpm-archive,
.qpm-single,
.qpm-related,
.qpm-pagination {
	box-sizing: border-box;
}

.qpm-card *,
.qpm-single *,
.qpm-archive *,
.qpm-related * {
	box-sizing: inherit;
}

/* Guard against theme SVG resets making the play icon huge */
.qpm-card__play svg,
.qpm-back-link svg {
	display: block;
	width: 48px;
	height: 48px;
	max-width: 48px;
	flex-shrink: 0;
}

.qpm-back-link svg {
	width: 16px;
	height: 16px;
	max-width: 16px;
}

/* ── Grid ───────────────────────────────────────────────── */

.qpm-grid {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	width: 100%;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 960px) {
	.qpm-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.qpm-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

/* ── Card ───────────────────────────────────────────────── */

.qpm-card {
	background: var(--qpm-white);
	border-radius: var(--qpm-radius);
	box-shadow: var(--qpm-shadow);
	overflow: hidden;
	transition:
		transform var(--qpm-transition),
		box-shadow var(--qpm-transition);
	display: flex;
	flex-direction: column;
}

.qpm-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--qpm-shadow-hover);
}

/* YouTube iframe embed in card */
.qpm-card__video {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	background: #000;
	border-radius: var(--qpm-radius) var(--qpm-radius) 0 0;
}

.qpm-card__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

/* Fallback: featured image (no YouTube URL) */
.qpm-card__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--qpm-gray);
}

.qpm-card__media--empty {
	aspect-ratio: 16 / 9;
	background: var(--qpm-gray);
}

.qpm-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform var(--qpm-transition);
}

.qpm-card:hover .qpm-card__img {
	transform: scale(1.04);
}

.qpm-card__body {
	padding: 24px 28px 28px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.qpm-card__stars {
	display: flex;
}

.qpm-card__title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.qpm-card__title a {
	color: var(--qpm-text);
	text-decoration: none;
	transition: color var(--qpm-transition);
}

.qpm-card__title a:hover {
	color: var(--qpm-pink);
}

.qpm-card__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	color: var(--qpm-text-muted);
}

.qpm-card__artist {
	font-weight: 600;
	color: var(--qpm-text);
}

.qpm-card__sep {
	color: var(--qpm-border);
}

.qpm-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: auto;
	padding-top: 6px;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--qpm-pink);
	text-decoration: none;
	letter-spacing: 0.01em;
	transition: gap var(--qpm-transition);
}

.qpm-card__cta:hover {
	gap: 8px;
}

/* ── Stars — static (cards) ─────────────────────────────── */

.qpm-stars--static {
	display: flex;
	gap: 2px;
}

.qpm-stars--static .qpm-star {
	font-size: 12px;
	color: var(--qpm-border);
	line-height: 1;
}

.qpm-stars--static .qpm-star--filled {
	color: var(--qpm-pink);
}

/* ── Stars — interactive (single) ──────────────────────── */

.qpm-stars--interactive {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.qpm-stars__row {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}

.qpm-stars--interactive .qpm-star {
	background: none;
	border: none;
	padding: 2px;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: var(--qpm-border);
	transition: color var(--qpm-transition), transform var(--qpm-transition);
}

.qpm-stars--interactive .qpm-star:focus-visible {
	outline: 2px solid var(--qpm-pink);
	outline-offset: 2px;
	border-radius: 4px;
}

.qpm-stars--interactive .qpm-star--filled,
.qpm-stars--interactive .qpm-star--hover {
	color: var(--qpm-pink);
	transform: scale(1.15);
}

.qpm-stars--interactive .qpm-star:disabled {
	cursor: default;
}

.qpm-stars__info {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
	color: var(--qpm-text-muted);
}

.qpm-stars__avg {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--qpm-text);
	letter-spacing: -0.03em;
}

.qpm-stars__empty {
	font-style: italic;
	color: var(--qpm-text-muted);
}

.qpm-stars__message {
	font-size: 0.85rem;
	font-weight: 600;
	min-height: 1.2em;
	transition: opacity var(--qpm-transition);
}

.qpm-stars__message--success {
	color: #16a34a;
}

.qpm-stars__message--error {
	color: var(--qpm-pink);
}

/* ── Archive ────────────────────────────────────────────── */

.qpm-archive__filters {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 36px;
	flex-wrap: wrap;
}

.qpm-filter-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.qpm-filter-label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--qpm-text-muted);
	white-space: nowrap;
}

.qpm-select-wrap {
	position: relative;
}

.qpm-select-wrap::after {
	content: '';
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid var(--qpm-text-muted);
	pointer-events: none;
}

.qpm-select {
	appearance: none;
	background: var(--qpm-white);
	border: 1.5px solid var(--qpm-border);
	border-radius: var(--qpm-radius-sm);
	padding: 9px 36px 9px 16px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--qpm-text);
	cursor: pointer;
	transition: border-color var(--qpm-transition);
	font-family: inherit;
}

.qpm-select:focus {
	outline: none;
	border-color: var(--qpm-pink);
}

.qpm-archive__empty {
	text-align: center;
	padding: 80px 20px;
	color: var(--qpm-text-muted);
	font-size: 1rem;
}

/* ── Pagination ─────────────────────────────────────────── */

.qpm-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 56px;
	flex-wrap: wrap;
}

.qpm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	border-radius: 12px;
	background: var(--qpm-white);
	border: 1.5px solid var(--qpm-border);
	color: var(--qpm-text);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	transition: all var(--qpm-transition);
	font-family: inherit;
}

.qpm-pagination .page-numbers:hover {
	border-color: var(--qpm-pink);
	color: var(--qpm-pink);
	background: var(--qpm-white);
}

.qpm-pagination .page-numbers.current {
	background: var(--qpm-pink);
	border-color: var(--qpm-pink);
	color: #fff;
}

.qpm-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

/* ── Single ─────────────────────────────────────────────── */

.qpm-single {
	padding: 0 0 80px;
}

.qpm-single__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.qpm-single__back {
	padding: 32px 0 24px;
}

.qpm-back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--qpm-text-muted);
	text-decoration: none;
	letter-spacing: 0.01em;
	transition: color var(--qpm-transition);
}

.qpm-back-link:hover {
	color: var(--qpm-pink);
}

.qpm-single__layout {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 56px;
	align-items: start;
}

/* ── Single — main (left) ───────────────────────────────── */

.qpm-single__main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 36px;
}

.qpm-single__hero {
	border-radius: var(--qpm-radius);
	overflow: hidden;
	box-shadow: var(--qpm-shadow);
}

.qpm-single__hero-img {
	width: 100%;
	height: auto;
	display: block;
}

.qpm-single__header {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.qpm-single__genres {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.qpm-genre-tag {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 100px;
	background: var(--qpm-gray);
	color: var(--qpm-purple);
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: background var(--qpm-transition), color var(--qpm-transition);
}

.qpm-genre-tag:hover {
	background: var(--qpm-purple);
	color: #fff;
}

.qpm-single__title {
	margin: 0;
	font-size: clamp(2.4rem, 5vw, 3.8rem);
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: var(--qpm-text);
}

.qpm-single__byline {
	display: flex;
	align-items: center;
	gap: 12px;
}

.qpm-single__avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid var(--qpm-border);
}

.qpm-single__byline-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.qpm-single__artist {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--qpm-text);
}

.qpm-single__date {
	font-size: 0.82rem;
	color: var(--qpm-text-muted);
}

/* ── YouTube embed ──────────────────────────────────────── */

.qpm-video-wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 24px;
	box-shadow: var(--qpm-shadow);
	background: #000;
}

.qpm-video-wrapper iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: 24px;
}

/* ── Single content ─────────────────────────────────────── */

.qpm-single__content {
	font-size: 1.05rem;
	line-height: 1.75;
	color: var(--qpm-text);
}

.qpm-single__content p {
	margin: 0 0 1.4em;
}

.qpm-single__content p:last-child {
	margin-bottom: 0;
}

.qpm-single__content a {
	color: var(--qpm-pink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ── Rating section ─────────────────────────────────────── */

.qpm-single__rating-section {
	background: var(--qpm-gray);
	border-radius: var(--qpm-radius);
	padding: 36px 40px;
}

.qpm-single__rating-title {
	margin: 0 0 20px;
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--qpm-text);
	letter-spacing: -0.02em;
}

/* ── Sidebar (right) ────────────────────────────────────── */

.qpm-single__sidebar {
	position: sticky;
	top: 32px;
}

/* ── Related ────────────────────────────────────────────── */

.qpm-related {
	background: var(--qpm-white);
	border-radius: var(--qpm-radius);
	box-shadow: var(--qpm-shadow);
	padding: 32px 28px;
}

.qpm-related__title {
	margin: 0 0 24px;
	font-size: 1.15rem;
	font-weight: 900;
	color: var(--qpm-pink);
	letter-spacing: -0.02em;
}

.qpm-related__list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.qpm-related__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	text-decoration: none;
	border-bottom: 1px solid var(--qpm-border);
	transition: background var(--qpm-transition);
	border-radius: 8px;
}

.qpm-related__item:last-child {
	border-bottom: none;
}

.qpm-related__item:hover .qpm-related__item-title {
	color: var(--qpm-pink);
}

.qpm-related__thumb {
	width: 64px;
	height: 64px;
	border-radius: 12px;
	overflow: hidden;
	flex-shrink: 0;
	background: var(--qpm-gray);
}

.qpm-related__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.qpm-related__info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.qpm-related__item-title {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--qpm-text);
	line-height: 1.3;
	transition: color var(--qpm-transition);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.qpm-related__item-artist {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--qpm-text-muted);
}

.qpm-related__item-date {
	font-size: 0.75rem;
	color: var(--qpm-border);
}

/* ── Responsive — single ────────────────────────────────── */

@media (max-width: 960px) {
	.qpm-single__layout {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.qpm-single__sidebar {
		position: static;
	}
}

@media (max-width: 560px) {
	.qpm-single__inner {
		padding: 0 16px;
	}

	.qpm-single__title {
		font-size: 2rem;
	}

	.qpm-single__rating-section {
		padding: 24px 20px;
	}

	.qpm-related {
		padding: 24px 20px;
	}

	.qpm-stars--interactive .qpm-star {
		font-size: 22px;
	}
}
