/*
 * Gourmet Videos — public styles.
 *
 * Every class is prefixed `.gfvideo-` (spec section 22) specifically so
 * this stylesheet can never collide with the active theme's or another
 * plugin's generic class names (`.video`, `.card`, `.container`, `.title`,
 * etc.). Mobile-first: unprefixed rules are the single-column mobile
 * layout, with tablet/desktop column counts added only inside the
 * min-width media queries below. Only ever enqueued on pages that actually
 * use it (see GF_Vid_Frontend::maybe_enqueue_assets()).
 */

.gfvideo-empty {
	opacity: 0.7;
	font-style: italic;
}

/* ---------- Grid & cards (archive, shortcode/block, related videos) ---------- */

.gfvideo-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin: 1.5rem 0;
}

@media (min-width: 600px) {
	.gfvideo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
	.gfvideo-columns-2.gfvideo-grid { grid-template-columns: repeat(2, 1fr); }
	.gfvideo-columns-3.gfvideo-grid { grid-template-columns: repeat(3, 1fr); }
	.gfvideo-columns-4.gfvideo-grid { grid-template-columns: repeat(4, 1fr); }
}

.gfvideo-card {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	position: relative;
}

.gfvideo-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: #111;
	overflow: hidden;
}

.gfvideo-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gfvideo-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 2.5rem;
	height: 2.5rem;
	line-height: 2.5rem;
	text-align: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 1rem;
	pointer-events: none;
}

.gfvideo-duration {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 0.75rem;
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
}

.gfvideo-card-body {
	padding: 0.9rem 1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1;
}

.gfvideo-card-category {
	align-self: flex-start;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #7a5c2e;
	background: #f3ead9;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
}

.gfvideo-card-title {
	font-size: 1rem;
	line-height: 1.35;
	margin: 0;
}

.gfvideo-card-title a {
	text-decoration: none;
	color: inherit;
}

.gfvideo-card-excerpt {
	margin: 0;
	font-size: 0.88rem;
	color: #555;
	line-height: 1.45;
}

.gfvideo-card-meta {
	display: flex;
	justify-content: space-between;
	font-size: 0.8rem;
	color: #777;
	margin-top: 0.15rem;
}

.gfvideo-card-cta {
	margin-top: 0.4rem;
	display: inline-block;
	align-self: flex-start;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	color: #0a5c36;
	border: 1px solid #0a5c36;
	padding: 0.35rem 0.8rem;
	border-radius: 6px;
}

.gfvideo-card-cta:hover {
	background: #0a5c36;
	color: #fff;
}

/* ---------- Advertisement video card (spec section 6) ---------- */

.gfvideo-card-ad {
	border: 1px dashed #c9a227;
}

.gfvideo-ad-label {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 2;
	background: #c9a227;
	color: #2b2200;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.15rem 0.55rem;
	border-radius: 4px;
}

/* ---------- Archive page ---------- */

.gfvideo-archive-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
}

.gfvideo-archive-header {
	text-align: center;
	margin-bottom: 1.5rem;
}

.gfvideo-archive-title {
	margin-bottom: 0.3rem;
}

.gfvideo-archive-subtitle {
	color: #666;
}

.gfvideo-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 2rem;
	justify-content: center;
}

.gfvideo-search-input {
	flex: 1 1 220px;
	max-width: 400px;
	padding: 0.5rem 0.75rem;
}

.gfvideo-category-filter {
	padding: 0.5rem 0.75rem;
}

.gfvideo-search-submit {
	padding: 0.5rem 1.2rem;
}

.gfvideo-section-heading {
	margin: 2rem 0 1rem;
}

.gfvideo-pagination {
	display: flex;
	justify-content: center;
	gap: 0.4rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.gfvideo-pagination .page-numbers {
	padding: 0.4rem 0.8rem;
	border: 1px solid #ddd;
	border-radius: 6px;
	text-decoration: none;
}

.gfvideo-pagination .page-numbers.current {
	background: #0a5c36;
	color: #fff;
	border-color: #0a5c36;
}

/* ---------- Single video page: 70/30 layout, stacking on mobile/tablet ---------- */

.gfvideo-single-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

@media (min-width: 1000px) {
	.gfvideo-single-wrap.gfvideo-has-sidebar {
		flex-direction: row;
		align-items: flex-start;
	}
	.gfvideo-single-wrap.gfvideo-has-sidebar .gfvideo-single-main {
		flex: 0 0 70%;
		max-width: 70%;
	}
	.gfvideo-single-wrap.gfvideo-has-sidebar .gfvideo-single-sidebar {
		flex: 0 0 30%;
		max-width: 30%;
		position: sticky;
		top: 1rem;
	}
}

.gfvideo-single-main {
	min-width: 0; /* prevents the embed/iframe from forcing horizontal overflow */
}

.gfvideo-embed-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #111;
	border-radius: 10px;
	overflow: hidden;
	margin: 1rem 0;
}

.gfvideo-embed-wrap iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.gfvideo-single-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 1rem;
	align-items: center;
}

.gfvideo-category-badge {
	font-size: 0.75rem;
	background: #f3ead9;
	color: #7a5c2e;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
}

.gfvideo-preview-notice {
	background: #fff8e5;
	border: 1px solid #f0c33c;
	padding: 0.6rem 0.9rem;
	border-radius: 6px;
	font-size: 0.9rem;
}

.gfvideo-attribution {
	font-size: 0.85rem;
	color: #777;
}

/* ---------- Sidebar / AdSense slots ---------- */

.gfvideo-single-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.gfvideo-adsense-slot {
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 0.75rem;
	overflow: hidden; /* keeps a wide ad unit from creating horizontal overflow */
}

.gfvideo-adsense-label {
	display: block;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #999;
	margin-bottom: 0.5rem;
}

.gfvideo-adsense-code {
	max-width: 100%;
	overflow: hidden;
}

/* ---------- Related videos ---------- */

.gfvideo-related-section {
	margin-top: 2.5rem;
}

.gfvideo-related-grid.gfvideo-grid {
	grid-template-columns: 1fr;
}

@media (min-width: 600px) {
	.gfvideo-related-grid.gfvideo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
	.gfvideo-related-grid.gfvideo-grid { grid-template-columns: repeat(3, 1fr); }
}
