/* YouTube Reels Carousel — scoped styles.
   Every rule is prefixed with .ytrc and buttons/images are hard-reset so
   aggressive theme styles (e.g. Hub) can't leak in. */

.ytrc {
	--ytrc-per-view: 4;
	--ytrc-gap: 16px;
	--ytrc-play-color: #fff;
	--ytrc-play-bg: #e62117;
	--ytrc-play-size: 58px;
	--ytrc-arrow-color: #111;
	--ytrc-arrow-bg: #fff;
	--ytrc-arrow-size: 42px;
	--ytrc-dot-color: #c9c9c9;
	--ytrc-dot-active: #e62117;

	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
.ytrc *, .ytrc *::before, .ytrc *::after { box-sizing: border-box; }

.ytrc .ytrc__viewport { position: relative; }

.ytrc .ytrc__track {
	display: flex;
	gap: var(--ytrc-gap);
	margin: 0;
	padding: 4px 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	outline: none;
}
.ytrc .ytrc__track::-webkit-scrollbar { display: none; }
.ytrc .ytrc__track:focus-visible { outline: 2px solid var(--ytrc-dot-active); outline-offset: 2px; }

.ytrc .ytrc__slide {
	flex: 0 0 calc((100% - (var(--ytrc-per-view) - 1) * var(--ytrc-gap)) / var(--ytrc-per-view));
	min-width: 0;
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
}

/* Card: 9:16 vertical frame */
.ytrc .ytrc__card {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #000;
	border-radius: 14px;
	isolation: isolate;
}
.ytrc .ytrc__thumb {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	object-fit: cover;
	object-position: center;
	transition: transform .35s ease;
}
.ytrc .ytrc__card:hover .ytrc__thumb { transform: scale(1.03); }

.ytrc .ytrc__card iframe {
	position: absolute;
	inset: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	background: #000;
}

/* Buttons: full reset against theme button styles */
.ytrc button.ytrc__play,
.ytrc button.ytrc__arrow {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	min-height: 0;
	min-width: 0;
	border: 0 !important;
	text-transform: none;
	letter-spacing: normal;
	line-height: 1;
	font-size: 0;
	text-shadow: none;
	cursor: pointer;
}

.ytrc button.ytrc__play {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 45%) !important;
	color: var(--ytrc-play-color) !important;
}
.ytrc .ytrc__play-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--ytrc-play-size);
	height: var(--ytrc-play-size);
	border-radius: 50%;
	background: var(--ytrc-play-bg);
	color: var(--ytrc-play-color);
	padding-left: 3px;
	transition: transform .2s ease;
}
.ytrc .ytrc__play-icon svg { display: block; fill: currentColor; }
.ytrc button.ytrc__play:hover .ytrc__play-icon,
.ytrc button.ytrc__play:focus-visible .ytrc__play-icon { transform: scale(1.1); }
.ytrc button.ytrc__play:focus-visible { outline: 3px solid var(--ytrc-play-bg); outline-offset: -3px; }

.ytrc .ytrc__card.is-playing .ytrc__play,
.ytrc .ytrc__card.is-playing .ytrc__thumb { display: none; }

/* Title */
.ytrc .ytrc__title {
	margin: 10px 0 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.35;
	font-weight: 600;
}

/* Arrows */
.ytrc button.ytrc__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	width: var(--ytrc-arrow-size);
	height: var(--ytrc-arrow-size);
	margin-top: calc(var(--ytrc-arrow-size) / -2);
	border-radius: 50% !important;
	background: var(--ytrc-arrow-bg) !important;
	color: var(--ytrc-arrow-color) !important;
	box-shadow: 0 2px 10px rgba(0,0,0,.25) !important;
	transition: opacity .2s ease, transform .2s ease;
}
.ytrc button.ytrc__arrow svg { display: block; flex: none; }
.ytrc button.ytrc__arrow:hover { transform: scale(1.08); }
.ytrc button.ytrc__arrow:focus-visible { outline: 2px solid var(--ytrc-dot-active); outline-offset: 2px; }
.ytrc button.ytrc__arrow--prev { left: 8px; }
.ytrc button.ytrc__arrow--next { right: 8px; }
.ytrc button.ytrc__arrow[disabled] { opacity: 0; pointer-events: none; }

/* Dots */
.ytrc .ytrc__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
}
.ytrc .ytrc__dots button {
	-webkit-appearance: none;
	appearance: none;
	width: 9px;
	height: 9px;
	min-height: 0;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--ytrc-dot-color) !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: transform .2s ease, background-color .2s ease;
}
.ytrc .ytrc__dots button[aria-selected="true"] {
	background: var(--ytrc-dot-active) !important;
	transform: scale(1.3);
}

.ytrc-empty {
	padding: 24px;
	border: 2px dashed #bbb;
	border-radius: 8px;
	text-align: center;
	color: #666;
	font-size: 14px;
}

@media (hover: none) {
	.ytrc button.ytrc__arrow { display: none; } /* swipe on touch devices */
}
@media (prefers-reduced-motion: reduce) {
	.ytrc .ytrc__thumb, .ytrc .ytrc__play-icon, .ytrc button.ytrc__arrow { transition: none; }
}
