/**
 * Frontend Styles for Playlist Plugin
 */

/* Playlist Header - Cover Image & Social Buttons */
.playlist-header {
	margin: 2em 0;
}

.playlist-header-content {
	display: flex;
}

.playlist-cover-image {
	flex: 0 0 50%;
	max-width: 50%;
}

.playlist-cover-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	display: block;
}

.playlist-social-buttons {
	flex: 0 0 50%;
	max-width: 50%;
	display: flex;
	gap: 0.75em;
	align-items: flex-start;
	justify-content: end;
}

.playlist-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #ddd;
	text-decoration: none;
	color: #333;
	transition: all 0.3s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.playlist-social-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.playlist-social-btn .social-icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Social-specific hover colors */
.playlist-social-instagram:hover {
	border-color: #bc1888;
	color: #bc1888;
}

.playlist-social-facebook:hover {
	border-color: #1877f2;
	color: #1877f2;
}

.playlist-social-soundcloud:hover {
	border-color: #ff5500;
	color: #ff5500;
}

.playlist-social-tiktok:hover {
	border-color: #000000;
	color: #000000;
}

.playlist-social-twitter:hover {
	border-color: #1da1f2;
	color: #1da1f2;
}

.playlist-social-youtube:hover {
	border-color: #ff0000;
	color: #ff0000;
}

.playlist-social-pinterest:hover {
	border-color: #bd081c;
	color: #bd081c;
}

/* Hide theme's default featured image for playlist post type */
.single-playlist .post-thumbnail,
.single-playlist .entry-thumbnail,
.single-playlist .wp-post-image {
	display: none !important;
}

/* Responsive design for playlist header */
@media (max-width: 768px) {
	.playlist-header-content {
		flex-direction: column;
		gap: 1.5em;
	}
	
	.playlist-cover-image {
		flex: 0 0 100%;
		max-width: 100%;
	}
	
	.playlist-social-buttons {
		flex: 0 0 100%;
		max-width: 100%;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
	}
	
	.playlist-social-btn {
		width: 36px;
		height: 36px;
	}
	
	.playlist-social-btn .social-icon {
		width: 18px;
		height: 18px;
	}
}

