/* Favorites — heart button (cards + single page) */

.psy-favorite {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba( 5, 0, 51, 0.55 );
	color: rgba( 255, 255, 255, 0.85 );
	cursor: pointer;
	transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
	backdrop-filter: blur( 6px );
	-webkit-backdrop-filter: blur( 6px );
}

.psy-favorite:hover {
	background: rgba( 5, 0, 51, 0.8 );
	color: #fff;
	transform: scale( 1.08 );
}

.psy-favorite:active {
	transform: scale( 0.94 );
}

.psy-favorite:focus-visible {
	outline: 2px solid #E54ADA;
	outline-offset: 2px;
}

.psy-favorite__icon {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	transition: transform 0.2s ease;
}

.psy-favorite.is-active {
	color: #E54ADA;
	background: rgba( 5, 0, 51, 0.75 );
}

.psy-favorite.is-active .psy-favorite__icon {
	fill: #E54ADA;
	stroke: #E54ADA;
	animation: psy-fav-pop 0.32s ease;
}

@keyframes psy-fav-pop {
	0%   { transform: scale( 0.6 ); }
	60%  { transform: scale( 1.18 ); }
	100% { transform: scale( 1 ); }
}

/* Card variant — absolute top-right corner */
.psy-favorite--card {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
}

/* Single profile variant — inline in hero icons row */
.psy-favorite--single {
	width: 44px;
	height: 44px;
	background: rgba( 255, 255, 255, 0.06 );
	border: 1px solid rgba( 255, 255, 255, 0.12 );
}

.psy-favorite--single .psy-favorite__icon {
	width: 22px;
	height: 22px;
}

/* Card containers need relative positioning for the heart to anchor. */
.psy-explore__card { position: relative; }

/* =========================================================================
   Favorites tab — pill filter row, card grid, undo toast, empty state, CTA.
   Used inside the [psy_account] Favorites tab.
   ========================================================================= */

.psy-favorites-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 22px;
}

/* Mobile dropdown alternative — desktop default keeps the select hidden so
 * the pill row remains the primary UI; the @media block below swaps them. */
.psy-favorites-select { display: none; }

/* Screen-reader-only utility for the dropdown's visible-for-AT label.
 * Mirrors `.psy-sr-only` defined in single-music-artist.css so the favorites
 * tab can use the same class without depending on that asset bundle. */
.psy-favorites-select .psy-sr-only,
.psy-explore__cats-select .psy-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.psy-favorites-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid rgba( 255, 255, 255, 0.18 );
	background: rgba( 20, 8, 50, 0.55 );
	color: rgba( 255, 255, 255, 0.85 );
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.psy-favorites-pill:hover {
	border-color: rgba( 229, 74, 218, 0.6 );
	color: #fff;
}

.psy-favorites-pill.is-active {
	background: linear-gradient( 135deg, #ff43c8 0%, #b328ff 100% );
	border-color: transparent;
	color: #fff;
}

.psy-favorites-pill__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.15 );
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.psy-favorites-pill.is-active .psy-favorites-pill__count {
	background: rgba( 255, 255, 255, 0.28 );
}

.psy-favorites-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 360px, 1fr ) );
	gap: 16px;
}

.psy-fav-card {
	position: relative;
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 14px;
	padding: 16px;
	background: #140D42;
	border: 1px solid #1A0F5C;
	border-radius: 16px;
	overflow: hidden;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Explicit display:grid above wins over the [hidden] default `display:none`,
 * so the pill filter must rely on this rule instead of the HTML attribute. */
.psy-fav-card[hidden] { display: none !important; }

.psy-fav-card.is-removing {
	opacity: 0.35;
	transform: scale( 0.985 );
	pointer-events: none;
}

.psy-fav-card__media {
	display: block;
	width: 110px;
	height: 110px;
	border-radius: 12px;
	overflow: hidden;
	background: rgba( 255, 255, 255, 0.04 );
}

.psy-fav-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.psy-fav-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient( 135deg, rgba( 229, 74, 218, 0.35 ), rgba( 108, 43, 255, 0.35 ) );
}

.psy-fav-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	padding-right: 44px; /* leave room for the heart */
}

.psy-fav-card__title {
	margin: 0;
	font-family: 'Open Sans', system-ui, sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
}

.psy-fav-card__title a {
	color: inherit;
	text-decoration: none;
}

