.wgv-app {
	--wgv-ink: #1c1c1c;
	--wgv-muted: #6b7280;
	--wgv-line: #e6e6e6;
	--wgv-soft: #f3f4f6;
	--wgv-card: #ececec;
	color: var(--wgv-ink);
	font-family: "Leelawadee UI", "Sarabun", "Noto Sans Thai", Tahoma, sans-serif;
	line-height: 1.5;
}

.wgv-app *,
.wgv-app *::before,
.wgv-app *::after {
	box-sizing: border-box;
}

.wgv-wrap {
	width: min(1180px, calc(100% - 32px));
	max-width: calc(100vw - 32px);
	margin: 0 auto;
}

.wgv-hero {
	position: relative;
	isolation: isolate;
	padding: 22px 0 28px;
	margin: 0 0 18px;
}

.wgv-hero::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 100vw;
	transform: translateX(-50%);
	background-color: var(--wgv-soft);
	background-image: repeating-linear-gradient(
		-28deg,
		transparent,
		transparent 18px,
		rgba(0, 0, 0, 0.035) 18px,
		rgba(0, 0, 0, 0.035) 19px
	);
}

.wgv-hero.has-bg::before {
	background-color: #1c1c1c;
	background-image:
		linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)),
		var(--wgv-hero-image);
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
}

.wgv-hero.has-bg .wgv-hero-title,
.wgv-hero.has-bg .wgv-hero-sub,
.wgv-hero.has-bg .wgv-crumb,
.wgv-hero.has-bg .wgv-crumb a {
	color: #fff;
}

.wgv-hero.has-bg .wgv-crumb a:hover {
	color: #fff;
}

.wgv-hero-grid {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
}

.wgv-hero-copy {
	min-width: 0;
}

.wgv-hero .wgv-crumb {
	margin: 0 0 14px;
}

.wgv-hero-title {
	margin: 0;
	font-size: 40px;
	line-height: 1.2;
	font-weight: 700;
	color: #111;
}

.wgv-hero-title-plain {
	margin-top: 8px;
}

.wgv-hero-sub {
	margin: 8px 0 0;
	color: #444;
	font-size: 16px;
}

.wgv-crumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 18px 0 8px;
	color: var(--wgv-muted);
	font-size: 13px;
}

.wgv-crumb a {
	color: var(--wgv-muted);
	text-decoration: none;
}

.wgv-crumb a:hover {
	color: #111;
	text-decoration: underline;
}

.wgv-crumb-sep {
	margin: 0 8px;
}

.wgv-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px 28px;
	margin: 6px 0 22px;
}

.wgv-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
}

.wgv-pill {
	display: inline-flex;
	align-items: center;
	border: 1px solid #e3e3e3;
	background: #fff;
	color: #222;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 14px;
	line-height: 1.3;
	text-decoration: none;
}

.wgv-pill:hover {
	border-color: #111;
	color: #111;
}

.wgv-pill.is-active {
	background: #2a2a2a;
	border-color: #2a2a2a;
	color: #fff;
}

.wgv-toolbar-end {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-left: auto;
	color: #444;
	font-size: 14px;
}

.wgv-total {
	margin: 0;
	white-space: nowrap;
}

.wgv-sort {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--wgv-muted);
}

.wgv-sort select {
	appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23333' stroke-width='1.4' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
	border: 1px solid #e1e1e1;
	border-radius: 8px;
	padding: 7px 32px 7px 12px;
	font: inherit;
	color: #222;
	cursor: pointer;
}

.wgv-grid,
.wgv-related {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wgv-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px 18px;
}

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

@media (min-width: 1025px) {
	.wgv-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.wgv-card,
.wgv-related-item {
	display: flex;
	color: inherit;
	text-decoration: none;
}

.wgv-card {
	flex-direction: column;
}

.wgv-card:hover,
.wgv-related-item:hover {
	color: inherit;
}

.wgv-thumb,
.wgv-related-thumb {
	position: relative;
	display: block;
	background: var(--wgv-card);
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.wgv-thumb.is-empty,
.wgv-related-thumb.is-empty,
.wgv-player.is-empty {
	background:
		linear-gradient(to top left, transparent calc(50% - 1px), rgba(0, 0, 0, 0.08), transparent calc(50% + 1px)),
		linear-gradient(to top right, transparent calc(50% - 1px), rgba(0, 0, 0, 0.08), transparent calc(50% + 1px)),
		var(--wgv-card);
}

.wgv-thumb picture,
.wgv-related-thumb picture {
	display: block;
	width: 100%;
	height: 100%;
}

.wgv-cat-head {
	display: flex;
	gap: 16px;
	align-items: center;
	margin: 0 0 18px;
}

.wgv-cat-head img {
	width: 180px;
	max-width: 42%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 10px;
}

.wgv-caption-downloads {
	margin: 8px 0 0;
	font-size: 13px;
}

.wgv-caption-downloads a {
	margin-right: 12px;
}

.wgv-thumb img,
.wgv-related-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.wgv-card:hover .wgv-thumb img {
	transform: scale(1.035);
}

.wgv-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border-radius: 50%;
	background: rgba(35, 35, 35, 0.55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.wgv-play svg {
	width: 18px;
	height: 18px;
	margin-left: 2px;
}

.wgv-duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	background: rgba(20, 20, 20, 0.82);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	padding: 4px 6px;
	border-radius: 4px;
	font-variant-numeric: tabular-nums;
}

.wgv-card-title,
.wgv-related-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 700;
	line-height: 1.45;
}

.wgv-card-title {
	margin-top: 10px;
	font-size: 15px;
}

.wgv-card-meta,
.wgv-watch-meta,
.wgv-meta-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.wgv-card-meta {
	margin: 6px 0 0;
	color: var(--wgv-muted);
	font-size: 12.5px;
	flex-wrap: wrap;
	gap: 4px;
}

.wgv-meta-item {
	white-space: nowrap;
	gap: 4px;
}

.wgv-meta-sep {
	color: #c5c5c5;
}

.wgv-watch {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 28px 32px;
	align-items: start;
	margin-top: 8px;
}

.wgv-watch-title {
	margin: 10px 0 0;
	font-size: 26px;
	line-height: 1.35;
	font-weight: 700;
}

.wgv-watch-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 10px 0 14px;
}

