/**
 * Frontend Styles for WPsite Podcasts Widget
 */
.wpsite-podcasts-widget {
	direction: rtl;
	font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Filters Section */
.wpsite-podcasts-filters {
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 24px 16px 24px;
	position: relative;
}

.wpsite-podcasts-filters-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wpsite-podcasts-search {
	position: relative;
	width: 100%;
	margin: 0 0 0 auto;
}

/* Match search width to card width at different breakpoints */
@media (min-width: 1024px) {
	.wpsite-podcasts-search {
		max-width: calc((100% - 80px) / 3);
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.wpsite-podcasts-search {
		max-width: calc((100% - 40px) / 2);
	}
}

.wpsite-podcasts-search-input {
	width: 100%;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 12px 16px 12px 40px;
	font-size: 16px;
	outline: none;
	transition: all 0.3s ease;
}

.wpsite-podcasts-search-input:focus {
	border-color: #f59e0b;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.wpsite-podcasts-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	color: #9ca3af;
	pointer-events: none;
}

/* Grid Container */
.wpsite-podcasts-grid-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

.wpsite-podcasts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

@media (min-width: 768px) {
	.wpsite-podcasts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.wpsite-podcasts-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Podcast Card */
.wpsite-podcast-card {
	background: #fff;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	border: 1px solid #f3f4f6;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.wpsite-podcast-card:hover {
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	transform: translateY(-4px);
}

.wpsite-podcast-card-image {
	position: relative;
	height: 256px;
	overflow: hidden;
}

.wpsite-podcast-card-image.wpsite-podcast-card-clickable {
	cursor: pointer;
}

.wpsite-podcast-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.wpsite-podcast-card:hover .wpsite-podcast-card-image img {
	transform: scale(1.05);
}

.wpsite-podcast-card-image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wpsite-podcast-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.2);
	transition: background 0.3s ease;
	pointer-events: none;
}

.wpsite-podcast-card:hover .wpsite-podcast-card-overlay {
	background: rgba(0, 0, 0, 0.4);
}

.wpsite-podcast-card-meta-badge {
	position: absolute;
	bottom: 16px;
	right: 16px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(8px);
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 700;
	color: #111827;
}

.wpsite-podcast-card-content {
	padding: 24px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.wpsite-podcast-card-guest {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
}

.wpsite-podcast-guest-avatar {
	width: 32px;
	height: 32px;
	min-width: 32px;
	min-height: 32px;
	border-radius: 50% !important;
	object-fit: cover;
	border: 2px solid rgba(245, 158, 11, 0.3);
	display: block;
	flex-shrink: 0;
	overflow: hidden;
}

.wpsite-podcast-guest-name {
	font-size: 12px;
	font-weight: 700;
	color: #111827;
}

.wpsite-podcast-card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #f59e0b;
}

.wpsite-podcast-category {
	color: #f59e0b;
}

.wpsite-podcast-meta-separator {
	color: #d1d5db;
	font-weight: 300;
}

.wpsite-podcast-date {
	color: #9ca3af;
	font-weight: 500;
}

.wpsite-podcast-card-title {
	font-size: 24px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 20px 0;
	line-height: 1.3;
}

.wpsite-podcast-card-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.wpsite-podcast-card:hover .wpsite-podcast-card-title a {
	color: #f59e0b;
}

.wpsite-podcast-card-excerpt {
	color: #4b5563;
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 20px;
	flex-grow: 1;
}

.wpsite-podcast-card-links {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid #f3f4f6;
}

.wpsite-podcast-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.3s ease;
}

.wpsite-podcast-link svg {
	width: 16px;
	height: 16px;
}

.wpsite-podcast-link-spotify {
	background: rgba(29, 185, 84, 0.1);
	color: #1db954;
}

.wpsite-podcast-link-spotify:hover {
	background: #1db954;
	color: #fff;
}

.wpsite-podcast-link-youtube {
	background: rgba(255, 0, 0, 0.1);
	color: #ff0000;
}

.wpsite-podcast-link-youtube:hover {
	background: #ff0000;
	color: #fff;
}

/* Load More Button */
.wpsite-podcasts-load-more-container {
	text-align: center;
	margin-top: 64px;
}

.wpsite-podcasts-load-more {
	padding: 16px 40px;
	background: #000;
	color: #fff;
	border-radius: 9999px;
	font-weight: 700;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.wpsite-podcasts-load-more:hover {
	background: #374151;
	transform: translateY(-2px);
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.wpsite-podcasts-load-more:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* No Results */
.wpsite-podcasts-no-results {
	text-align: center;
	padding: 64px 20px;
	color: #6b7280;
	font-size: 18px;
	grid-column: 1 / -1;
}

/* Hidden class for filtering */
.wpsite-podcast-card.hidden {
	display: none;
}

/* YouTube Lightbox */
.wpsite-youtube-lightbox-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}

.wpsite-youtube-lightbox-container.active {
	display: flex;
}

.wpsite-youtube-lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	cursor: pointer;
}

.wpsite-youtube-lightbox-content {
	position: relative;
	width: 90%;
	max-width: 960px;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	z-index: 1;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.wpsite-youtube-lightbox-close {
	position: absolute;
	top: -40px;
	right: 0;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: opacity 0.3s ease;
}

.wpsite-youtube-lightbox-close:hover {
	opacity: 0.7;
}

.wpsite-youtube-lightbox-video-wrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
}

.wpsite-youtube-lightbox-iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

body.wpsite-lightbox-open {
	overflow: hidden;
}

/* Responsive */
@media (max-width: 767px) {
	.wpsite-podcasts-filters {
		padding: 16px;
	}

	.wpsite-youtube-lightbox-content {
		width: 95%;
	}

	.wpsite-youtube-lightbox-close {
		top: -45px;
		font-size: 32px;
	}
}
