/**
 * JT Reels / Shorts widget styles.
 *
 * Extracted verbatim from the shared jt-widgets.css Reels section.
 * Already scoped by stable classes, not per-instance IDs, so no
 * selector rewriting was needed.
 */

/* --- JT Reels / Shorts --- */
.jt-reels-wrapper {
	position: relative;
	width: 100%;
	max-width: 1300px;
	margin: 0 auto;
	padding: 0;
}

/* Header */
.jt-reels-header {
	margin-bottom: 20px;
	padding: 0 4px;
}
.jt-reels-heading {
	color: var(--mj-reels-heading, #0f172a);
	margin: 0 0 4px 0;
	letter-spacing: -0.5px;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
}
.jt-reels-subheading {
	color: var(--mj-reels-subheading, #64748b);
	margin: 0;
	font-size: 13px;
	font-weight: 500;
}

/* Track */
.jt-reels-track {
	display: flex;
	gap: var(--mj-reels-gap, 16px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding: 10px 5px 20px 5px;
}
.jt-reels-track::-webkit-scrollbar {
	display: none;
}

/* Reel Item */
.jt-reel-item {
	flex: 0 0 calc((100% - (var(--mj-reels-gap, 16px) * (var(--mj-reels-cols, 5) - 1))) / var(--mj-reels-cols, 5));
	scroll-snap-align: start;
	position: relative;
	aspect-ratio: 9/16;
	background: #000;
	border-radius: var(--mj-reels-radius, 16px);
	overflow: hidden;
	transform: translateZ(0);
	cursor: pointer;
	box-shadow: 0 6px 15px rgba(0,0,0,0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.jt-reel-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* Video wrapper */
.jt-reel-video-wrap {
	position: absolute;
	inset: 0;
	z-index: 1;
}
.jt-reel-video-wrap video,
.jt-reel-video-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: inherit;
}

/* Center Play Icon (Shows when paused) */
.jt-reel-center-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.5);
	font-size: 50px;
	color: rgba(255,255,255,0.7);
	z-index: 3;
	opacity: 0;
	pointer-events: none;
	transition: all 0.3s ease;
	filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}
.jt-reel-item.is-paused .jt-reel-center-icon {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* Overlay Gradient */
.jt-reel-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 30%, transparent 60%);
}

.jt-reel-content-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 20px 15px;
	width: 100%;
}

/* Bottom Left Info */
.jt-reel-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	flex: 1;
	padding-right: 15px;
}
.jt-reel-title {
	color: var(--mj-reels-title, #ffffff);
	margin: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	text-shadow: 0 1px 4px rgba(0,0,0,0.5);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.jt-reel-btn {
	background: var(--mj-reels-btn-bg, #ffffff);
	color: var(--mj-reels-btn-color, #0f172a);
	border-radius: 100px;
	text-decoration: none;
	transition: all 0.3s ease;
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.2);
	font-size: 11px;
	font-weight: 800;
	padding: 7px 16px;
}
.jt-reel-item:hover .jt-reel-btn {
	background: var(--mj-reels-btn-hover-bg, #FA3434);
	color: var(--mj-reels-btn-hover-color, #ffffff);
	transform: translateY(-2px);
}

/* Right Actions */
.jt-reel-right {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	margin-bottom: 5px;
}
.jt-reel-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: #ffffff;
	text-decoration: none;
	transition: transform 0.3s ease;
}
.jt-reel-action:hover {
	transform: translateY(-3px);
}
.jt-reel-action-icon {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255,255,255,0.2);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	border: 1px solid rgba(255,255,255,0.3);
	transition: all 0.3s ease;
}
.jt-reel-action-icon i {
	color: var(--mj-reels-icon, #ffffff);
	font-size: 16px;
}
.jt-reel-action:hover .jt-reel-action-icon {
	background: #ffffff;
}
.jt-reel-action:hover .jt-reel-action-icon i {
	color: #0f172a;
}
.jt-reel-action span {
	color: var(--mj-reels-views, #ffffff);
	text-shadow: 0 1px 3px rgba(0,0,0,0.5);
	font-size: 11px;
	font-weight: 700;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
	.jt-reels-heading {
		margin-bottom: 2px;
		font-size: 17px;
	}
	.jt-reels-subheading {
		font-size: 12px;
	}
	.jt-reel-content-wrapper {
		padding: 12px 10px;
	}
	.jt-reel-left {
		gap: 6px;
	}
	.jt-reel-action-icon {
		width: 28px;
		height: 28px;
	}
	.jt-reel-action-icon i {
		font-size: 12px;
	}
	.jt-reel-right {
		gap: 8px;
	}
	.jt-reel-title {
		font-size: 11px;
		-webkit-line-clamp: 1;
		line-clamp: 1;
	}
	.jt-reel-btn {
		font-size: 9px;
		padding: 5px 12px;
	}
	.jt-reel-action span {
		font-size: 9px;
	}
	/* Platform name (Instagram/YouTube/...) is redundant next to its own icon at this size - icon alone is enough, keep the numeric views count. */
	.jt-reel-action.jt-reel-social-action span {
		display: none;
	}
}