.psy-fav-card__title a:hover { color: #ff7be0; }

.psy-fav-card__sub {
	margin: 0;
	color: #E54ADA;
	font-size: 13px;
	font-weight: 600;
}

.psy-fav-card__loc {
	margin: 0 0 8px;
	color: rgba( 255, 255, 255, 0.55 );
	font-size: 12px;
}

.psy-fav-card__msg {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	padding: 8px 18px;
	border-radius: 999px;
	background: linear-gradient( 135deg, #ff43c8 0%, #b328ff 100% );
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	margin-top: auto;
	transition: transform 0.18s ease;
}

.psy-fav-card__msg:hover {
	transform: translateY( -1px );
	color: #fff !important;
}

@media (max-width: 980px) {
	/* Single-column grid below the desktop breakpoint so the cards always fit
	 * the dashboard main column without horizontal overflow. */
	.psy-favorites-grid { grid-template-columns: 1fr; }
	.psy-fav-card { min-width: 0; max-width: 100%; }
	.psy-fav-card__body { padding-right: 36px; }

	/* Swap the pill row for the native dropdown so the filter doesn't push
	 * the whole list off-screen on narrow viewports. */
	.psy-favorites-pills { display: none; }
	.psy-favorites-select {
		display: block;
		margin: 0 0 18px;
	}
	.psy-favorites-select select {
		width: 100%;
		padding: 12px 38px 12px 16px;
		border-radius: 999px;
		border: 1px solid rgba(255, 255, 255, 0.18);
		background: rgba(20, 8, 50, 0.55);
		color: #fff;
		font-family: 'Inter', system-ui, sans-serif;
		font-size: 14px;
		font-weight: 600;
		appearance: none;
		-webkit-appearance: none;
		-moz-appearance: none;
		background-image:
			linear-gradient(45deg, transparent 50%, #ff7be0 50%),
			linear-gradient(135deg, #ff7be0 50%, transparent 50%);
		background-position:
			calc(100% - 18px) calc(50% - 2px),
			calc(100% - 13px) calc(50% - 2px);
		background-size: 5px 5px;
		background-repeat: no-repeat;
	}
	.psy-favorites-select select:focus-visible {
		outline: 2px solid #ff43c8;
		outline-offset: 2px;
	}
}

@media (max-width: 520px) {
	.psy-fav-card { grid-template-columns: 84px 1fr; padding: 12px; gap: 10px; }
	.psy-fav-card__media { width: 84px; height: 84px; }
	.psy-fav-card__title { font-size: 16px; }
	.psy-fav-card__body { padding-right: 32px; }
	.psy-fav-card__msg { padding: 6px 14px; font-size: 12px; }
}

/* ---- Undo toast ---- */
.psy-favorites-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX( -50% );
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 12px 18px;
	background: rgba( 14, 6, 38, 0.96 );
	border: 1px solid rgba( 255, 255, 255, 0.14 );
	border-radius: 999px;
	color: #fff;
	font-size: 13px;
	box-shadow: 0 12px 28px rgba( 0, 0, 0, 0.45 );
	z-index: 9999;
	opacity: 0;
	transition: opacity 0.18s ease;
}

.psy-favorites-toast.is-visible { opacity: 1; }

.psy-favorites-toast__undo {
	background: transparent;
	border: 0;
	color: #ff7be0;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 12px;
	cursor: pointer;
	padding: 0;
}

.psy-favorites-toast__undo:hover { color: #fff; }

/* ---- Empty state ---- */
.psy-favorites-empty { text-align: center; padding: 36px 24px; }
.psy-favorites-empty h2 { margin: 0 0 8px; font-size: 22px; }
.psy-favorites-empty p { color: rgba( 255, 255, 255, 0.7 ); margin: 0 0 18px; }

/* ---- CTA banner under the grid (Figma spec: 1px inside stroke E54ADA@40%,
   radius 18, padding 20, title Open Sans Bold 20, button outline pill). ---- */
.psy-favorites-cta {
	margin-top: 28px;
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	border: 1px solid rgba( 229, 74, 218, 0.4 );
	border-radius: 18px;
	background:
		linear-gradient( 135deg, rgba( 229, 74, 218, 0.18 ), rgba( 108, 43, 255, 0.18 ) ),
		rgba( 14, 6, 38, 0.6 );
}

.psy-favorites-cta__text { flex: 1 1 320px; min-width: 0; }
.psy-favorites-cta__text h3 {
	margin: 0 0 4px;
	font-family: 'Open Sans', system-ui, sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	color: #fff;
	text-transform: none;
}
.psy-favorites-cta__text p {
	margin: 0;
	color: rgba( 255, 255, 255, 0.7 );
	font-family: 'Open Sans', system-ui, sans-serif;
	font-size: 13px;
	line-height: 1.4;
}

@media (max-width: 520px) {
	.psy-favorites-cta { padding: 18px; gap: 14px; }
	.psy-favorites-cta__text h3 { font-size: 18px; }
}
