/**
 * PlugeTune video grid styles.
 *
 * Renders the [plugetune_grid] shortcode and its Elementor widget: the
 * responsive grid container, the video cards with thumbnail and play
 * overlay, the list layout, the pagination controls, and the
 * full-screen popup player.
 *
 * @package PlugeTune
 */

/* Grid container. */
.plugetune-video-grid a,
.plugetune-video-grid a:link,
.plugetune-video-grid a:visited,
.plugetune-video-grid a:hover,
.plugetune-video-grid a:focus,
.plugetune-video-grid a:active,
.plugetune-video-card a,
.plugetune-video-card a:link,
.plugetune-video-card a:visited,
.plugetune-video-card a:hover,
.plugetune-video-card a:focus,
.plugetune-video-card a:active,
.plugetune-slider-post-grid-wrapper a,
.plugetune-slider-post-grid-wrapper a:link,
.plugetune-slider-post-grid-wrapper a:visited,
.plugetune-slider-post-grid-wrapper a:hover,
.plugetune-slider-post-grid-wrapper a:focus,
.plugetune-slider-post-grid-wrapper a:active,
.plugetune-elementor-wrapper a,
.plugetune-elementor-wrapper a:link,
.plugetune-elementor-wrapper a:visited,
.plugetune-elementor-wrapper a:hover,
.plugetune-elementor-wrapper a:focus,
.plugetune-elementor-wrapper a:active {
	text-decoration: none;
}

.plugetune-video-grid {
	display: grid;
	column-gap: 24px;
	row-gap: 24px;
	margin: 20px 0;
	padding: 0;
	width: 100%;
	box-sizing: border-box;
}

/* Grid columns. */
.plugetune-grid-cols-1 {
	grid-template-columns: 1fr;
}

.plugetune-grid-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.plugetune-grid-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.plugetune-grid-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Video card. */
.plugetune-video-card {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
}

/* Default hover — overridden by Elementor inline CSS. */
.plugetune-video-card.plugetune-hover-lift:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Thumbnail. */
.plugetune-video-thumbnail {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #f0f2f5;
	flex-shrink: 0;
	width: 100%;
}

.plugetune-video-thumbnail a {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	position: relative;
}

.plugetune-video-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
	display: block;
}

.plugetune-video-card:hover .plugetune-video-thumbnail img {
	transform: scale(1.05);
}

/* Play overlay. */
.plugetune-video-play-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s ease;
	cursor: pointer;
	z-index: 2;
}

.plugetune-play-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	background: rgba(255, 0, 0, 0.85);
	border-radius: 50%;
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	transition: transform 0.3s ease, background 0.3s ease;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.plugetune-video-card:hover .plugetune-play-icon {
	transform: scale(1.1);
}

/* Video content. */
.plugetune-video-content {
	padding: 16px 18px 18px;
	flex: 1;
	display: flex;
	flex-direction: column;
	background: inherit;
}

/* Title. */
.plugetune-video-title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 8px 0;
	padding: 0;
}

.plugetune-video-title a {
	color: #1a1a2e;
	text-decoration: none;
	transition: color 0.2s ease;
}

.plugetune-video-title a:hover {
	color: #e50914;
}

/* Excerpt. */
.plugetune-video-excerpt {
	font-size: 14px;
	color: #6b7280;
	line-height: 1.6;
	margin: 0 0 12px 0;
	flex: 1;
}

/* Video footer - date on the left, button on the right. */
.plugetune-video-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
	padding-top: 10px;
	border-top: 1px solid #f0f2f5;
	width: 100%;
}

/* Date. */
.plugetune-video-date {
	font-size: 13px;
	color: #9ca3af;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	order: 1;
}

.plugetune-video-date i {
	font-size: 14px;
}

/* Watch button. */
.plugetune-video-read-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 16px;
	background: #e50914;
	color: #ffffff;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.3s ease, transform 0.2s ease;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	order: 2;
	margin-left: auto;
}

.plugetune-video-read-more:hover {
	background: #c40812;
	color: #ffffff;
	text-decoration: none;
	transform: translateX(2px);
}

