/* Lewis Studios Video Gallery — scoped under .ls-vg-root */

/* =========================================================================
   Controls Bar
   ========================================================================= */

.ls-vg-root {
	box-sizing: border-box;
	font-family: inherit;
}

.ls-vg-root *,
.ls-vg-root *::before,
.ls-vg-root *::after {
	box-sizing: inherit;
}

.ls-vg-controls-wrap {
	/* Unstyled by default; becomes sticky via .ls-vg-sticky modifier. */
}

.ls-vg-root.ls-vg-sticky .ls-vg-controls-wrap.is-stuck {
	position: fixed;
	/* top is set dynamically via JS to account for sticky_offset */
	z-index: 100;
	background: #fff;
	padding: 12px 0 4px;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.08 );
}

.ls-vg-controls-heading {
	font-size: 16px;
	font-weight: 700;
	color: #111;
	margin-bottom: 8px;
}

.ls-vg-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
}

.ls-vg-search,
.ls-vg-filter {
	flex: 1 1 0;
	min-width: 120px;
}

/* Temporarily hidden for initial client testing — code and logic remain intact. */
.ls-vg-controls-heading,
.ls-vg-filter[data-tax="ls_param_name"],
.ls-vg-filter[data-tax="ls_param_symbol"],
.ls-vg-sort {
	display: none;
}

.ls-vg-search {
	padding: 7px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}

.ls-vg-filter,
.ls-vg-sort {
	padding: 7px 30px 7px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.ls-vg-view-toggle {
	display: flex;
	gap: 0;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
}

.ls-vg-view-btn {
	padding: 7px 12px;
	background: #fff;
	border: none;
	cursor: pointer;
	font-size: 13px;
	color: #555;
	line-height: 1;
}

.ls-vg-reset-btn {
	padding: 7px 12px;
	background: transparent;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 13px;
	color: #555;
	cursor: pointer;
	white-space: nowrap;
}

.ls-vg-reset-btn:hover {
	border-color: #999;
	color: #111;
}

.ls-vg-view-btn:not(:last-child) {
	border-right: 1px solid #ccc;
}

.ls-vg-view-btn.is-active {
	background: #333;
	color: #fff;
}

/* =========================================================================
   Play Button Overlay
   ========================================================================= */

.ls-vg-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	width: 60px;
	height: 60px;
	pointer-events: none;
	opacity: 0.9;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.ls-vg-play-btn svg {
	width: 100%;
	height: 100%;
	display: block;
}

.ls-vg-card:hover .ls-vg-play-btn,
.ls-vg-row:hover .ls-vg-play-btn {
	opacity: 1;
	transform: translate( -50%, -50% ) scale( 1.1 );
}

/* =========================================================================
   Pills — parameter name / symbol badges (unscoped: used in cards + modal)
   ========================================================================= */

.ls-vg-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 8px 12px 6px;
}

.ls-vg-pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
}

.ls-vg-pill--category {
	background: #dcfce7;
	color: #166534;
	border: none;
	font-family: inherit;
	cursor: pointer;
}

.ls-vg-pill--category:hover {
	background: #bbf7d0;
}

.ls-vg-pill--name {
	background: #e8f0fe;
	color: #1a56db;
}

.ls-vg-pill--symbol {
	background: #fef3c7;
	color: #92400e;
}

/* =========================================================================
   Share button + panel
   ========================================================================= */

.ls-vg-share {
	padding: 0 14px 12px;
}

.ls-vg-row-body .ls-vg-share,
.ls-vg-modal-content .ls-vg-share {
	padding: 8px 0 0;
}

.ls-vg-share-btn {
	font-size: 12px;
	padding: 3px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #555;
	cursor: pointer;
	font-family: inherit;
}

.ls-vg-share-btn:hover {
	background: #333;
	border-color: #333;
	color: #fff;
}

.ls-vg-share-panel {
	display: none;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
}

.ls-vg-share-panel.is-open {
	display: flex;
}

