/*
 * Investor - Videos.
 *
 * Read from cp-all-designer investor/shareholder-information/
 * video-meeting-of-shareholders/, css/news.css (.nls__grid, and .ncard as that
 * grid dresses it) and css/app.css:4444-4500 (.vmodal), each figure as the
 * page itself draws it at 1920, 1024 and 390.
 *
 * The band and the head are the investor parent's. Every measure a Style
 * control states is stated on the control for each tier, and not here.
 */

.custom-investor-videos {
	--custom-videos-ink: #16418C;
	--custom-videos-lit: #50A3D5;
	--custom-videos-play: #FFFFFF;
	--custom-videos-play-ink: #CE2929;
}

.custom-investor-videos .custom-investor-videos__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
	padding: 0;
}

/* the reveal walks across the row, so a row of stills arrives together */
.custom-investor-videos .custom-investor-videos__grid > :nth-child(3n+2) {
	transition-delay: 80ms;
}

.custom-investor-videos .custom-investor-videos__grid > :nth-child(3n+3) {
	transition-delay: 160ms;
}

.custom-investor-videos .custom-investor-videos__card {
	--custom-press-ink: var(--custom-videos-ink);
	--custom-press-ground: none;
	--custom-press-edge: transparent;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	/* the reveal's own 700ms is answered by this, as the design's is */
	transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-investor-videos .custom-investor-videos__card:focus-visible {
	outline: 2px solid #50A3D5;
	outline-offset: 4px;
}

.custom-investor-videos .custom-investor-videos__still-box {
	position: relative;
	display: block;
}

/* the still takes the newsroom's own crop, 400 by 243 */
.custom-investor-videos .custom-investor-videos__still {
	display: block;
	aspect-ratio: 400 / 243;
}

.custom-investor-videos .custom-investor-videos__still > img {
	transition: transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* the play mark stands at the middle of the still, on a soft dark halo */
.custom-investor-videos .custom-investor-videos__play {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	display: grid;
	place-items: center;
	margin: auto;
	border-radius: 50%;
	background-color: var(--custom-videos-play);
	color: var(--custom-videos-play-ink);
	box-shadow: 0 12px 30px -10px rgba(14, 23, 41, 0.6);
	transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-investor-videos .custom-investor-videos__play::before {
	content: "";
	position: absolute;
	top: -22px;
	right: -22px;
	bottom: -22px;
	left: -22px;
	z-index: -1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(6, 11, 30, 0.38) 0%, rgba(6, 11, 30, 0) 70%);
}

.custom-investor-videos .custom-investor-videos__play svg {
	display: block;
	margin-left: 2px;
}

.custom-investor-videos .custom-investor-videos__card-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.custom-investor-videos .custom-investor-videos__card-title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	padding: 0;
	color: var(--custom-videos-ink);
	font-family: inherit;
	font-style: normal;
	font-weight: 600;
	line-height: 1.36;
	letter-spacing: 0;                     /* the page measures -0.18px */
	text-transform: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	transition: color 250ms ease;
}

/* css/app.css — .ncard:hover */
.custom-investor-videos a.custom-investor-videos__card:hover {
	transform: translateY(-4px);
}

.custom-investor-videos a.custom-investor-videos__card:hover .custom-investor-videos__still > img {
	transform: scale(1.05);
}

.custom-investor-videos a.custom-investor-videos__card:hover .custom-investor-videos__play {
	transform: scale(1.1);
}

.custom-investor-videos a.custom-investor-videos__card:hover .custom-investor-videos__card-title {
	color: var(--custom-videos-lit);
}

/* ------------------------------------------------------------------ */
/* The player — css/app.css:4457-4500                                  */
/* ------------------------------------------------------------------ */

.custom-investor-videos-player {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100000;                       /* over the page's fixed bar and WordPress's own */
	display: grid;
	place-items: center;
	box-sizing: border-box;
	padding: 28px;                         /* app.css:4460 (28.8) */
	opacity: 0;
	visibility: hidden;
	transition: opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 300ms;
}

.custom-investor-videos-player.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-investor-videos-player__backdrop {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: rgba(6, 14, 40, 0.82);
}

.custom-investor-videos-player__dialog {
	position: relative;
	width: 100%;
	max-width: 1080px;
	transform: translateY(14px);
	transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-investor-videos-player.is-open .custom-investor-videos-player__dialog {
	transform: none;
}

/* the shape comes from the frame, not from what is still loading in it */
.custom-investor-videos-player__frame {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	background-color: #000000;
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}

.custom-investor-videos-player__frame iframe {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* the close press stands over the frame's corner, never on the recording */
.custom-investor-videos-player__close,
.custom-investor-videos-player__close:hover,
.custom-investor-videos-player__close:focus {
	position: absolute;
	top: -46px;
	right: 0;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.14);
	color: #FFFFFF;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-investor-videos-player__close:hover {
	background-color: rgba(255, 255, 255, 0.26);
}

.custom-investor-videos-player__close:focus-visible {
	outline: 2px solid #50A3D5;
	outline-offset: 2px;
}

.custom-investor-videos-player__close svg {
	width: 18px;
	height: 18px;
}

.custom-investor-videos body.custom-investor-videos-playing {
	overflow: hidden;
}

/* Tablet — 768px to 1024px (css/news.css:509-514): two to a row */
@media (max-width: 1024px) {
	.custom-investor-videos .custom-investor-videos__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.custom-investor-videos .custom-investor-videos__grid > :nth-child(3n+2),
	.custom-investor-videos .custom-investor-videos__grid > :nth-child(3n+3) {
		transition-delay: 0ms;
	}
	.custom-investor-videos .custom-investor-videos__grid > :nth-child(2n) {
		transition-delay: 80ms;
	}
	.custom-investor-videos-player {
		padding: 18px;                     /* app.css:4460 (18.4) */
	}
}

/* Mobile — up to 767px (css/news.css:516-519): one to a row */
@media (max-width: 767px) {
	.custom-investor-videos .custom-investor-videos__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.custom-investor-videos .custom-investor-videos__grid > * {
		transition-delay: 0ms;
	}
	.custom-investor-videos-player {
		padding: 16px;
	}
	/* no room over the frame on a phone: the close press stands under it, at the middle */
	.custom-investor-videos-player__close,
	.custom-investor-videos-player__close:hover,
	.custom-investor-videos-player__close:focus {
		top: auto;
		right: 50%;
		bottom: -46px;
		transform: translateX(50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.custom-investor-videos .custom-investor-videos__card,
	.custom-investor-videos .custom-investor-videos__still > img,
	.custom-investor-videos .custom-investor-videos__play,
	.custom-investor-videos .custom-investor-videos__card-title,
	.custom-investor-videos-player,
	.custom-investor-videos-player__dialog {
		transition: none;
	}
}