.plugetune-video-read-more i {
	font-size: 12px;
	margin-left: 6px;
	display: inline-flex;
	align-items: center;
}

.plugetune-video-read-more svg {
	width: 12px;
	height: 12px;
	margin-left: 6px;
	fill: currentColor;
}

.plugetune-video-read-more:empty i,
.plugetune-video-read-more:empty svg {
	display: none;
}

/* Empty state. */
.plugetune-grid-empty {
	padding: 40px 20px;
	text-align: center;
	color: #6b7280;
	font-size: 16px;
	background: #f9fafb;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	width: 100%;
}

/* Pagination. */

/* Outer container. */
.plugetune-grid-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	width: 100%;
	margin-top: 30px;
	gap: 8px;
}

/* Inner container (numbers / prev-next). */
.plugetune-grid-pagination-numbers,
.plugetune-grid-pagination-prev-next {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

/* Page links. */
.plugetune-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: all 0.25s ease;
	line-height: 1;
	font-size: 14px;
	font-weight: 500;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	background: #f1f5f9;
	color: #333;
	border-radius: 6px;
	cursor: pointer;
}

.plugetune-page-link:hover {
	background: #e50914;
	color: #ffffff;
}

.plugetune-page-link.active {
	background: #e50914;
	color: #ffffff;
	font-weight: 600;
}

/* Page dots. */
.plugetune-page-dots {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 36px;
	color: #9ca3af;
	font-size: 14px;
}

/* Page info (prev / next). */
.plugetune-page-info {
	display: inline-flex;
	align-items: center;
	color: #6b7280;
	font-size: 14px;
	padding: 0 5px;
}

/* Load more button. */
.plugetune-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 25px;
	background: #e50914;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s ease;
	line-height: 1;
}

.plugetune-load-more:hover {
	background: #c40812;
	transform: translateY(-2px);
}

/* Responsive. */

/* Responsive. */