.wgv-watch-meta {
	margin: 0;
	color: var(--wgv-muted);
	font-size: 14px;
	flex-wrap: wrap;
}

.wgv-share {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.wgv-share-btn,
.wgv-side-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: #222;
	border: 1px solid #e5e7eb;
	text-decoration: none;
}

.wgv-share-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
}

.wgv-share-btn:hover,
.wgv-side-more:hover {
	border-color: #111;
	color: #111;
}

.wgv-embed,
.wgv-player {
	position: relative;
	background: #141414;
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

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

.wgv-player video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	background: #111;
}

.wgv-player.is-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #555;
}

.wgv-player.is-empty a {
	color: #222;
}

.wgv-captions {
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 40px;
	z-index: 2;
	margin: 0;
	text-align: center;
	color: #fff;
	font-size: clamp(16px, 2.2vw, 22px);
	font-weight: 600;
	line-height: 1.35;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.85);
	pointer-events: none;
	white-space: pre-line;
}

.wgv-player.is-ui .wgv-captions {
	bottom: 112px;
}

.wgv-captions[hidden] {
	display: none;
}

.wgv-bigplay {
	position: absolute;
	left: 50%;
	top: 46%;
	width: 74px;
	height: 74px;
	margin: -37px 0 0 -37px;
	border: 0;
	border-radius: 50%;
	background: rgba(20, 20, 20, 0.45);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
}

.wgv-bigplay[hidden] {
	display: none;
}

.wgv-bigplay svg {
	width: 30px;
	height: 30px;
	margin-left: 3px;
}

.wgv-controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 28px 10px 8px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
	color: #fff;
	opacity: 1;
	transition: opacity 0.18s ease;
}

.wgv-player.is-playing:not(.is-ui) .wgv-controls {
	opacity: 0;
	pointer-events: none;
}

.wgv-controls[hidden] {
	display: none;
}

.wgv-seek {
	width: 100%;
	margin: 0 0 4px;
	accent-color: #fff;
	cursor: pointer;
}

