/**
 * oid-brightcove front end: the video page, the player, video cards, and the
 * OI - Video Listing and OI - Video blocks.
 *
 * Built on the theme's design tokens (--oi-*), each with the OneIdentity value as a
 * fallback, so the same file takes each site's brand: navy and lime on oneidentity.com,
 * whatever the OneLogin theme sets there. The look follows the theme's own components:
 * soft card tiles, 8px controls, the button with its arrow tile, rounded thumbnails with
 * a translucent play disc.
 *
 * Every selector is prefixed oid-video / oid-product so nothing collides with the
 * theme's .bc-* Brightcove block styles.
 */

/* ── Tokens ─────────────────────────────────────────────── */
.oid-video,
.oid-video-section,
.oid-video-player {
	--oidv-brand: var(--oi-color-primary, #020b71);
	--oidv-heading: var(--oi-text-heading, var(--oidv-brand));
	--oidv-text: var(--oi-text-body, #40535d);
	--oidv-muted: var(--oi-text-muted, #838f96);
	--oidv-accent: var(--oi-color-accent, #b8ec00);
	--oidv-card: var(--oi-bg-card, #f6f8f8);
	--oidv-card-hover: var(--oi-bg-white, #fff);
	--oidv-line: #d5dce2;
	--oidv-font: var(--oi-font-body, "Noto Sans", sans-serif);
	--oidv-radius: 20px;
	--oidv-radius-media: 16px;
	--oidv-radius-control: var(--oi-tile-radius, 8px);
	--oidv-btn-bg: var(--oi-btn-cta, var(--oidv-brand));
	--oidv-btn-text: var(--oi-btn-cta-text, #fff);
	--oidv-btn-hover-bg: var(--oi-btn-cta-hover, var(--oidv-accent));
	--oidv-btn-hover-text: var(--oi-btn-cta-text-hover, var(--oidv-brand));
	--oidv-arrow-bg: var(--oi-btn-arrow-bg, var(--oidv-accent));
	--oidv-arrow: var(--oi-btn-arrow-color, var(--oidv-brand));
	--oidv-shadow: 0 16px 40px rgba(2, 11, 113, 0.12);
	--oidv-ease: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ── Section: the theme's content width ─────────────────── */
.oid-video-section {
	box-sizing: border-box;
	padding: clamp(40px, 6vw, 80px) 0;
	font-family: var(--oidv-font);
	color: var(--oidv-text);
}

.oid-video-section__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--oi-header-max, 1170px);
	margin: 0 auto;
	padding: 0 15px;
}

.oid-video-section *,
.oid-video-section *::before,
.oid-video-section *::after,
.oid-video *,
.oid-video *::before,
.oid-video *::after {
	box-sizing: border-box;
}

/* ── Player: 16:9, poster, play disc, duration badge ────── */
.oid-video-player {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--oidv-radius-media);
	background: #000;
	isolation: isolate;
}

.oid-video-player--no-poster {
	background: var(--oi-gradient-hero, linear-gradient(283deg, #04a9d9 13.97%, #0052cc 45.63%, #020b71 85.99%));
}

.oid-video-player[role="button"] {
	cursor: pointer;
}

.oid-video-player[role="button"]:focus-visible {
	outline: 3px solid var(--oidv-brand);
	outline-offset: 4px;
}

.oid-video-player__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1), filter var(--oidv-ease);
}

.oid-video-player[role="button"]:hover .oid-video-player__poster {
	transform: scale(1.02);
	filter: brightness(0.9);
}

.oid-video-player__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(56px, 9vw, 84px);
	height: clamp(56px, 9vw, 84px);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.82);
	color: var(--oidv-brand);
	box-shadow: 0 8px 28px rgba(2, 11, 113, 0.28);
	transform: translate(-50%, -50%);
	transition: transform var(--oidv-ease), background-color var(--oidv-ease);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.oid-video-player__play svg {
	width: 42%;
	height: 42%;
	margin-left: 6%;
	fill: currentcolor;
}

.oid-video-player[role="button"]:hover .oid-video-player__play,
.oid-video-player[role="button"]:focus-visible .oid-video-player__play {
	background: var(--oidv-accent);
	transform: translate(-50%, -50%) scale(1.08);
}

.oid-video-player__video,
.oid-video-player .video-js {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* Duration badge, bottom-right of the thumbnail (player and cards). */
.oid-video-duration {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 1;
	padding: 3px 9px;
	border-radius: 6px;
	background: rgba(2, 11, 40, 0.78);
	color: #fff;
	font-family: var(--oidv-font);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* ── Video card ─────────────────────────────────────────── */
.oid-video-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin: 0;
	padding: 0;
}

@media (min-width: 640px) {
	.oid-video-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.oid-video-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 32px 24px;
	}
}

.oid-video-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	margin: 0;
	border-radius: var(--oidv-radius);
	background: var(--oidv-card);
	transition: transform var(--oidv-ease), box-shadow var(--oidv-ease), background-color var(--oidv-ease);
}

.oid-video-card:hover,
.oid-video-card:focus-within {
	background: var(--oidv-card-hover);
	box-shadow: var(--oidv-shadow);
	transform: translateY(-4px);
}

.oid-video-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
}

.oid-video-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.oid-video-card:hover .oid-video-card__media img {
	transform: scale(1.05);
}

.oid-video-card__placeholder {
	position: absolute;
	inset: 0;
	background: var(--oi-gradient-hero, linear-gradient(283deg, #04a9d9 13.97%, #0052cc 45.63%, #020b71 85.99%));
}

.oid-video-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.82);
	color: var(--oidv-brand);
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.85);
	transition: opacity var(--oidv-ease), transform var(--oidv-ease), background-color var(--oidv-ease);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.oid-video-card__play svg {
	width: 44%;
	height: 44%;
	margin-left: 6%;
	fill: currentcolor;
}

.oid-video-card:hover .oid-video-card__play,
.oid-video-card:focus-within .oid-video-card__play {
	background: var(--oidv-accent);
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.oid-video-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 20px 24px 24px;
}

.oid-video-section .oid-video-card__title,
.oid-video .oid-video-card__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	color: var(--oidv-heading);
	font-family: var(--oi-font-heading, var(--oidv-font));
	font-size: var(--oi-title-card-sm, 18px);
	font-weight: 700;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* !important: the theme underlines and recolours every link in page content on hover
   with a selector of nine classes (.page:not(…) .entry a:not(…):hover). */
.oid-video-card__link,
.oid-video-card__link:hover,
.oid-video-card__link:focus,
.oid-video-card__link:visited {
	color: inherit !important;
	text-decoration: none !important;
}

/* The whole card follows the title link. */
.oid-video-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: var(--oidv-radius);
}

.oid-video-card__link:focus-visible {
	outline: none;
}

.oid-video-card__link:focus-visible::after {
	outline: 3px solid var(--oidv-brand);
	outline-offset: 3px;
}

.oid-video-section .oid-video-card__excerpt,
.oid-video .oid-video-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	color: var(--oidv-text);
	font-size: 15px;
	line-height: 1.6;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

/* ── Button (the theme's button with its arrow tile) ────── */
.oid-video-section .oid-video-button {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	gap: 14px;
	height: 52px;
	margin: 0;
	padding: 3px 3px 3px 20px;
	border: 2px solid var(--oidv-btn-bg);
	border-radius: var(--oidv-radius-control);
	background: var(--oidv-btn-bg);
	color: var(--oidv-btn-text);
	font-family: var(--oidv-font);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color var(--oidv-ease), color var(--oidv-ease), border-color var(--oidv-ease);
}

.oid-video-section .oid-video-button:hover,
.oid-video-section .oid-video-button:focus-visible {
	border-color: var(--oidv-btn-hover-bg);
	background: var(--oidv-btn-hover-bg);
	color: var(--oidv-btn-hover-text);
}

.oid-video-section .oid-video-button:focus-visible {
	outline: 2px solid var(--oidv-brand);
	outline-offset: 2px;
}

.oid-video-button__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 6px;
	background: var(--oidv-arrow-bg);
	color: var(--oidv-arrow);
	transition: transform var(--oidv-ease);
}