/* Tablet (max 992px) — controlled by data attributes. */
@media screen and (max-width: 992px) {
	.plugetune-video-grid.plugetune-cols-tablet-1 {
		grid-template-columns: 1fr !important;
	}
	.plugetune-video-grid.plugetune-cols-tablet-2 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.plugetune-video-grid.plugetune-cols-tablet-3 {
		grid-template-columns: repeat(3, 1fr) !important;
	}
	.plugetune-video-grid.plugetune-cols-tablet-4 {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

/* Mobile (max 600px) — controlled by data attributes. */
@media screen and (max-width: 600px) {
	/* 10px space on the left and right of the video grid (shortcode and Elementor widget). */
	.plugetune-grid-wrapper,
	.plugetune-elementor-wrapper:not(.plugetune-slider-post-grid-wrapper) {
		padding-left: 10px;
		padding-right: 10px;
		box-sizing: border-box;
	}

	.plugetune-video-grid {
		gap: 16px;
	}

	.plugetune-video-grid.plugetune-cols-mobile-1 {
		grid-template-columns: 1fr !important;
	}
	.plugetune-video-grid.plugetune-cols-mobile-2 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.plugetune-video-grid.plugetune-cols-mobile-3 {
		grid-template-columns: repeat(3, 1fr) !important;
	}
	.plugetune-video-grid.plugetune-cols-mobile-4 {
		grid-template-columns: repeat(4, 1fr) !important;
	}

	.plugetune-video-card {
		max-width: 100%;
	}

	.plugetune-video-title {
		font-size: 15px;
	}

	.plugetune-video-excerpt {
		font-size: 13px;
	}

	.plugetune-play-icon {
		width: 48px;
		height: 48px;
		font-size: 18px;
	}

	.plugetune-video-footer {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.plugetune-video-read-more {
		padding: 4px 12px;
		font-size: 12px;
	}

	/* Pagination on mobile. */
	.plugetune-grid-pagination {
		margin-top: 20px;
	}

	.plugetune-page-link {
		min-width: 32px;
		height: 32px;
		padding: 0 8px;
		font-size: 13px;
	}

	.plugetune-page-dots {
		min-width: 24px;
		height: 32px;
	}
}

/* Theme compatibility. */
.entry-content .plugetune-video-grid {
	margin-left: 0;
	margin-right: 0;
}

.entry-content .plugetune-video-card {
	max-width: 100%;
}

/* Elementor compatibility. */
.elementor-widget-plugetune_video_grid .plugetune-video-grid {
	margin-top: 0;
	margin-bottom: 0;
}

.elementor-widget-plugetune_video_grid .plugetune-video-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Elementor editor preview fixes. */
.elementor-editor-active .plugetune-video-grid,
.elementor-preview .plugetune-video-grid {
	display: grid !important;
}

.elementor-editor-active .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-card,
.elementor-preview .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-card {
	display: flex !important;
	flex-direction: column !important;
	background: #ffffff !important;
	border-radius: 12px !important;
	overflow: hidden !important;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
	transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.elementor-editor-active .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-thumbnail,
.elementor-preview .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-thumbnail {
	border-radius: 0 !important;
}

.elementor-editor-active .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-footer,
.elementor-preview .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-footer {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	margin-top: 8px !important;
	padding-top: 10px !important;
	border-top: 1px solid #f0f2f5 !important;
	width: 100% !important;
}

.elementor-editor-active .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-date,
.elementor-preview .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-date {
	font-size: 13px !important;
	color: #9ca3af !important;
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	flex-shrink: 0 !important;
	order: 1 !important;
}

.elementor-editor-active .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-read-more,
.elementor-preview .plugetune-video-grid:not(.plugetune-layout-overlay):not(.plugetune-layout-featured):not(.plugetune-layout-compact):not(.plugetune-layout-clean) .plugetune-video-read-more {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 6px 16px !important;
	background: #e50914 !important;
	color: #ffffff !important;
	border-radius: 6px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	text-decoration: none !important;
	border: none !important;
	cursor: pointer !important;
	white-space: nowrap !important;
	flex-shrink: 0 !important;
	order: 2 !important;
	margin-left: auto !important;
}

/* Pagination smooth transitions. */

/* Smooth transitions for page links. */
.plugetune-page-link,
.plugetune-load-more {
	transition: background 0.25s ease,
		color 0.25s ease,
		transform 0.15s ease,
		box-shadow 0.25s ease;
}

.plugetune-page-link:hover,
.plugetune-load-more:hover {
	box-shadow: 0 4px 12px rgba(229, 9, 20, 0.25);
}

/* Clicked button state. */
.plugetune-page-link.clicked,
.plugetune-load-more.clicked {
	transform: scale(0.95);
}

/* Card fade transitions. */
.plugetune-video-card {
	transition: opacity 0.3s ease,
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

/* List layout - force override with high specificity. */

/* Grid container when using list layout. */
.plugetune-video-grid.plugetune-layout-list,
.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-1,
.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-2,
.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-3,
.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-4 {
	grid-template-columns: 1fr !important;
	gap: 20px !important;
}

/* List card - horizontal layout. */
.plugetune-video-card.plugetune-card-list {
	display: flex !important;
	flex-direction: row !important;
	align-items: stretch !important;
	min-height: 220px;
	padding: 0 !important;
}

/* Thumbnail - left side. */
.plugetune-video-card.plugetune-card-list .plugetune-video-thumbnail {
	flex: 0 0 40% !important;
	max-width: 40% !important;
	width: 40% !important;
	min-height: 220px !important;
	height: auto !important;
	aspect-ratio: auto !important;
	border-radius: 12px 0 0 12px !important;
	overflow: hidden !important;
}

.plugetune-video-card.plugetune-card-list .plugetune-video-thumbnail img {
	width: 100% !important;
	height: 100% !important;
	min-height: 220px !important;
	object-fit: cover !important;
	border-radius: 12px 0 0 12px !important;
	transform: none !important;
}

.plugetune-video-card.plugetune-card-list:hover .plugetune-video-thumbnail img {
	transform: scale(1.03) !important;
}

/* Content - right side. */
.plugetune-video-card.plugetune-card-list .plugetune-video-content {
	flex: 1 !important;
	padding: 22px 26px !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: space-between !important;
	background: inherit !important;
}

/* Title. */
.plugetune-video-card.plugetune-card-list .plugetune-video-title {
	font-size: 20px !important;
	margin-bottom: 10px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
}

/* Excerpt. */
.plugetune-video-card.plugetune-card-list .plugetune-video-excerpt {
	font-size: 14px !important;
	line-height: 1.6 !important;
	margin-bottom: 16px !important;
	flex: 1 !important;
	overflow: visible !important;
}

/* Footer. */
.plugetune-video-card.plugetune-card-list .plugetune-video-footer {
	margin-top: auto !important;
	padding-top: 12px !important;
	border-top: 1px solid #f0f2f5 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
}

/* Watch button in the list layout. */
.plugetune-video-card.plugetune-card-list .plugetune-video-read-more {
	margin-left: auto !important;
}

/* List layout responsive. */

/* Tablet. */
@media screen and (max-width: 992px) {
	.plugetune-video-grid.plugetune-layout-list,
	.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-1,
	.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-2,
	.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-3,
	.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-4 {
		grid-template-columns: 1fr !important;
		gap: 16px !important;
	}

	.plugetune-video-card.plugetune-card-list {
		min-height: 180px;
	}

	.plugetune-video-card.plugetune-card-list .plugetune-video-thumbnail {
		flex: 0 0 38% !important;
		max-width: 38% !important;
		width: 38% !important;
		min-height: 180px !important;
	}

	.plugetune-video-card.plugetune-card-list .plugetune-video-thumbnail img {
		min-height: 180px !important;
	}

	.plugetune-video-card.plugetune-card-list .plugetune-video-content {
		padding: 18px 20px !important;
	}

	.plugetune-video-card.plugetune-card-list .plugetune-video-title {
		font-size: 17px !important;
	}
}

/* Mobile - stack vertically. */
@media screen and (max-width: 600px) {
	.plugetune-video-grid.plugetune-layout-list,
	.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-1,
	.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-2,
	.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-3,
	.plugetune-video-grid.plugetune-layout-list.plugetune-grid-cols-4 {
		grid-template-columns: 1fr !important;
	}

	.plugetune-video-card.plugetune-card-list {
		flex-direction: column !important;
		min-height: auto;
	}

	.plugetune-video-card.plugetune-card-list .plugetune-video-thumbnail {
		flex: 0 0 auto !important;
		max-width: 100% !important;
		width: 100% !important;
		min-height: auto !important;
		aspect-ratio: 16 / 9 !important;
		border-radius: 12px 12px 0 0 !important;
	}

	.plugetune-video-card.plugetune-card-list .plugetune-video-thumbnail img {
		min-height: auto !important;
		border-radius: 12px 12px 0 0 !important;
	}

	.plugetune-video-card.plugetune-card-list .plugetune-video-content {
		padding: 16px 18px 18px !important;
	}

	.plugetune-video-card.plugetune-card-list .plugetune-video-title {
		font-size: 16px !important;
	}
}


/* ==========================================================================
   Extra card layouts (1.1.0): overlay, featured, compact, clean.
   Use them with card_layout="overlay|featured|compact|clean".
   They show YouTube-style details: duration badge, views, "3 days ago", likes.
   Colours that the Elementor widget also sets use !important so these layouts
   stay readable whatever the widget's default style is.
   ========================================================================== */

/* Duration badge (bottom right of the thumbnail, like YouTube). */
.plugetune-video-duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 4;
	padding: 2px 7px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.82);
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.01em;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

/* Views, "3 days ago" and likes on one line. */
.plugetune-video-stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 7px;
	width: 100%;
	font-size: 13px;
	line-height: 1.4;
	color: #6b6b78;
}

.plugetune-video-stats .plugetune-video-date,
.plugetune-video-stats .plugetune-video-views,
.plugetune-video-stats .plugetune-video-likes {
	color: inherit;
	font-size: inherit;
	padding: 0;
	border: 0;
	background: none;
}

.plugetune-video-stats .plugetune-video-dot {
	opacity: 0.6;
}

.plugetune-video-stats .plugetune-video-likes {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-left: auto;
	font-weight: 600;
}

/* Shared: layouts without the old card footer look. */
.plugetune-card-overlay .plugetune-video-footer,
.plugetune-card-compact .plugetune-video-footer,
.plugetune-card-clean .plugetune-video-footer,
.plugetune-card-featured .plugetune-video-footer {
	margin-top: 0 !important;
	padding-top: 0 !important;
	border-top: 0 !important;
}

.plugetune-card-overlay .plugetune-video-read-more,
.plugetune-card-compact .plugetune-video-read-more,
.plugetune-card-clean .plugetune-video-read-more,
.plugetune-card-featured .plugetune-video-read-more {
	display: none !important;
}

/* Shared: frosted-glass play button. */
.plugetune-card-overlay .plugetune-play-icon,
.plugetune-card-compact .plugetune-play-icon,
.plugetune-card-clean .plugetune-play-icon,
.plugetune-card-featured .plugetune-play-icon {
	background: rgba(255, 255, 255, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.5);
	-webkit-backdrop-filter: blur(8px) saturate(1.4);
	backdrop-filter: blur(8px) saturate(1.4);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.112);
	padding-left: 4px;
	font-size: 20px;
}

@media (hover: hover) {
	.plugetune-card-overlay .plugetune-play-icon,
	.plugetune-card-clean .plugetune-play-icon,
	.plugetune-card-featured:not(:first-child) .plugetune-play-icon {
		opacity: 0;
		transform: scale(0.8);
		transition: opacity 0.3s ease, transform 0.3s ease;
	}

	.plugetune-card-overlay:hover .plugetune-play-icon,
	.plugetune-card-clean:hover .plugetune-play-icon,
	.plugetune-card-featured:not(:first-child):hover .plugetune-play-icon {
		opacity: 1;
		transform: scale(1);
	}
}

/* Clean + the small cards of the Featured layout: YouTube home style. */
.plugetune-video-card.plugetune-card-clean,
.plugetune-video-card.plugetune-card-featured:not(:first-child) {
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
	height: auto;
}

.plugetune-video-card.plugetune-card-clean:hover,
.plugetune-video-card.plugetune-card-featured:not(:first-child):hover {
	transform: translateY(-4px);
}

.plugetune-video-card.plugetune-card-clean .plugetune-video-thumbnail,
.plugetune-video-card.plugetune-card-featured:not(:first-child) .plugetune-video-thumbnail {
	border-radius: 18px;
	box-shadow: 0 10px 24px -12px rgba(10, 10, 25, 0.2);
	transition: box-shadow 0.3s ease;
}

.plugetune-video-card.plugetune-card-clean:hover .plugetune-video-thumbnail,
.plugetune-video-card.plugetune-card-featured:not(:first-child):hover .plugetune-video-thumbnail {
	box-shadow: 0 22px 36px -14px rgba(10, 10, 25, 0.24);
}

.plugetune-video-card.plugetune-card-clean .plugetune-video-content,
.plugetune-video-card.plugetune-card-featured:not(:first-child) .plugetune-video-content {
	padding: 14px 4px 0;
	background: transparent;
}

.plugetune-video-card.plugetune-card-clean .plugetune-video-title,
.plugetune-video-card.plugetune-card-featured:not(:first-child) .plugetune-video-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.plugetune-video-card.plugetune-card-clean .plugetune-video-excerpt,
.plugetune-video-card.plugetune-card-featured:not(:first-child) .plugetune-video-excerpt {
	display: none;
}

/* Overlay (video wall): the title sits on top of the thumbnail. */
.plugetune-video-card.plugetune-card-overlay {
	aspect-ratio: 16 / 9;
	height: auto;
	background: #0b0b10;
	border-radius: 18px;
	box-shadow: 0 10px 30px -14px rgba(10, 10, 25, 0.22);
	isolation: isolate;
}

.plugetune-video-card.plugetune-card-overlay:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 40px -16px rgba(10, 10, 25, 0.28);
}

.plugetune-video-card.plugetune-card-overlay .plugetune-video-thumbnail {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

.plugetune-video-card.plugetune-card-overlay .plugetune-video-thumbnail a {
	height: 100%;
}

.plugetune-video-card.plugetune-card-overlay:hover .plugetune-video-thumbnail img {
	transform: scale(1.09);
}

.plugetune-video-card.plugetune-card-overlay .plugetune-video-duration {
	top: 12px;
	right: 12px;
	bottom: auto;
}

.plugetune-video-card.plugetune-card-overlay .plugetune-video-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 64px 18px 16px;
	background: linear-gradient(to top, rgba(6, 6, 12, 0.96) 0%, rgba(6, 6, 12, 0.78) 45%, rgba(6, 6, 12, 0) 100%);
	pointer-events: none;
}

.plugetune-video-card.plugetune-card-overlay .plugetune-video-title {
	margin: 0 0 5px;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.plugetune-video-card.plugetune-card-overlay .plugetune-video-title a,
.plugetune-video-card.plugetune-card-overlay .plugetune-video-title a:hover,
.plugetune-video-card.plugetune-card-overlay .plugetune-video-title a:visited {
	color: #ffffff !important;
	pointer-events: auto;
}

.plugetune-video-card.plugetune-card-overlay .plugetune-video-excerpt {
	display: none !important;
}

.plugetune-video-card.plugetune-card-overlay .plugetune-video-stats,
.plugetune-video-card.plugetune-card-overlay .plugetune-video-stats .plugetune-video-date,
.plugetune-video-card.plugetune-card-overlay .plugetune-video-stats .plugetune-video-views,
.plugetune-video-card.plugetune-card-overlay .plugetune-video-stats .plugetune-video-likes {
	color: rgba(255, 255, 255, 0.82) !important;
}

/* Featured: the first video is big. */
.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child {
	grid-column: 1 / -1;
	flex-direction: row;
	align-items: stretch;
	border-radius: 24px;
	background: linear-gradient(135deg, #ffffff 0%, #f3f6fb 100%);
	box-shadow: 0 2px 4px rgba(16, 16, 32, 0.016), 0 24px 50px -22px rgba(16, 16, 32, 0.14);
}

.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-thumbnail {
	flex: 0 0 58%;
	width: 58%;
	height: auto;
	min-height: 100%;
}

.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-duration {
	right: 14px;
	bottom: 14px;
	font-size: 13px;
	padding: 3px 9px;
}

.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-content {
	justify-content: center;
	padding: 32px 36px;
	background: transparent;
}

.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-content::before {
	content: "";
	display: block;
	width: 44px;
	height: 4px;
	margin-bottom: 18px;
	border-radius: 4px;
	background: #e50914;
}

.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-title {
	font-size: 30px;
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.02em;
	margin-bottom: 14px;
}

.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-excerpt {
	flex: 0 0 auto;
	font-size: 15px;
	line-height: 1.65;
	margin-bottom: 16px;
}

.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-stats {
	font-size: 14px;
}

/* Compact: small thumbnail on the left, title and details on the right. */
.plugetune-video-card.plugetune-card-compact {
	position: relative;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	height: auto;
	padding: 10px;
	border: 1px solid rgba(20, 20, 40, 0.07);
	border-radius: 16px;
	box-shadow: none;
	transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.plugetune-video-card.plugetune-card-compact:hover {
	background: #fafafd;
	border-color: rgba(229, 9, 20, 0.28);
	box-shadow: 0 14px 28px -16px rgba(16, 16, 32, 0.12);
	transform: translateY(-2px);
}

.plugetune-video-card.plugetune-card-compact .plugetune-video-thumbnail {
	flex: 0 0 168px;
	width: 168px;
	border-radius: 11px;
	box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.16);
}

.plugetune-video-card.plugetune-card-compact .plugetune-play-icon {
	width: 38px;
	height: 38px;
	font-size: 14px;
	padding-left: 3px;
}

.plugetune-video-card.plugetune-card-compact .plugetune-video-content {
	padding: 0 6px 0 0;
	justify-content: center;
	min-width: 0;
}

.plugetune-video-card.plugetune-card-compact .plugetune-video-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.plugetune-video-card.plugetune-card-compact .plugetune-video-excerpt {
	display: none;
}

.plugetune-video-card.plugetune-card-compact .plugetune-video-stats {
	font-size: 12.5px;
}

/* Extra layouts: small screens. */
@media screen and (max-width: 700px) {
	.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child {
		flex-direction: column;
		border-radius: 20px;
	}

	.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-thumbnail {
		flex: 0 0 auto;
		width: 100%;
		min-height: 0;
	}

	.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-content {
		padding: 20px 20px 22px;
	}

	.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child .plugetune-video-title {
		font-size: 22px;
	}

	.plugetune-video-card.plugetune-card-compact .plugetune-video-thumbnail {
		flex-basis: 120px;
		width: 120px;
	}

	.plugetune-video-card.plugetune-card-overlay .plugetune-video-title {
		font-size: 14px;
	}

	.plugetune-video-card.plugetune-card-overlay .plugetune-video-content {
		padding: 44px 14px 12px;
	}

	.plugetune-video-stats {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.plugetune-video-card.plugetune-card-overlay,
	.plugetune-video-card.plugetune-card-compact,
	.plugetune-video-card.plugetune-card-clean,
	.plugetune-video-card.plugetune-card-featured {
		transition: none;
	}

	.plugetune-video-card.plugetune-card-overlay:hover,
	.plugetune-video-card.plugetune-card-compact:hover,
	.plugetune-video-card.plugetune-card-clean:hover,
	.plugetune-video-card.plugetune-card-featured:hover {
		transform: none;
	}
}

/* No focus outlines / dotted boxes on the extra layouts. */
.plugetune-card-overlay a,
.plugetune-card-compact a,
.plugetune-card-clean a,
.plugetune-card-featured a {
	-webkit-tap-highlight-color: transparent;
}

.plugetune-card-overlay a:focus,
.plugetune-card-overlay a:focus-visible,
.plugetune-card-compact a:focus,
.plugetune-card-compact a:focus-visible,
.plugetune-card-clean a:focus,
.plugetune-card-clean a:focus-visible,
.plugetune-card-featured a:focus,
.plugetune-card-featured a:focus-visible {
	outline: none !important;
	box-shadow: none;
}


/* ==========================================================================
   1.1.1 - Playlist-style play button, padded rounded cards, editor parity.
   ========================================================================== */

/* Thumbnail image always fills its box (also inside the Elementor editor). */
.plugetune-video-grid .plugetune-video-card .plugetune-video-thumbnail img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* Play button: the same glass ring + red disc + soft pulse as the Playlist and Showcase layouts. */
.plugetune-video-grid .plugetune-play-icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	font-size: 0;
	opacity: 1;
	transform: none;
	background: rgba(255, 255, 255, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.55);
	-webkit-backdrop-filter: blur(10px) saturate(1.4);
	backdrop-filter: blur(10px) saturate(1.4);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
	padding: 0;
	text-shadow: none;
	animation: plugetune-grid-ping 2.4s ease-out infinite;
	transition: transform 0.25s ease;
}

@keyframes plugetune-grid-ping {
	0% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16), 0 0 0 0 rgba(255, 255, 255, 0.5); }
	70%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16), 0 0 0 16px rgba(255, 255, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.plugetune-video-grid .plugetune-play-icon { animation: none; }
}

.plugetune-video-grid .plugetune-play-icon::before {
	content: "";
	position: absolute;
	inset: 11px;
	border-radius: 50%;
	background: #e50914;
	box-shadow: 0 4px 12px rgba(229, 9, 20, 0.22);
	transition: background-color 0.2s ease;
}

.plugetune-video-grid .plugetune-play-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -9px 0 0 -6px;
	border-style: solid;
	border-width: 9px 0 9px 16px;
	border-color: transparent transparent transparent #ffffff;
}

