/* ==========================================================================
   Music Tracks - Public Styles
   Modern, compact, responsive (Spotify / Apple Music inspired).
   ========================================================================== */

.music-tracks-shortcode {
	--mt-gap: 12px;
	--mt-radius: 8px;
	--mt-bg: #ffffff;
	--mt-bg-hover: rgba(0, 0, 0, 0.025);
	--mt-border: #e5e7eb;
	--mt-text: #111827;
	--mt-muted: #6b7280;
	--mt-accent: #2563eb;
	--mt-accent-wa: #25d366;
	--mt-accent-ig: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	width: 80%;
	max-width: 1100px;
	margin: 24px auto;
	color: var(--mt-text);
	font-family: inherit;
	box-sizing: border-box;
}

@media (max-width: 768px) {
	.music-tracks-shortcode {
		width: 92%;
	}
}

.music-tracks-shortcode *,
.music-tracks-shortcode *::before,
.music-tracks-shortcode *::after {
	box-sizing: border-box;
}

/* Empty state */
.mt-empty {
	padding: 24px;
	text-align: center;
	color: var(--mt-muted);
	border: 1px dashed var(--mt-border);
	border-radius: var(--mt-radius);
}

/* ==========================================================================
   Category grouping (shortcode-grouped layout)
   ========================================================================== */
.mt-grouped .mt-category {
	margin-bottom: 28px;
	padding-bottom: 8px;
}

.mt-grouped .mt-category:last-child {
	margin-bottom: 0;
}

.mt-grouped .mt-category-title {
	margin: 0 0 12px 0;
	padding: 0 14px;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--mt-text);
	border-left: 4px solid var(--mt-accent);
	background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), transparent);
	border-radius: 0 var(--mt-radius) var(--mt-radius) 0;
}

@media (max-width: 720px) {
	.mt-grouped .mt-category-title {
		font-size: 1.1rem;
		padding: 0 10px;
	}
}

.mt-grouped .mt-category-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.mt-grouped .mt-category-title a:hover,
.mt-grouped .mt-category-title a:focus-visible {
	color: var(--mt-accent);
	outline: none;
}

/* ==========================================================================
   Track categories nav (single track page)
   ========================================================================== */
