/**
 * Video with tabs — same sizes as the Video block (headline .nc-title, 900px 16:9 card),
 * plus round corner buttons over the video, a pill tab bar and per-tab text.
 */

.nc-video-tabs--grey {
	background: #f7f7f7;
}

.nc-video-tabs__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.nc-video-tabs__intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	margin-bottom: 80px;
	text-align: center;
}

.nc-video-tabs .nc-video-tabs__title {
	max-width: 944px;
}

.nc-video-tabs .nc-video-tabs__intro-text {
	max-width: 840px;
	margin: 0;
	color: var(--nc-color-text);
	font-size: 20px;
	font-weight: 300;
	line-height: 28px;
}

/* ---------- Video card ---------- */

.nc-video-tabs__stage {
	position: relative;
	width: 100%;
	max-width: 900px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--nc-radius-media);
	background: #1a1a1a;
}

.nc-video-tabs__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nc-video-tabs__video[hidden] {
	display: none;
}

/* Vimeo tab: the player iframe is centred and sized by view.js to cover the card */
.nc-video-tabs__vimeo {
	overflow: hidden;
	background: #1a1a1a center / cover no-repeat;
}

.nc-video-tabs__vimeo iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	border: 0;
	transform: translate(-50%, -50%);
	pointer-events: none; /* Our buttons control it; Vimeo's own controls are hidden */
}

.nc-video-tabs__vimeo-hint {
	position: absolute;
	top: 50%;
	left: 50%;
	margin: 0;
	background: var(--nc-color-white);
	transform: translate(-50%, -50%);
}

/* Full screen: show the whole video, black bars if needed */
.nc-video-tabs__stage:fullscreen {
	max-width: none;
	border-radius: 0;
	background: #000;
}

.nc-video-tabs__stage:fullscreen .nc-video-tabs__video {
	object-fit: contain;
}

/* Round buttons in the top corners */
.nc-video-tabs__btn {
	position: absolute;
	top: 24px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(30, 30, 30, 0.72);
	color: var(--nc-color-white);
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.nc-video-tabs__btn:hover {
	background: rgba(30, 30, 30, 0.9);
}

.nc-video-tabs__btn:focus-visible {
	outline: 2px solid var(--nc-color-white);
	outline-offset: 3px;
}

.nc-video-tabs__expand {
	left: 24px;
}

.nc-video-tabs__toggle {
	right: 24px;
}

/* Sound on/off, bottom right */
.nc-video-tabs__sound {
	top: auto;
	right: 24px;
	bottom: 24px;
}

.nc-video-tabs__sound .nc-video-tabs__icon-muted {
	display: block;
}

.nc-video-tabs__sound .nc-video-tabs__icon-sound {
	display: none;
}

.nc-video-tabs__stage.has-sound .nc-video-tabs__sound .nc-video-tabs__icon-muted {
	display: none;
}

.nc-video-tabs__stage.has-sound .nc-video-tabs__sound .nc-video-tabs__icon-sound {
	display: block;
}

/* Progress ring around play/pause (filled by view.js as the video plays) */
.nc-video-tabs__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	pointer-events: none;
}

.nc-video-tabs__ring circle {
	fill: none;
	stroke-width: 2.5;
}

.nc-video-tabs__ring-track {
	stroke: rgba(255, 255, 255, 0.25);
}

.nc-video-tabs__ring-fill {
	stroke: var(--nc-color-white);
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 - var(--nc-progress, 0) * 100);
	stroke-linecap: round;
}

.nc-video-tabs__toggle .nc-video-tabs__icon-pause {
	display: block;
}

.nc-video-tabs__toggle .nc-video-tabs__icon-play {
	display: none;
	margin-left: 2px;
}

.nc-video-tabs__stage.is-paused .nc-video-tabs__toggle .nc-video-tabs__icon-play {
	display: block;
}

.nc-video-tabs__stage.is-paused .nc-video-tabs__toggle .nc-video-tabs__icon-pause {
	display: none;
}

/* ---------- Tabs (pill bar) ---------- */

.nc-video-tabs__tabs {
	display: flex;
	gap: 2px;
	max-width: 100%;
	margin-top: 40px;
	padding: 4px;
	overflow-x: auto;
	border-radius: 999px;
	background: #ececec;
	scrollbar-width: none;
}

.nc-video-tabs__tabs::-webkit-scrollbar {
	display: none;
}

.nc-video-tabs__tab {
	flex: 0 0 auto;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #666666;
	font-family: var(--nc-font);
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.nc-video-tabs__tab:hover {
	color: #222222;
}

.nc-video-tabs__tab.is-active {
	background: #222222;
	color: var(--nc-color-white);
}

.nc-video-tabs__tab:focus-visible {
	outline: 2px solid var(--nc-color-primary);
	outline-offset: 2px;
}

/* ---------- Text under the tabs ---------- */

.nc-video-tabs__texts {
	max-width: 640px;
	margin-top: 32px;
	text-align: center;
}

.nc-video-tabs .nc-video-tabs__text {
	margin: 0;
	color: var(--nc-color-text);
	font-size: 16px;
	font-weight: 300;
	line-height: 24px;
}

.nc-video-tabs__texts:empty {
	display: none;
}

/* ---------- Tablet ---------- */

@media (max-width: 1023px) {
	.nc-video-tabs__intro {
		margin-bottom: 54px;
	}
}

/* ---------- Phones ---------- */

@media (max-width: 767px) {
	.nc-video-tabs__intro {
		gap: 20px;
		margin-bottom: 40px;
	}

	.nc-video-tabs .nc-video-tabs__intro-text {
		font-size: 17px;
		line-height: 24px;
	}

	.nc-video-tabs__btn {
		top: 12px;
		width: 40px;
		height: 40px;
	}

	.nc-video-tabs__expand {
		left: 12px;
	}

	.nc-video-tabs__toggle {
		right: 12px;
	}

	.nc-video-tabs__sound {
		top: auto;
		right: 12px;
		bottom: 12px;
	}

	.nc-video-tabs__tabs {
		margin-top: 24px;
	}

	.nc-video-tabs__tab {
		padding: 8px 14px;
		font-size: 13px;
	}

	.nc-video-tabs__texts {
		margin-top: 20px;
	}

	.nc-video-tabs .nc-video-tabs__text {
		font-size: 15px;
		line-height: 22px;
	}
}