.plugetune-video-grid .plugetune-video-card:hover .plugetune-play-icon {
	transform: scale(1.08);
}

.plugetune-video-grid .plugetune-card-compact .plugetune-play-icon {
	width: 46px;
	height: 46px;
	animation: none;
}

.plugetune-video-grid .plugetune-card-compact .plugetune-play-icon::before {
	inset: 6px;
}

.plugetune-video-grid .plugetune-card-compact .plugetune-play-icon::after {
	margin: -6px 0 0 -4px;
	border-width: 6px 0 6px 10px;
}

/* Overlay layout: a smaller play button that sits above the title instead of covering it. */
.plugetune-video-grid .plugetune-card-overlay .plugetune-play-icon {
	width: 52px;
	height: 52px;
	margin-top: -34px;
}

.plugetune-video-grid .plugetune-card-overlay .plugetune-play-icon::before {
	inset: 8px;
}

.plugetune-video-grid .plugetune-card-overlay .plugetune-play-icon::after {
	margin: -7px 0 0 -4px;
	border-width: 7px 0 7px 12px;
}

/* Card box: padding and a rounded border for the new layouts. */
.plugetune-video-grid .plugetune-video-card.plugetune-card-compact {
	border-radius: 22px;
	padding: 10px;
}

.plugetune-video-grid:not(.plugetune-box-off) .plugetune-video-card.plugetune-card-clean,
.plugetune-video-grid:not(.plugetune-box-off) .plugetune-video-card.plugetune-card-featured:not(:first-child) {
	background: #ffffff;
	border: 1px solid rgba(20, 20, 40, 0.08);
	border-radius: 22px;
	padding: 12px;
	box-shadow: 0 6px 18px -14px rgba(10, 10, 25, 0.16);
	overflow: hidden;
}