/* Spotify Player Section */
.playlist-spotify-player {
	margin: 2em 0;
	padding: 1.5em;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.playlist-player-title {
	margin: 0 0 1em 0;
	font-size: 1.5em;
	font-weight: 600;
	color: #333;
}

.spotify-embed-wrapper {
	width: 100%;
	border-radius: 8px;
	overflow: hidden;
}

.spotify-embed-wrapper iframe {
	display: block;
	border: none;
	height: 460px;
}

/* Custom Audio Player */
.playlist-custom-player {
	margin: 2em 0;
	padding: 1.5em;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-player-container {
	max-width: 100%;
}

.player-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1em;
	margin-bottom: 1.5em;
}

.player-btn {
	background: #1db954;
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	padding: 0;
}

.player-btn:hover {
	background: #1ed760;
	transform: scale(1.1);
}

.player-btn:active {
	transform: scale(0.95);
}

.player-play-pause {
	width: 56px;
	height: 56px;
	background: #1db954;
}

.player-play-pause:hover {
	background: #1ed760;
}

.player-track-info {
	display: flex;
	align-items: center;
	gap: 1em;
	margin-bottom: 1.5em;
}

.player-track-cover {
	width: 80px;
	height: 80px;
	border-radius: 8px;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}

.player-track-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.player-cover-placeholder {
	font-size: 2em;
	color: #999;
}

.player-track-details {
	flex: 1;
	min-width: 0;
}

.player-track-name {
	font-size: 1.1em;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.25em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.player-track-artist {
	font-size: 0.9em;
	color: #666;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.player-progress-container {
	margin-top: 1em;
}

.player-progress-bar {
	width: 100%;
	height: 6px;
	background: #e0e0e0;
	border-radius: 3px;
	cursor: pointer;
	margin-bottom: 0.5em;
}

.player-progress {
	height: 100%;
	background: #1db954;
	border-radius: 3px;
	width: 0%;
	transition: width 0.1s linear;
}

.player-time {
	display: flex;
	justify-content: space-between;
	font-size: 0.85em;
	color: #666;
}

/* Tracklist */
/* Streaming Services Buttons */
.playlist-streaming-services {
	margin: 2em 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	align-items: center;
	justify-content: space-between;
}

.playlist-service-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.75em 1em;
	background: #fff;
	border: 2px solid #ddd;
	border-radius: 6px;
	text-decoration: none;
	color: #333;
	font-weight: 500;
	font-size: 0.95em;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.playlist-service-btn:hover {
	background: #f5f5f5;
	border-color: #2271b1;
	color: #2271b1;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.playlist-service-btn .service-icon {
	font-size: 1.2em;
	line-height: 1;
}

.playlist-service-btn .service-label {
	line-height: 1;
}

/* Service-specific colors */
.playlist-service-apple:hover {
	border-color: #fa243c;
	color: #fa243c;
}

.playlist-service-youtube:hover {
	border-color: #ff0000;
	color: #ff0000;
}

.playlist-service-amazon:hover {
	border-color: #ff9900;
	color: #ff9900;
}

.playlist-service-deezer:hover {
	border-color: #ff0092;
	color: #ff0092;
}

.playlist-service-tidal:hover {
	border-color: #000000;
	color: #000000;
}

.playlist-service-soundcloud:hover {
	border-color: #ff5500;
	color: #ff5500;
}

/* Answer Blocks (SEO / AEO) */
.playlist-answer-blocks {
	margin: 2em 0;
	padding: 1.5em 0;
}

.playlist-answer-blocks h2 {
	font-size: 1.75em;
	font-weight: 600;
	margin: 0 0 1.5em 0;
	color: #333;
	line-height: 1.3;
}

.playlist-answer-blocks h3 {
	font-size: 1.25em;
	font-weight: 600;
	margin: 1.5em 0 0.75em 0;
	color: #333;
	line-height: 1.4;
}

.playlist-answer-blocks h3:first-of-type {
	margin-top: 0;
}

.playlist-answer-blocks p {
	margin: 0 0 1.5em 0;
	color: #555;
	line-height: 1.7;
	font-size: 1em;
}

.playlist-answer-blocks p:last-child {
	margin-bottom: 0;
}

/* Responsive design for answer blocks */
@media (max-width: 768px) {
	.playlist-answer-blocks {
		margin: 1.5em 0;
		padding: 1em 0;
	}

	.playlist-answer-blocks h2 {
		font-size: 1.5em;
		margin-bottom: 1.25em;
	}

	.playlist-answer-blocks h3 {
		font-size: 1.15em;
		margin-top: 1.25em;
	}

	.playlist-answer-blocks p {
		font-size: 0.95em;
	}
}

/* Related Playlists */
.related-playlists {
	margin: 2em 0;
	padding: 1.5em 0;
}

.related-playlists h2 {
	font-size: 1.75em;
	font-weight: 600;
	margin: 0 0 1em 0;
	color: #333;
	line-height: 1.3;
}

.related-playlists ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.related-playlists li {
	margin-bottom: 0.75em;
	padding-left: 0;
}

.related-playlists li:before {
	content: none;
}

.related-playlists a {
	color: #2271b1;
	text-decoration: none;
	font-size: 1em;
	line-height: 1.6;
	transition: color 0.2s ease;
}

.related-playlists a:hover {
	color: #135e96;
	text-decoration: underline;
}

/* Responsive design for related playlists */
@media (max-width: 768px) {
	.related-playlists {
		margin: 1.5em 0;
		padding: 1em 0;
	}

	.related-playlists h2 {
		font-size: 1.5em;
		margin-bottom: 0.875em;
	}

	.related-playlists a {
		font-size: 0.95em;
	}
}

.playlist-tracklist {
	margin: 2em 0;
	padding: 1.5em;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tracklist-title {
	margin: 0 0 1em 0;
	font-size: 1.5em;
	font-weight: 600;
	color: #333;
}

.tracklist-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.track-item {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 1em;
	margin-bottom: 0.5em;
	margin-left: 0 !important;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	transition: all 0.3s ease;
}

.track-item:hover {
	background: #f8f9fa;
	border-color: #1db954;
}

.track-item.active {
	background: #f0f7ff;
	border-color: #1db954;
	box-shadow: 0 2px 8px rgba(29, 185, 84, 0.2);
}

.track-item.track-playable {
	cursor: pointer;
}

.track-cover {
	width: 60px;
	height: 60px;
	border-radius: 4px;
	overflow: hidden;
	flex-shrink: 0;
}

.track-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.track-info {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
	min-width: 0;
}

.track-position {
	font-weight: 600;
	color: #999;
	min-width: 30px;
}

.track-play-btn {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	text-align: left;
	flex: 1;
	min-width: 200px;
}

.track-title {
	font-weight: 600;
	color: #333;
	transition: color 0.3s ease;
}

.track-play-btn:hover .track-title {
	color: #1db954;
}

.track-artist {
	color: #666;
	font-size: 0.9em;
}

.track-album {
	color: #999;
	font-size: 0.85em;
}

.track-duration {
	color: #999;
	font-size: 0.85em;
	margin-left: auto;
}

/* Playlist Metadata Section */
.playlist-metadata {
	margin: 2em 0;
	padding: 1.5em;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.playlist-description {
	margin-bottom: 1.5em;
	font-size: 1em;
	line-height: 1.6;
	color: #555;
}

.playlist-description p {
	margin: 0 0 1em 0;
}

.playlist-description p:last-child {
	margin-bottom: 0;
}

.playlist-meta-info {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	padding-top: 1.5em;
	border-top: 1px solid #e0e0e0;
}

.playlist-meta-item {
	display: flex;
	align-items: baseline;
	gap: 0.5em;
	flex-wrap: wrap;
}

.playlist-meta-label {
	font-weight: 600;
	font-size: 1em;
	color: #333;
}

.playlist-meta-value {
	color: #666;
	font-size: 1em;
	line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
	.playlist-metadata {
		padding: 1em;
	}

	.playlist-meta-info {
		gap: 0.5em;
	}

	.playlist-meta-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25em;
	}

	.playlist-meta-label,
	.playlist-meta-value {
		font-size: 0.9em;
	}
	.player-track-info {
		flex-direction: column;
		text-align: center;
	}

	.player-track-cover {
		margin: 0 auto;
	}

	.track-item {
		flex-wrap: wrap;
	}

	.track-info {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5em;
	}

	.track-position {
		order: -1;
	}

	.track-duration {
		margin-left: 0;
	}
}