.mt-track-categories {
	width: 80%;
	max-width: 1100px;
	margin: 4px auto 24px;
	padding: 0 14px;
	font-size: 0.85rem;
	color: var(--mt-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.mt-track-categories-label {
	font-weight: 600;
	color: var(--mt-text);
	margin-right: 4px;
}

.mt-track-category-link {
	display: inline-block;
	padding: 4px 12px;
	background: rgba(37, 99, 235, 0.08);
	color: var(--mt-accent);
	border-radius: 999px;
	text-decoration: none;
	font-weight: 500;
	transition: background 0.15s ease, transform 0.15s ease;
}

.mt-track-category-link:hover,
.mt-track-category-link:focus-visible {
	background: rgba(37, 99, 235, 0.18);
	color: var(--mt-accent);
	transform: translateY(-1px);
	outline: none;
}

@media (max-width: 768px) {
	.mt-track-categories {
		width: 92%;
	}
}

/* ==========================================================================
   Wrapper — always single column (no multi-column flow).
   ========================================================================== */
.mt-layout-list,
.mt-layout-grid {
	display: block;
	width: 100%;
}

/* ==========================================================================
   Track row — flat, compact, modern.
   Horizontal layout: [cover] [meta] [player] [share]
   Minimal height (~72px desktop), row separators instead of boxes.
   ========================================================================== */
.mt-track {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 14px;
	min-height: 56px;
	background: var(--mt-bg);
	border-bottom: 1px solid var(--mt-border);
	transition: background 0.15s ease;
	width: 100%;
}

.mt-track:first-child {
	border-top-left-radius: var(--mt-radius);
	border-top-right-radius: var(--mt-radius);
}

.mt-track:last-child {
	border-bottom: none;
	border-bottom-left-radius: var(--mt-radius);
	border-bottom-right-radius: var(--mt-radius);
}

.mt-track:hover {
	background: var(--mt-bg-hover);
}

/* Grid variant: slightly taller row + bigger cover (Spotify “now playing” vibe). */
.mt-layout-grid .mt-track {
	min-height: 64px;
	padding: 8px 14px;
}

/* ==========================================================================
   Cover
   ========================================================================== */
.mt-cover {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 4px;
	overflow: hidden;
	background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.mt-layout-grid .mt-cover {
	width: 48px;
	height: 48px;
	border-radius: 6px;
}

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

/* ==========================================================================
   Meta — title + artist, single line truncation
   ========================================================================== */
.mt-meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	padding: 0 4px;
}

.music-tracks-shortcode .mt-title {
	margin: 0 !important;
	padding: 0;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.15;
	color: var(--mt-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.music-tracks-shortcode .mt-artist {
	margin: 0 !important;
	padding: 0;
	font-size: 0.78rem;
	line-height: 1.2;
	color: var(--mt-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.music-tracks-shortcode .mt-album {
	margin: 0 !important;
	padding: 0;
	font-size: 0.72rem;
	line-height: 1.2;
	color: var(--mt-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: flex;
	align-items: baseline;
	gap: 4px;
}

.music-tracks-shortcode .mt-album-label {
	flex: 0 0 auto;
	opacity: 0.85;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	font-size: 0.65rem;
}

.music-tracks-shortcode .mt-album-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	font-style: italic;
}

.music-tracks-shortcode p {
	margin: 0 !important;
}

/* Duration text is redundant — Plyr shows it. Hide it. */
.mt-duration {
	display: none;
}

/* ==========================================================================
   Player — compact inline Plyr
   ========================================================================== */
.mt-player-wrap {
	flex: 0 1 320px;
	min-width: 180px;
}

/* Shrink Plyr to fit the compact row. */
.mt-player-wrap .plyr {
	border-radius: 6px;
	background: transparent;
	padding: 0;
}

.mt-player-wrap .plyr__controls {
	padding: 2px 6px;
	min-height: 36px;
}

.mt-player-wrap .plyr__control {
	padding: 4px;
}

.mt-player-wrap .plyr__control[data-plyr="play"] {
	background: var(--mt-accent);
	color: #fff;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	min-width: 28px;
	padding: 0;
	margin-right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mt-player-wrap .plyr__control[data-plyr="play"] svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	margin: 0 auto;
}

.mt-player-wrap .plyr__control[data-plyr="play"]:hover {
	background: var(--mt-accent);
	opacity: 0.9;
}

.mt-player-wrap .plyr__progress {
	flex: 1 1 auto;
	min-width: 50px;
}

.mt-player-wrap .plyr__time {
	font-size: 0.7rem;
	color: var(--mt-muted);
	padding-left: 6px;
	padding-right: 2px;
}

/* ==========================================================================
   Share — compact icons at the right
   ========================================================================== */
.mt-share {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: 4px;
}

.mt-share a,
.mt-share button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	padding: 0;
	background: transparent;
	transition: transform 0.15s ease, background 0.15s ease;
	text-decoration: none;
}

.mt-share a:hover,
.mt-share button:hover,
.mt-share a:focus-visible,
.mt-share button:focus-visible {
	transform: scale(1.08);
	outline: none;
}

.mt-share-wa {
	background: rgba(37, 211, 102, 0.10);
}

.mt-share-wa:hover,
.mt-share-wa:focus-visible {
	background: rgba(37, 211, 102, 0.22);
}

.mt-share-ig {
	background: rgba(225, 48, 108, 0.10);
}

.mt-share-ig:hover,
.mt-share-ig:focus-visible {
	background: rgba(225, 48, 108, 0.20);
}

.mt-share img {
	width: 18px;
	height: 18px;
	display: block;
}

/* ==========================================================================
   Inline feedback (shown next to the IG button after click)
   ========================================================================== */
.mt-share-feedback {
	display: inline-flex;
	align-items: center;
	margin-left: 6px;
	padding: 3px 10px;
	font-size: 0.74rem;
	font-weight: 500;
	color: #be185d;
	background: rgba(225, 48, 108, 0.10);
	border-radius: 999px;
	white-space: nowrap;
	animation: mt-fade-in 200ms ease-out;
}

@keyframes mt-fade-in {
	from { opacity: 0; transform: translateY(-2px); }
	to   { opacity: 1; transform: translateY(0); }
}

.mt-flash {
	animation: mt-flash 400ms ease-out;
}

@keyframes mt-flash {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.18); }
	100% { transform: scale(1); }
}

/* ==========================================================================
   Plyr accent color
   ========================================================================== */
.plyr--audio .plyr__control.plyr__tab-focus,
.plyr--audio .plyr__control:hover,
.plyr--audio .plyr__control[aria-expanded="true"] {
	background: var(--mt-accent);
	color: #fff;
}

.plyr--full-ui input[type="range"] {
	color: var(--mt-accent);
}

/* ==========================================================================
   Responsive — stack on small screens
   ========================================================================== */
@media (max-width: 720px) {
	.mt-track {
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px;
		min-height: 0;
	}

	.mt-cover {
		width: 44px;
		height: 44px;
	}

	.mt-meta {
		flex: 1 1 calc(100% - 60px);
	}

	.mt-player-wrap {
		flex: 1 0 100%;
		order: 3;
		min-width: 0;
	}

	.mt-share {
		order: 2;
		margin-left: auto;
	}

	.mt-layout-grid .mt-track {
		padding: 12px;
	}
}

@media (max-width: 420px) {
	.mt-track {
		padding: 10px;
		gap: 8px;
	}
}