.plugetune-video-grid:not(.plugetune-box-off) .plugetune-video-card.plugetune-card-clean .plugetune-video-thumbnail,
.plugetune-video-grid:not(.plugetune-box-off) .plugetune-video-card.plugetune-card-featured:not(:first-child) .plugetune-video-thumbnail {
	border-radius: 16px;
	box-shadow: none;
}

.plugetune-video-grid:not(.plugetune-box-off) .plugetune-video-card.plugetune-card-clean .plugetune-video-content,
.plugetune-video-grid:not(.plugetune-box-off) .plugetune-video-card.plugetune-card-featured:not(:first-child) .plugetune-video-content {
	padding: 14px 8px 6px;
}

.plugetune-video-grid:not(.plugetune-box-off) .plugetune-video-card.plugetune-card-clean:hover,
.plugetune-video-grid:not(.plugetune-box-off) .plugetune-video-card.plugetune-card-featured:not(:first-child):hover {
	box-shadow: 0 12px 26px -16px rgba(10, 10, 25, 0.2);
}

/* Featured: the big first card gets padding and a rounded border too. */
.plugetune-video-grid.plugetune-layout-featured .plugetune-video-card.plugetune-card-featured:first-child {
	border-radius: 26px;
	box-shadow: 0 10px 26px -18px rgba(10, 10, 25, 0.2);
}

/* Borderless Clean / Featured (the optional YouTube home look). */
.plugetune-video-grid.plugetune-box-off .plugetune-video-card.plugetune-card-clean .plugetune-video-content,
.plugetune-video-grid.plugetune-box-off .plugetune-video-card.plugetune-card-featured:not(:first-child) .plugetune-video-content {
	padding: 14px 6px 0;
}

/* Post style layouts (grid, list): duration at the bottom left, views and likes above the title. */
.plugetune-video-card.plugetune-card-grid .plugetune-video-duration,
.plugetune-video-card.plugetune-card-list .plugetune-video-duration {
	left: 8px;
	right: auto;
}

.plugetune-video-stats-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 12px;
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.4;
	color: #64748b;
}

.plugetune-video-stats-top span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.plugetune-video-stats-top .plugetune-video-stats-main {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 8px;
}

.plugetune-video-stats-top .plugetune-video-stats-dot {
	opacity: 0.7;
	line-height: 1;
}

.plugetune-video-stats-top .plugetune-video-likes {
	margin-left: auto;
}