.ls-vg-share-url {
	flex: 1 1 0;
	min-width: 0;
	font-size: 11px;
	padding: 4px 7px;
	border: 1px solid #ccc;
	border-radius: 4px;
	color: #555;
	background: #f9f9f9;
	font-family: inherit;
}

.ls-vg-share-copy {
	flex-shrink: 0;
	font-size: 12px;
	padding: 3px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #555;
	cursor: pointer;
	white-space: nowrap;
	font-family: inherit;
}

.ls-vg-share-copy:hover {
	background: #333;
	border-color: #333;
	color: #fff;
}

/* =========================================================================
   No Results
   ========================================================================= */

.ls-vg-no-results {
	padding: 40px 0;
	text-align: center;
	color: #777;
	font-size: 15px;
}

/* =========================================================================
   Grid View
   ========================================================================= */

.ls-vg-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 20px;
}

@media ( max-width: 1023px ) {
	.ls-vg-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 639px ) {
	.ls-vg-grid {
		grid-template-columns: 1fr;
	}
}

.ls-vg-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow 0.15s ease;
}

.ls-vg-card:hover {
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.12 );
}

.ls-vg-card-thumb {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 */
	background: #f0f0f0;
	overflow: hidden;
}

.ls-vg-card-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ls-vg-card-thumb .ls-vg-thumb-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e8e8e8;
}

.ls-vg-card-thumb .ls-vg-thumb-fallback svg {
	width: 48px;
	height: 48px;
	opacity: 0.5;
}

.ls-vg-card-body {
	padding: 12px 14px;
}

.ls-vg-card-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #111;
}

.ls-vg-card-excerpt {
	margin: 0;
	font-size: 13px;
	color: #555;
	line-height: 1.5;
}

/* =========================================================================
   List View
   ========================================================================= */

.ls-vg-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ls-vg-row {
	display: flex;
	align-items: stretch;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow 0.15s ease;
}

.ls-vg-row:hover {
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.12 );
}

.ls-vg-row-play {
	flex-shrink: 0;
	width: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	border-right: 1px solid #e0e0e0;
	transition: background 0.15s ease;
}

.ls-vg-row-play svg {
	width: 44px;
	height: 44px;
	display: block;
	transition: transform 0.15s ease;
}

.ls-vg-row:hover .ls-vg-row-play {
	background: #ebebeb;
}

.ls-vg-row:hover .ls-vg-row-play svg {
	transform: scale( 1.1 );
}

.ls-vg-row-body {
	padding: 12px 14px;
	flex: 1 1 auto;
}

.ls-vg-row-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #111;
}

.ls-vg-row-excerpt {
	margin: 0;
	font-size: 13px;
	color: #555;
	line-height: 1.5;
}


/* =========================================================================
   Modal
   ========================================================================= */

.ls-vg-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.78 );
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 20px;
}

.ls-vg-modal {
	background: #fff;
	border-radius: 8px;
	width: 100%;
	max-width: 900px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
}

.ls-vg-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #333;
	cursor: pointer;
	z-index: 1;
	padding: 0 4px;
}

.ls-vg-modal-close:hover {
	color: #000;
}

.ls-vg-modal-player {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 */
	background: #000;
	border-radius: 8px 8px 0 0;
	overflow: hidden;
}

.ls-vg-modal-player iframe,
.ls-vg-modal-player video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}

.ls-vg-modal-content {
	padding: 20px 24px 24px;
}

.ls-vg-modal-title {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 700;
	color: #111;
	padding-right: 32px; /* Clear the close button. */
}

.ls-vg-modal-body {
	font-size: 14px;
	color: #444;
	line-height: 1.7;
}

.ls-vg-modal-body p:first-child {
	margin-top: 0;
}

.ls-vg-modal-body p:last-child {
	margin-bottom: 0;
}

/* =========================================================================
   Single Post View
   ========================================================================= */

.ls-vg-single-player {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	background: #000;
	margin-bottom: 12px;
}

.ls-vg-single-player iframe,
.ls-vg-single-player video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}

.ls-vg-single-meta {
	margin: 0 0 16px;
	font-size: 12px;
	font-weight: 700;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