.wgv-controls-bar {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wgv-ctl {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
	padding: 0;
	flex: 0 0 auto;
}

.wgv-ctl:hover {
	background: rgba(255, 255, 255, 0.14);
}

.wgv-player.is-playing .wgv-icon-play,
.wgv-player:not(.is-playing) .wgv-icon-pause {
	display: none;
}

.wgv-time {
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wgv-spacer {
	flex: 1;
}

.wgv-volume {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.wgv-vol {
	width: 72px;
	accent-color: #fff;
	cursor: pointer;
}

.wgv-menu {
	position: absolute;
	right: 8px;
	bottom: 54px;
	display: flex;
	gap: 8px;
	background: rgba(28, 28, 28, 0.96);
	border-radius: 12px;
	padding: 10px 12px 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.wgv-menu[hidden] {
	display: none;
}

.wgv-menu-col {
	min-width: 148px;
}

.wgv-menu-col p {
	margin: 0 0 6px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
}

.wgv-menu button {
	display: flex;
	width: 100%;
	justify-content: space-between;
	gap: 12px;
	align-items: center;
	border: 0;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 14px;
	text-align: left;
	padding: 6px 4px;
	border-radius: 6px;
	cursor: pointer;
}

.wgv-menu button:hover,
.wgv-menu button.is-active {
	background: rgba(255, 255, 255, 0.08);
}

.wgv-check {
	visibility: hidden;
}

.wgv-menu button.is-active .wgv-check {
	visibility: visible;
}

.wgv-auto-picked:empty {
	display: none;
}

.wgv-auto-picked {
	color: rgba(255, 255, 255, 0.72);
	font-size: 12px;
}

.wgv-player-error {
	position: absolute;
	left: 12px;
	right: 12px;
	top: 12px;
	margin: 0;
	color: #fff;
	background: rgba(120, 20, 20, 0.85);
	border-radius: 8px;
	padding: 8px 10px;
	z-index: 4;
}

.wgv-player-error[hidden] {
	display: none;
}

.wgv-player:fullscreen,
.wgv-player:-webkit-full-screen {
	aspect-ratio: auto;
	width: 100%;
	height: 100%;
	border-radius: 0;
	background: #000;
}

.wgv-player:fullscreen video,
.wgv-player:-webkit-full-screen video {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.wgv-desc {
	margin-top: 22px;
	color: #222;
	font-size: 16px;
	line-height: 1.75;
}

.wgv-desc > *:first-child {
	margin-top: 0;
}

.wgv-desc h2,
.wgv-desc h3,
.wgv-desc h4 {
	margin: 1.2em 0 0.4em;
	line-height: 1.35;
}

.wgv-desc img,
.wgv-desc video,
.wgv-desc iframe {
	max-width: 100%;
	height: auto;
}

.wgv-desc ul,
.wgv-desc ol {
	padding-left: 1.3em;
}

.wgv-side h2 {
	margin: 0 0 12px;
	font-size: 18px;
}

.wgv-related {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wgv-related-item {
	gap: 10px;
	align-items: flex-start;
}

.wgv-related-thumb {
	width: 132px;
	flex: 0 0 132px;
	border-radius: 8px;
}

.wgv-related-thumb .wgv-duration {
	font-size: 11px;
	padding: 3px 5px;
}

.wgv-related-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wgv-related-title {
	font-size: 14px;
}

.wgv-side-empty {
	margin: 0 0 12px;
	color: var(--wgv-muted);
}

.wgv-side-more {
	width: 100%;
	margin-top: 14px;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14px;
}

.wgv-pager {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 36px 0 12px;
}

.wgv-pager a,
.wgv-pager span {
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--wgv-line);
	border-radius: 8px;
	color: #222;
	text-decoration: none;
	background: #fff;
	font-size: 14px;
}

.wgv-pager .is-current {
	background: #2c2c2c;
	border-color: #2c2c2c;
	color: #fff;
}

.wgv-pager .is-disabled {
	opacity: 0.35;
}

.wgv-pager .is-gap {
	border: 0;
	background: transparent;
	min-width: 24px;
}

.wgv-empty {
	margin: 12px 0 24px;
	padding: 48px 16px;
	text-align: center;
	color: #666;
	border: 1px dashed #ddd;
	border-radius: 12px;
}

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

.wgv-card:focus-visible,
.wgv-related-item:focus-visible,
.wgv-pill:focus-visible,
.wgv-share-btn:focus-visible,
.wgv-side-more:focus-visible,
.wgv-pager a:focus-visible,
.wgv-sort select:focus-visible,
.wgv-ctl:focus-visible,
.wgv-bigplay:focus-visible,
.wgv-player:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.wgv-player:focus-visible,
.wgv-ctl:focus-visible,
.wgv-bigplay:focus-visible {
	outline-color: #fff;
}

html:has(body.wow-video-page),
body.wow-video-page {
	overflow-x: clip;
}

body.wow-video-page .wp-block-post-title,
body.wow-video-page h1.entry-title,
body.wow-video-page .entry-title {
	display: none;
}

/* Theme content columns cap direct children. The library needs the wide measure from the mockup. */
body.wow-video-page main.wp-block-group {
	margin-top: 0 !important;
}

body.wow-video-page main > .wp-block-group {
	padding-top: 0;
}

body.wow-video-page .is-layout-constrained > .wgv-app,
body.wow-video-page .has-global-padding > .wgv-app {
	width: auto !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

@media (max-width: 1024px) {
	.wgv-watch {
		grid-template-columns: 1fr;
	}

	.wgv-side {
		order: 2;
	}
}

@media (max-width: 720px) {
	.wgv-hero-title {
		font-size: 30px;
	}

	.wgv-hero-grid,
	.wgv-toolbar,
	.wgv-watch-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.wgv-toolbar-end {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		justify-content: space-between;
		flex-wrap: wrap;
	}

	.wgv-sort {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-items: center;
		gap: 8px;
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}

	.wgv-sort select {
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}

	.wgv-controls {
		padding: 22px 6px 6px;
	}

	.wgv-controls-bar {
		gap: 2px;
	}

	.wgv-ctl {
		width: 30px;
		height: 30px;
	}

	.wgv-time {
		font-size: 12px;
	}

	.wgv-watch-title {
		font-size: 22px;
	}

	.wgv-vol {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wgv-thumb img,
	.wgv-controls {
		transition: none;
	}
}
body.wow-video-page .wgv-hero{display:none}
body.wow-video-page .wgv-app{font-family:inherit}

body.wow-video-page .wgv-share{display:none}
