/* Magic YouTube Feed – frontend styles */

.myf-feed--grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 24px;
	row-gap: 24px;
}

.myf-feed--list {
	display: flex;
	flex-direction: column;
	row-gap: 24px;
}

.myf-feed--list .myf-card {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

.myf-feed--list .myf-card__thumb {
	flex: 0 0 40%;
	max-width: 40%;
}

.myf-feed--list .myf-card__body {
	flex: 1;
}

.myf-card {
	background: #fff;
	transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.myf-card__thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	text-decoration: none;
	cursor: pointer;
}

.myf-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.myf-zoom-yes .myf-card:hover .myf-card__thumb img {
	transform: scale(1.06);
}

.myf-card__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: transparent;
	transition: background-color 0.3s ease;
	pointer-events: none;
}

.myf-card__thumb iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.myf-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	line-height: 0;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
	transition: transform 0.3s ease;
}

.myf-card:hover .myf-card__play {
	transform: translate(-50%, -50%) scale(1.1);
}

.myf-card__play svg {
	width: 56px;
	height: auto;
}

.myf-card__duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 2;
	padding: 3px 8px;
	background: rgba(0, 0, 0, 0.85);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	border-radius: 4px;
}

.myf-card__body {
	padding: 16px 0 0;
}

.myf-card__title {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.4;
}

.myf-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.myf-card__channel {
	margin-bottom: 8px;
	font-size: 13px;
	opacity: 0.75;
}

.myf-card__description {
	margin-bottom: 10px;
	font-size: 14px;
	line-height: 1.6;
	opacity: 0.85;
}

.myf-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	font-size: 13px;
	color: #666;
}

.myf-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.myf-card__meta svg {
	fill: currentColor;
	flex-shrink: 0;
}

/* Dark theme */
.myf-theme-dark .myf-card {
	background: #1e1e24;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.myf-theme-dark .myf-card:hover {
	background: #26262e;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.myf-theme-dark .myf-card__body {
	padding: 16px;
}

.myf-theme-dark .myf-card__title,
.myf-theme-dark .myf-card__title a {
	color: #f1f1f3;
}

.myf-theme-dark .myf-card__title a:hover {
	color: #ff4d4d;
}

.myf-theme-dark .myf-card__channel {
	color: #b5b5c0;
	opacity: 1;
}

.myf-theme-dark .myf-card__description {
	color: #c9c9d2;
	opacity: 1;
}

.myf-theme-dark .myf-card__meta {
	color: #9a9aa6;
}

.myf-theme-dark .myf-card__duration {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

/* Lightbox */
.myf-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
	padding: 30px;
	opacity: 0;
	animation: myf-fade-in 0.25s ease forwards;
}

@keyframes myf-fade-in {
	to {
		opacity: 1;
	}
}

.myf-lightbox__inner {
	position: relative;
	width: 100%;
	max-width: 960px;
	aspect-ratio: 16 / 9;
}

.myf-lightbox__inner iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.myf-lightbox__close {
	position: absolute;
	top: -40px;
	right: 0;
	width: 32px;
	height: 32px;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

/* Responsive fallbacks (Elementor responsive controls override these) */
@media (max-width: 1024px) {
	.myf-feed--grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.myf-feed--grid {
		grid-template-columns: 1fr;
	}

	.myf-feed--list .myf-card {
		flex-direction: column;
	}

	.myf-feed--list .myf-card__thumb {
		flex: none;
		max-width: 100%;
		width: 100%;
	}
}