.oid-video-button:hover .oid-video-button__arrow {
	transform: translateX(2px);
}

.oid-video-button__arrow svg {
	width: 18px;
	height: 12px;
	fill: currentcolor;
}

/* ── Listing: filter bar ────────────────────────────────── */
.oid-video-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 28px;
	padding: 16px;
	border-radius: var(--oidv-radius);
	background: var(--oidv-card);
}

.oid-video-filters__field {
	position: relative;
	display: flex;
	flex: 1 1 100%;
	align-items: center;
	margin: 0;
}

@media (min-width: 640px) {
	.oid-video-filters__field--search {
		flex: 1 1 260px;
	}

	.oid-video-filters__field--product {
		flex: 0 1 260px;
	}
}

.oid-video-filters .oid-video-button {
	flex: 1 1 100%;
}

@media (min-width: 640px) {
	.oid-video-filters .oid-video-button {
		flex: 0 0 auto;
	}
}

.oid-video-filters__icon {
	position: absolute;
	left: 16px;
	width: 20px;
	height: 20px;
	fill: var(--oidv-muted);
	pointer-events: none;
}

.oid-video-section .oid-video-filters input[type="search"],
.oid-video-section .oid-video-filters select {
	width: 100%;
	max-width: none;
	height: 52px;
	min-height: 52px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--oidv-line);
	border-radius: var(--oidv-radius-control);
	background-color: #fff;
	box-shadow: none;
	color: var(--oidv-heading);
	font-family: var(--oidv-font);
	font-size: 16px;
	line-height: 1.4;
	transition: border-color var(--oidv-ease), box-shadow var(--oidv-ease);
	-webkit-appearance: none;
	appearance: none;
}

