/* TeleCuraçao YouTube Slider */

.tcys {
	--tcys-per-view: var(--tcys-pv-d, 4);
	--tcys-gap: 10px;
	--tcys-ratio: 16 / 9;
	--tcys-radius: 12px;
	--tcys-overlay: rgba(0, 0, 0, .72);
	--tcys-zoom: 1.06;
	--tcys-accent: var(--e-global-color-primary, #0a797d);
	--tcys-arrow-size: 42px;
	--tcys-arrow-bg: #fff;
	--tcys-arrow-color: var(--tcys-accent);
	--tcys-dot: rgba(0, 0, 0, .2);
	--tcys-live: #e1002d;
	position: relative;
}

/* Elementor flex containers size widgets to their content; a slider must fill the row (same rule Elementor uses for its own widgets). */
.e-con > .elementor-widget-tc-youtube-slider,
.e-con-inner > .elementor-widget-tc-youtube-slider {
	width: var(--container-widget-width, 100%);
	--flex-grow: var(--container-widget-flex-grow);
}

@media (max-width: 1024px) {
	.tcys { --tcys-per-view: var(--tcys-pv-t, 2.5); }
}

@media (max-width: 767px) {
	.tcys {
		--tcys-per-view: var(--tcys-pv-m, 1.2);
		--tcys-arrow-size: 34px;
	}
}

/* Track: native scroll-snap = smooth touch swipe, trackpad and keyboard with no library. */
.tcys .tcys__track {
	display: flex;
	gap: var(--tcys-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.tcys .tcys__track::-webkit-scrollbar { display: none; }

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

.tcys .tcys__slide::before,
.tcys .tcys__slide::marker { content: none; }

/* Card */
.tcys .tcys__card {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: var(--tcys-ratio);
	border-radius: var(--tcys-radius);
	background: #111;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
}

.tcys .tcys__card:focus-visible {
	outline: 3px solid var(--tcys-accent);
	outline-offset: -3px;
}

.tcys .tcys__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	transition: transform .45s ease;
}

.tcys .tcys__card:hover .tcys__thumb,
.tcys .tcys__card:focus-visible .tcys__thumb { transform: scale(var(--tcys-zoom)); }

.tcys .tcys__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 16px 18px;
	background: linear-gradient(to top, var(--tcys-overlay) 0%, rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, 0) 85%);
}

.tcys .tcys__title {
	display: -webkit-box;
	margin: 0 0 4px;
	overflow: hidden;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.tcys .tcys__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: rgba(255, 255, 255, .88);
	font-size: 14px;
	line-height: 1.3;
}

.tcys .tcys__sep { opacity: .7; }

/* Play button */
.tcys .tcys__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	border-radius: 50%;
	background: var(--tcys-accent);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
	opacity: 0;
	transform: scale(.8);
	transition: opacity .25s ease, transform .25s ease;
}

.tcys .tcys__play svg {
	width: 24px;
	height: 24px;
	margin-left: 3px;
	fill: #fff;
}

.tcys .tcys__card:hover .tcys__play,
.tcys .tcys__card:focus-visible .tcys__play {
	opacity: 1;
	transform: scale(1);
}

/* Badges: duration / live / upcoming */
.tcys .tcys__badges {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	gap: 6px;
}

.tcys .tcys__badge {
	padding: 4px 7px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .8);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .02em;
}

.tcys .tcys__badge--live {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--tcys-live);
	text-transform: uppercase;
}

.tcys .tcys__badge--live::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
	animation: tcys-pulse 1.4s ease-in-out infinite;
}

@keyframes tcys-pulse {
	50% { opacity: .3; }
}

/* Arrows (selectors are specific enough to beat theme / Elementor kit button styles) */
.tcys button.tcys__arrow,
.tcys button.tcys__arrow:hover,
.tcys button.tcys__arrow:focus {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: none;
	align-items: center;
	justify-content: center;
	width: var(--tcys-arrow-size);
	height: var(--tcys-arrow-size);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--tcys-arrow-bg);
	color: var(--tcys-arrow-color);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity .2s ease, transform .2s ease;
}

.tcys.is-scrollable button.tcys__arrow { display: flex; }
.tcys button.tcys__arrow:hover { transform: translateY(-50%) scale(1.08); }
.tcys button.tcys__arrow:focus-visible { outline: 3px solid var(--tcys-accent); outline-offset: 2px; }
.tcys button.tcys__arrow:disabled { opacity: 0; pointer-events: none; }
.tcys .tcys__arrow--prev { left: 12px; }
.tcys .tcys__arrow--next { right: 12px; }

/* Phones swipe; arrows would only cover the titles. */
@media (hover: none) and (max-width: 767px) {
	.tcys.is-scrollable button.tcys__arrow { display: none; }
}

.tcys .tcys__arrow svg {
	width: 46%;
	height: 46%;
	fill: none;
	stroke: currentColor;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Dots */
.tcys .tcys__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}

.tcys .tcys__dots:empty { display: none; }

.tcys button.tcys__dot,
.tcys button.tcys__dot:hover,
.tcys button.tcys__dot:focus {
	width: 9px;
	height: 9px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 5px;
	background: var(--tcys-dot);
	cursor: pointer;
	transition: width .25s ease, background-color .25s ease;
}

.tcys button.tcys__dot[aria-current="true"] {
	width: 24px;
	background: var(--tcys-accent);
}

/* Editor hints */
.tcys-notice {
	margin: 0 0 10px;
	padding: 10px 14px;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
	color: #3c434a;
	font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Popup player */
.tcys-modal {
	width: min(1100px, 94vw);
	max-width: none;
	max-height: none;
	margin: auto;
	padding: 0;
	overflow: visible;
	border: 0;
	background: transparent;
}

.tcys-modal--vertical { width: min(400px, 92vw, calc(84vh * 9 / 16)); }
.tcys-modal::backdrop { background: rgba(0, 0, 0, .86); }
html:has(.tcys-modal[open]) { overflow: hidden; }

.tcys-modal__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 10px;
	background: #000;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.tcys-modal--vertical .tcys-modal__frame { aspect-ratio: 9 / 16; }

.tcys-modal__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.tcys-modal button.tcys-modal__close,
.tcys-modal button.tcys-modal__close:hover,
.tcys-modal button.tcys-modal__close:focus {
	position: absolute;
	top: -48px;
	right: 0;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	cursor: pointer;
}

.tcys-modal button.tcys-modal__close:hover { background: rgba(255, 255, 255, .28); }
.tcys-modal button.tcys-modal__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.tcys-modal__close svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce) {
	.tcys *,
	.tcys *::before { transition: none !important; animation: none !important; }
}
