/* Tutorial videos page and the videos in the Guides (Nomen_Licensing_Videos).
   Colours are the theme's. */

.nomen-videos__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: 2.5rem 2rem;
	margin: 2rem 0 3rem;
}

.nomen-videos__heading {
	margin-top: 3rem;
}

.nomen-video {
	margin: 0;
}

.nomen-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border, #2a2520);
	border-radius: 6px;
	background: var(--wp--preset--color--panel, #1e1b16);
}

.nomen-video__play,
.nomen-video__player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.nomen-video__play {
	padding: 0;
	margin: 0;
	background: none;
	cursor: pointer;
}

.nomen-video__play img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* On the poster's photo side, below the middle: the title column and the
   bottom-right length badge stay clear. */
.nomen-video__icon {
	position: absolute;
	top: 72%;
	left: 77%;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	border-radius: 50%;
	background: rgba(26, 23, 20, 0.82);
	border: 2px solid var(--wp--preset--color--accent, #b8a060);
	transition: transform 0.15s ease, background 0.15s ease;
}

.nomen-video__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -6px;
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent var(--wp--preset--color--white, #f4efe8);
}

.nomen-video__play:hover .nomen-video__icon,
.nomen-video__play:focus-visible .nomen-video__icon {
	transform: scale(1.08);
	background: rgba(26, 23, 20, 0.95);
}

.nomen-video__play:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent, #b8a060);
	outline-offset: -3px;
}

.nomen-video__length {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 2px 7px;
	border-radius: 4px;
	background: rgba(10, 12, 11, 0.85);
	color: var(--wp--preset--color--white, #f4efe8);
	font-size: 0.8rem;
	line-height: 1.5;
}

.nomen-video__title {
	margin: 1rem 0 0.5rem;
}

.nomen-video__text {
	margin: 0 0 0.75rem;
}

.nomen-video__transcript summary {
	cursor: pointer;
	color: var(--wp--preset--color--accent, #b8a060);
}

.nomen-video__transcript p {
	font-size: 0.95em;
}

/* One video inside a page's text, as in a guide. */
.nomen-video--inline {
	margin: 0 0 2.25rem;
}

.nomen-video__caption {
	margin: 0.75rem 0 0.5rem;
	font-size: 0.95em;
}