.oid-video-section .oid-video-filters input[type="search"] {
	padding-left: 46px;
}

.oid-video-section .oid-video-filters input[type="search"]::placeholder {
	color: var(--oidv-muted);
	opacity: 1;
}

.oid-video-section .oid-video-filters select {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23838F96' d='M1.4 0 6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 18px center;
	background-size: 12px 8px;
	cursor: pointer;
}

.oid-video-section .oid-video-filters input[type="search"]:hover,
.oid-video-section .oid-video-filters select:hover {
	border-color: var(--oidv-muted);
}

.oid-video-section .oid-video-filters input[type="search"]:focus,
.oid-video-section .oid-video-filters select:focus {
	border-color: var(--oidv-brand);
	outline: none;
	box-shadow: 0 0 0 3px rgba(2, 11, 113, 0.14);
}

/* ── Listing: result line, empty state ──────────────────── */
.oid-video-listing__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin: 0 0 20px;
}

.oid-video-section .oid-video-listing__count {
	margin: 0;
	color: var(--oidv-muted);
	font-size: 14px;
	line-height: 1.5;
}

.oid-video-section .oid-video-listing__clear {
	color: var(--oidv-brand);
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.oid-video-section .oid-video-listing__clear:hover {
	color: var(--oi-link-hover, var(--oidv-brand));
}

.oid-video-listing__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 56px 24px;
	border-radius: var(--oidv-radius);
	background: var(--oidv-card);
	text-align: center;
}

.oid-video-listing__empty svg {
	width: 40px;
	height: 40px;
	margin-bottom: 8px;
	fill: var(--oidv-muted);
}

.oid-video-section .oid-video-listing__empty p {
	margin: 0;
	font-size: 15px;
}

.oid-video-section .oid-video-listing__empty .oid-video-listing__empty-title {
	color: var(--oidv-heading);
	font-size: 20px;
	font-weight: 700;
}

.oid-video-listing__empty .oid-video-listing__clear {
	margin-top: 10px;
}

/* ── Listing: pagination ────────────────────────────────── */
.oid-video-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.oid-video-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--oidv-line);
	border-radius: var(--oidv-radius-control);
	background: #fff;
	color: var(--oidv-heading);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	transition: border-color var(--oidv-ease), background-color var(--oidv-ease), color var(--oidv-ease);
}

.oid-video-pagination a.page-numbers:hover,
.oid-video-pagination a.page-numbers:focus-visible {
	border-color: var(--oidv-brand);
	color: var(--oidv-brand) !important;
	text-decoration: none !important;
}

.oid-video-pagination .page-numbers.current {
	border-color: var(--oidv-brand);
	background: var(--oidv-brand);
	color: #fff;
}

