/* Public styles for Podcastit & videot */

/**
 * Deliberately unopinionated about type and colour: the theme owns those.
 * This file only handles layout, the cover image and the play button.
 */

.pcv-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
	gap: 2rem;
	margin: 2rem 0;
}

.pcv-card {
	margin: 0;
}

.pcv-card__player {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	padding: 0;
	border: 0;
	border-radius: 6px;
	overflow: hidden;
	background: #1a1a1a;
	cursor: pointer;
}

.pcv-card__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pcv-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	transform: translate( -50%, -50% );
	border-radius: 50%;
	background: rgba( 0, 0, 0, 0.55 );
	transition: background 0.15s ease;
}

.pcv-card__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate( -50%, -50% );
	border-style: solid;
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #fff;
}

.pcv-card__player:hover .pcv-card__play,
.pcv-card__player:focus-visible .pcv-card__play {
	background: rgba( 0, 0, 0, 0.8 );
}

.pcv-card__player:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.pcv-card__frame {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 6px;
}

/* Spotify's player has a fixed height and ignores a 16:9 box. */
.pcv-card--spotify .pcv-card__player,
.pcv-card--spotify .pcv-card__frame {
	aspect-ratio: auto;
	height: 232px;
}

.pcv-card__title {
	margin: 0.75rem 0 0.25rem;
}

.pcv-card__text {
	margin: 0;
}

.pcv-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
	border: 0;
}