.oid-video-pagination .page-numbers.dots {
	min-width: 24px;
	padding: 0 4px;
	border-color: transparent;
	background: transparent;
}

.oid-video-pagination .prev::before,
.oid-video-pagination .next::after {
	content: "";
	width: 7px;
	height: 7px;
	border-top: 2px solid currentcolor;
	border-right: 2px solid currentcolor;
}

.oid-video-pagination .prev::before {
	margin-right: 10px;
	transform: rotate(-135deg);
}

.oid-video-pagination .next::after {
	margin-left: 10px;
	transform: rotate(45deg);
}

/* ── OI - Video block ───────────────────────────────────── */
.oid-video-block__frame {
	max-width: 960px;
	margin: 0 auto;
}

.oid-video-block .oid-video-player {
	box-shadow: var(--oidv-shadow);
}

/* Two video blocks in a row share one gap, not two. */
.oid-video-block + .oid-video-block {
	padding-top: 0;
}

/* ── Video page ─────────────────────────────────────────── */
.oid-video {
	max-width: 960px;
	margin: 0 auto;
	padding: clamp(32px, 5vw, 56px) 0 clamp(56px, 8vw, 96px);
	font-family: var(--oidv-font);
	color: var(--oidv-text);
}

.oid-video .oid-video__title {
	margin: 0 0 clamp(20px, 3vw, 32px);
	color: var(--oidv-heading);
	font-size: clamp(30px, 4.2vw, 48px);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.oid-video__player .oid-video-player {
	box-shadow: var(--oidv-shadow);
}

.oid-video__description {
	max-width: 760px;
	margin: clamp(24px, 3vw, 36px) 0 0;
	font-size: 17px;
	line-height: 1.7;
}

.oid-video__description p {
	margin: 0 0 1em;
}

.oid-video__description p:last-child {
	margin-bottom: 0;
}

.oid-video .oid-video__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--oidv-brand);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	white-space: nowrap;
}

.oid-video .oid-video__cta::after {
	content: "";
	width: 16px;
	height: 11px;
	background: currentcolor;
	transition: transform var(--oidv-ease);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M12.2.3 11 1.5l3.6 3.6H0v1.8h14.6L11 10.5l1.2 1.2L17.9 6 12.2.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M12.2.3 11 1.5l3.6 3.6H0v1.8h14.6L11 10.5l1.2 1.2L17.9 6 12.2.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.oid-video .oid-video__cta:hover {
	color: var(--oi-link-hover, var(--oidv-brand));
}

.oid-video .oid-video__cta:hover::after {
	transform: translateX(3px);
}

.oid-video__related,
.oid-video__products {
	margin-top: clamp(48px, 7vw, 80px);
	padding-top: clamp(32px, 4vw, 48px);
	border-top: 1px solid var(--oi-gray-100, #ecedee);
}

.oid-video .oid-video__section-title {
	margin: 0 0 24px;
	color: var(--oidv-heading);
	font-size: clamp(22px, 2.4vw, 28px);
	line-height: 1.25;
}

/* Related videos sit in the 960px article: at most 3 across. */
.oid-video .oid-video-grid {
	gap: 24px;
}

/* ── Related products ───────────────────────────────────── */
.oid-product-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px;
	border-radius: var(--oidv-radius);
	background: var(--oidv-card);
}

.oid-product-card::before {
	content: "";
	display: block;
	width: 28px;
	height: 4px;
	margin-bottom: 8px;
	border-radius: 2px;
	background: var(--oidv-accent);
}

.oid-video .oid-product-card__name {
	margin: 0;
	color: var(--oidv-heading);
	font-size: var(--oi-title-card-sm, 18px);
	line-height: 1.35;
}

.oid-video .oid-product-card__description {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}

/* ── Utilities ──────────────────────────────────────────── */
.oid-screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.oid-video-card,
	.oid-video-card__media img,
	.oid-video-card__play,
	.oid-video-player__poster,
	.oid-video-player__play,
	.oid-video-button__arrow,
	.oid-video .oid-video__cta::after {
		transition: none;
	}

	.oid-video-card:hover,
	.oid-video-card:focus-within,
	.oid-video-card:hover .oid-video-card__media img,
	.oid-video-player[role="button"]:hover .oid-video-player__poster {
		transform: none;
	}
}
