/**
 * PVH Search - Professional YouTube-Style Design
 *
 * @package Polanger_VideoHub
 * @since   1.0.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

.pvh-search-wrapper {
	--pvh-primary: #065fd4;
	--pvh-primary-hover: #0550b8;
	--pvh-bg: #ffffff;
	--pvh-bg-secondary: #f2f2f2;
	--pvh-bg-hover: #e5e5e5;
	--pvh-text: #0f0f0f;
	--pvh-text-secondary: #606060;
	--pvh-border: #d3d3d3;
	--pvh-border-light: #e5e5e5;
	--pvh-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	--pvh-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
	--pvh-radius: 24px;
	--pvh-radius-sm: 8px;
	--pvh-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pvh-is-hidden {
	display: none;
}

/* ==========================================================================
   Search Wrapper
   ========================================================================== */

.pvh-search-wrapper {
	margin-bottom: 28px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	overflow: visible;
}

body.single-pvh_video .pvh-search-wrapper,
body.single-pvh_live_stream .pvh-search-wrapper {
	margin-bottom: 0;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.pvh-search-bar {
	background: var(--pvh-bg);
	padding: 16px 20px;
	box-shadow: var(--pvh-shadow);
	border: 1px solid var(--pvh-border-light);
	overflow: visible;
}

.pvh-search-bar-inner {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.pvh-search-form {
	flex: 1;
	display: flex;
	align-items: center;
	position: relative;
	overflow: visible;
}

.pvh-search-input-group {
	flex: 1;
	display: flex;
	align-items: center;
	background: var(--pvh-bg-secondary);
	border: 2px solid transparent;
	border-radius: var(--pvh-radius);
	padding: 0 16px;
	transition: var(--pvh-transition);
	height: 44px;
}

.pvh-search-input-group:focus-within {
	background: var(--pvh-bg);
	border-color: var(--pvh-primary);
	box-shadow: 0 0 0 3px rgba(6, 95, 212, 0.1);
}

.pvh-search-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pvh-text-secondary);
	margin-right: 12px;
	flex-shrink: 0;
}

.pvh-search-input {
	flex: 1;
	border: none !important;
	background: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
	font-size: 15px;
	color: var(--pvh-text);
	outline: none !important;
	box-shadow: none !important;
	height: auto !important;
	min-height: unset !important;
}

.pvh-search-input::placeholder {
	color: var(--pvh-text-secondary);
}

.pvh-search-input::-webkit-search-cancel-button {
	display: none;
}

.pvh-search-clear {
	display: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: none;
	background: var(--pvh-bg-hover);
	border-radius: 50%;
	cursor: pointer;
	color: var(--pvh-text-secondary);
	transition: var(--pvh-transition);
	padding: 0;
	margin-left: 8px;
}

.pvh-search-clear:hover {
	background: var(--pvh-border);
	color: var(--pvh-text);
}

.pvh-search-input:not(:placeholder-shown) ~ .pvh-search-clear {
	display: flex;
}

/* Search Button */
.pvh-search-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	margin-left: 8px;
	border: none;
	border-radius: var(--pvh-radius);
	background: var(--pvh-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--pvh-transition);
	white-space: nowrap;
}

/* Hide search button text on all screen sizes */
.pvh-search-btn span {
	display: none;
}

.pvh-search-btn:hover {
	background: var(--pvh-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(6, 95, 212, 0.3);
}

.pvh-search-btn svg {
	flex-shrink: 0;
}

/* ==========================================================================
   Filter Toggle Button
   ========================================================================== */

.pvh-filter-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--pvh-border);
	border-radius: var(--pvh-radius);
	background: var(--pvh-bg);
	color: var(--pvh-text);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--pvh-transition);
	white-space: nowrap;
}

.pvh-filter-toggle:hover {
	background: var(--pvh-bg-secondary);
	border-color: var(--pvh-text-secondary);
}

.pvh-filter-toggle.active {
	background: var(--pvh-text);
	color: var(--pvh-bg);
	border-color: var(--pvh-text);
}

.pvh-filter-toggle .pvh-chevron {
	transition: transform 0.2s ease;
}

.pvh-filter-toggle.active .pvh-chevron {
	transform: rotate(180deg);
}

/* ==========================================================================
   Quick Filter Chips
   ========================================================================== */

.pvh-quick-filters {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--pvh-border-light);
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.pvh-quick-filters::-webkit-scrollbar {
	display: none;
}

.pvh-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: none;
	border-radius: var(--pvh-radius-sm);
	background: var(--pvh-bg-secondary);
	color: var(--pvh-text);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--pvh-transition);
	white-space: nowrap;
}

.pvh-chip:hover {
	background: var(--pvh-bg-hover);
}

.pvh-chip.active {
	background: var(--pvh-text);
	color: var(--pvh-bg);
}

.pvh-chip svg {
	opacity: 0.7;
}

.pvh-chip.active svg {
	opacity: 1;
}

.pvh-type-clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-left: 4px;
	padding: 7px 12px;
	border: 1px solid var(--pvh-border-light);
	border-radius: 999px;
	background: var(--pvh-bg);
	color: var(--pvh-primary);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: var(--pvh-transition);
	white-space: nowrap;
}

.pvh-type-clear:hover,
.pvh-type-clear:focus {
	background: rgba(6, 95, 212, 0.08);
	border-color: var(--pvh-primary);
	outline: none;
}

.pvh-type-clear.pvh-is-hidden {
	display: none !important;
}

/* ==========================================================================
   Filter Panel
   ========================================================================== */

.pvh-filter-panel {
	background: var(--pvh-bg);
	border-radius: 12px;
	margin-top: 12px;
	box-shadow: var(--pvh-shadow-lg);
	border: 1px solid var(--pvh-border-light);
	overflow: hidden;
	animation: pvh-slideDown 0.25s ease;
}

@keyframes pvh-slideDown {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.pvh-filter-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	padding: 20px;
}

.pvh-filter-group {
	padding: 16px;
	border-right: 1px solid var(--pvh-border-light);
	border-bottom: 1px solid var(--pvh-border-light);
}

.pvh-filter-group:nth-child(3n) {
	border-right: none;
}

.pvh-filter-group-wide {
	grid-column: 1 / -1;
	border-right: none;
}

.pvh-filter-group-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	color: var(--pvh-text);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.pvh-filter-group-header svg {
	color: var(--pvh-primary);
}

.pvh-filter-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pvh-filter-btn {
	padding: 8px 14px;
	border: 1px solid var(--pvh-border);
	border-radius: 20px;
	background: var(--pvh-bg);
	color: var(--pvh-text);
	font-size: 13px;
	cursor: pointer;
	transition: var(--pvh-transition);
}

.pvh-filter-btn:hover {
	background: var(--pvh-bg-secondary);
	border-color: var(--pvh-text-secondary);
}

.pvh-filter-btn.active {
	background: var(--pvh-primary);
	color: #fff;
	border-color: var(--pvh-primary);
}

.pvh-filter-categories {
	max-height: 120px;
	overflow-y: auto;
	scrollbar-width: thin;
}

/* ==========================================================================
   Filter Actions
   ========================================================================== */

.pvh-filter-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	padding: 16px 20px;
	background: var(--pvh-bg-secondary);
	border-top: 1px solid var(--pvh-border-light);
}

.pvh-clear-filters {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border: 1px solid var(--pvh-border);
	border-radius: var(--pvh-radius-sm);
	background: var(--pvh-bg);
	color: var(--pvh-text-secondary);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--pvh-transition);
}

.pvh-clear-filters:hover {
	background: var(--pvh-bg-hover);
	color: var(--pvh-text);
}

.pvh-apply-filters {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	border: none;
	border-radius: var(--pvh-radius-sm);
	background: var(--pvh-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--pvh-transition);
}

.pvh-apply-filters:hover {
	background: var(--pvh-primary-hover);
}

/* ==========================================================================
   Active Filters
   ========================================================================== */

.pvh-active-filters {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.pvh-active-filters.pvh-is-hidden {
	display: none !important;
}

.pvh-active-filters-label {
	font-size: 13px;
	color: var(--pvh-text-secondary);
	font-weight: 500;
}

.pvh-active-filters-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pvh-active-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: var(--pvh-primary);
	color: #fff;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
}

.pvh-active-filter button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border: none;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	padding: 0;
	transition: var(--pvh-transition);
}

.pvh-active-filter button:hover {
	background: rgba(255, 255, 255, 0.4);
}

.pvh-clear-all-filters {
	padding: 6px 12px;
	border: none;
	background: transparent;
	color: var(--pvh-primary);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--pvh-transition);
}

.pvh-clear-all-filters:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Search Suggestions - YouTube Style Dropdown
   ========================================================================== */

.pvh-search-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 60px;
	background: var(--pvh-bg);
	border-radius: 0 0 12px 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border: 1px solid var(--pvh-border-light);
	border-top: 1px solid var(--pvh-border-light);
	z-index: 9999;
	max-height: 480px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
}

.pvh-suggestions-list {
	padding: 8px 0;
}

.pvh-suggestion-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px;
	cursor: pointer;
	transition: background 0.1s ease;
	position: relative;
}

.pvh-suggestion-item:hover,
.pvh-suggestion-item.active {
	background: var(--pvh-bg-secondary);
}

.pvh-suggestion-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	color: var(--pvh-text-secondary);
}

.pvh-suggestion-icon svg {
	width: 18px;
	height: 18px;
}

.pvh-suggestion-text {
	flex: 1;
	font-size: 14px;
	color: var(--pvh-text);
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.pvh-suggestion-thumb {
	flex-shrink: 0;
	width: 56px;
	height: 32px;
	border-radius: 4px;
	overflow: hidden;
	background: var(--pvh-bg-secondary);
}

.pvh-suggestion-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pvh-suggestion-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: none;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	color: var(--pvh-text-secondary);
	padding: 0;
	flex-shrink: 0;
	opacity: 0;
	transition: all 0.15s ease;
}

.pvh-suggestion-item:hover .pvh-suggestion-remove {
	opacity: 1;
}

.pvh-suggestion-remove:hover {
	background: var(--pvh-bg-hover);
	color: var(--pvh-text);
}

.pvh-suggestion-type {
	font-size: 12px;
	color: var(--pvh-text-secondary);
	text-transform: capitalize;
	flex-shrink: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
	.pvh-filter-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.pvh-filter-group:nth-child(3n) {
		border-right: 1px solid var(--pvh-border-light);
	}
	
	.pvh-filter-group:nth-child(2n) {
		border-right: none;
	}
}

@media (max-width: 768px) {
	/* Search bar - full width, flush to edges on mobile */
	.pvh-search-bar,
	.pvh-search-wrapper .pvh-search-bar {
		padding: 12px 16px !important;
		margin: 0 !important;
		border-radius: 0 !important;
		border-left: none !important;
		border-right: none !important;
		border-top: none !important;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
	}
	
	.pvh-search-wrapper,
	.pvh-no-filters.pvh-search-wrapper {
		margin: 0 0 28px !important;
		padding: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	
	/* Remove gap between search and video on single video page */
	.pvh-single-video-page .pvh-search-bar,
	.pvh-single-video-page .pvh-search-wrapper,
	body.single-pvh_video .pvh-search-bar,
	body.single-pvh_video .pvh-search-wrapper,
	body.single-pvh_live_stream .pvh-search-bar,
	body.single-pvh_live_stream .pvh-search-wrapper {
		margin: 0 !important;
		margin-bottom: 0 !important;
	}
	
	.pvh-single-video-page .pvh-player-section,
	.pvh-single-video-page .pvh-video-player-wrapper,
	.pvh-single-video-page .pvh-video-container,
	.pvh-single-video-page .pvh-video-main,
	body.single-pvh_video .pvh-player-section,
	body.single-pvh_video .pvh-video-player-wrapper,
	body.single-pvh_video .pvh-video-container,
	body.single-pvh_video .pvh-video-main,
	body.single-pvh_live_stream .pvh-player-section,
	body.single-pvh_live_stream .pvh-video-player-wrapper {
		margin-top: 0 !important;
		padding-top: 0 !important;
	}
	
	/* Category/Archive pages - search full width */
	.pvh-category-page .pvh-search-bar,
	.pvh-category-page .pvh-search-wrapper,
	body.tax-pvh_category .pvh-search-bar,
	body.tax-pvh_category .pvh-search-wrapper,
	body.post-type-archive-pvh_video .pvh-search-bar,
	body.post-type-archive-pvh_video .pvh-search-wrapper {
		margin: 0 0 28px !important;
		border-radius: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.pvh-category-page .pvh-search-bar,
	body.tax-pvh_category .pvh-search-bar,
	body.post-type-archive-pvh_video .pvh-search-bar {
		margin: 0 !important;
	}

	.pvh-search-bar-inner {
		flex-wrap: wrap;
	}

	.pvh-search-form {
		width: 100%;
		order: 1;
	}

	.pvh-search-btn span {
		display: none;
	}

	.pvh-search-btn {
		padding: 0 14px;
	}

	.pvh-filter-toggle {
		order: 2;
		flex: 1;
		justify-content: center;
		margin-top: 10px;
	}

	.pvh-filter-grid {
		grid-template-columns: 1fr;
		padding: 12px;
	}

	.pvh-filter-group {
		border-right: none !important;
		padding: 12px;
	}

	.pvh-filter-group:last-child {
		border-bottom: none;
	}

	.pvh-quick-filters {
		margin-top: 12px;
		padding-top: 12px;
	}

	.pvh-chip {
		padding: 6px 12px;
		font-size: 12px;
	}
}

/* ==========================================================================
   Mobile Only - Type Filter in Panel
   ========================================================================== */

/* Hide mobile-only type filter on desktop */
.pvh-filter-group-type.pvh-mobile-only {
	display: none;
}

/* Mobile: Hide quick filters chips, show type filter in panel */
@media (max-width: 768px) {
	/* Hide quick filters on mobile */
	.pvh-quick-filters {
		display: none !important;
	}

	/* Show type filter group in panel on mobile */
	.pvh-filter-group-type.pvh-mobile-only {
		display: block;
		grid-column: 1 / -1;
	}
}

@media (max-width: 480px) {
	.pvh-search-suggestions {
		right: 0;
		border-radius: 0 0 10px 10px;
	}

	.pvh-suggestion-thumb {
		width: 48px;
		height: 27px;
	}

	.pvh-suggestion-item {
		padding: 7px 12px;
		gap: 10px;
	}

	.pvh-suggestion-text {
		font-size: 13px;
	}

	.pvh-search-bar {
		padding: 12px;
		border-radius: 10px;
	}

	.pvh-search-bar-inner {
		flex-wrap: nowrap;
		gap: 8px;
	}

	.pvh-search-form {
		flex: 1;
		min-width: 0;
	}

	.pvh-search-input-group {
		height: 44px;
		padding: 0 14px;
		border-radius: 22px;
	}

	.pvh-search-icon {
		margin-right: 10px;
	}

	.pvh-search-icon svg {
		width: 18px;
		height: 18px;
	}

	.pvh-search-input {
		font-size: 15px;
		width: 100%;
	}

	/* Hide search button text, show only icon */
	.pvh-search-btn {
		height: 44px;
		width: 44px;
		min-width: 44px;
		padding: 0;
		border-radius: 50%;
		margin-left: 0;
	}

	.pvh-search-btn span {
		display: none;
	}

	.pvh-search-btn svg {
		width: 20px;
		height: 20px;
	}

	/* Filter toggle - icon only */
	.pvh-filter-toggle {
		height: 44px;
		width: 44px;
		min-width: 44px;
		padding: 0;
		border-radius: 50%;
		justify-content: center;
		order: 0;
		margin-top: 0;
		flex: none;
	}

	.pvh-filter-toggle span,
	.pvh-filter-toggle .pvh-chevron {
		display: none;
	}

	.pvh-filter-toggle svg:first-child {
		width: 20px;
		height: 20px;
	}

	/* Quick filters - horizontal scroll */
	.pvh-quick-filters {
		margin-top: 10px;
		padding-top: 10px;
		gap: 6px;
	}

	.pvh-chip {
		padding: 6px 12px;
		font-size: 12px;
		border-radius: 16px;
	}

	.pvh-chip svg {
		width: 14px;
		height: 14px;
	}

	.pvh-filter-actions {
		flex-direction: column;
		gap: 8px;
	}

	.pvh-clear-filters,
	.pvh-apply-filters {
		width: 100%;
		justify-content: center;
	}

	/* Filter panel mobile */
	.pvh-filter-panel {
		margin-top: 10px;
	}

	.pvh-filter-grid {
		padding: 10px;
	}

	.pvh-filter-group {
		padding: 10px;
	}

	.pvh-filter-group-header {
		font-size: 12px;
		margin-bottom: 10px;
	}

	.pvh-filter-btn {
		padding: 6px 12px;
		font-size: 12px;
	}
}

/* ==========================================================================
   Search Results - Modern Card Design
   ========================================================================== */

.pvh-search-results {
	margin-top: 24px;
	max-width: 1000px;
}

.pvh-search-results-header {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-bottom: 20px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--pvh-border-light);
}

.pvh-results-count {
	font-size: 14px;
	font-weight: 600;
	color: var(--pvh-primary);
}

.pvh-results-query {
	font-size: 14px;
	color: var(--pvh-text-secondary);
	font-style: italic;
}

.pvh-search-results-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Result Item - Card Layout */
.pvh-result-item {
	display: flex;
	gap: 16px;
	padding: 16px;
	background: var(--pvh-bg);
	border: 1px solid var(--pvh-border-light);
	border-radius: 12px;
	transition: border-color 0.15s ease;
}

.pvh-result-item:first-child {
	padding-top: 16px;
}

.pvh-result-item:last-child {
	border-bottom: 1px solid var(--pvh-border-light);
}

/* Thumbnail */
.pvh-result-thumb {
	position: relative;
	flex-shrink: 0;
	width: 280px;
	aspect-ratio: 16/9;
	border-radius: 8px;
	overflow: hidden;
	background: var(--pvh-bg-secondary);
	text-decoration: none;
}

.pvh-result-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pvh-result-thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--pvh-bg-hover);
	color: var(--pvh-text-secondary);
}

.pvh-result-duration {
	position: absolute;
	bottom: 6px;
	right: 6px;
	padding: 2px 6px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	border-radius: 4px;
	letter-spacing: 0.3px;
	line-height: 1.5;
	font-family: 'Roboto Mono', 'SF Mono', monospace;
}

/* Content */
.pvh-result-content {
	flex: 1;
	min-width: 0;
	padding: 2px 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pvh-result-type {
	display: inline-flex;
	align-self: flex-start;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: var(--pvh-bg-hover);
	color: var(--pvh-text-secondary);
}

.pvh-result-type-video {
	background: rgba(37, 99, 235, 0.12);
	color: #1d4ed8;
}

.pvh-result-type-short {
	background: rgba(219, 39, 119, 0.12);
	color: #be185d;
}

.pvh-result-type-playlist {
	background: rgba(14, 116, 144, 0.12);
	color: #0f766e;
}

.pvh-result-type-live {
	background: rgba(220, 38, 38, 0.12);
	color: #b91c1c;
}

.pvh-result-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -0.01em;
}

.pvh-result-title a {
	color: var(--pvh-text);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pvh-result-meta {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: var(--pvh-text-secondary);
	margin-top: 2px;
}

.pvh-result-meta span:not(:last-child)::after {
	content: "\2022";
	margin-left: 4px;
	opacity: 0.4;
}

.pvh-result-channel {
	font-size: 12px;
	color: var(--pvh-text-secondary);
	font-weight: 500;
	margin-top: 4px;
}

.pvh-result-desc {
	margin: 0;
	font-size: 13px;
	color: var(--pvh-text-secondary);
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 6px;
	opacity: 0.85;
}

/* Loading State */
.pvh-search-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	gap: 16px;
	color: var(--pvh-text-secondary);
}

.pvh-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid var(--pvh-border);
	border-top-color: var(--pvh-primary);
	border-radius: 50%;
	animation: pvh-spin 0.7s linear infinite;
}

@keyframes pvh-spin {
	to {
		transform: rotate(360deg);
	}
}

/* No Results */
.pvh-search-no-results {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
	text-align: center;
	color: var(--pvh-text-secondary);
}

.pvh-search-no-results svg {
	margin-bottom: 20px;
	opacity: 0.4;
}

.pvh-search-no-results h3 {
	margin: 0 0 8px 0;
	font-size: 20px;
	font-weight: 600;
	color: var(--pvh-text);
}

.pvh-search-no-results p {
	margin: 0;
	font-size: 14px;
}

/* Load More */
.pvh-load-more {
	display: flex;
	justify-content: center;
	padding: 28px 0;
}

.pvh-load-more-btn {
	padding: 10px 28px;
	border: 1px solid var(--pvh-border);
	border-radius: 8px;
	background: var(--pvh-bg);
	color: var(--pvh-text);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--pvh-transition);
}

.pvh-load-more-btn:hover {
	background: var(--pvh-bg-secondary);
	border-color: var(--pvh-text-secondary);
}

/* Responsive - Tablet */
@media (max-width: 900px) {
	.pvh-result-item {
		gap: 14px;
		padding: 14px;
	}

	.pvh-result-thumb {
		width: 200px;
	}

	.pvh-result-title {
		font-size: 15px;
	}

	.pvh-result-desc {
		-webkit-line-clamp: 1;
	}
}

/* Responsive - Mobile */
@media (max-width: 640px) {
	.pvh-search-results-list {
		gap: 12px;
	}

	.pvh-result-item {
		flex-direction: column;
		gap: 10px;
		padding: 0;
		border: none;
		border-radius: 0;
		padding-bottom: 16px;
		border-bottom: 1px solid var(--pvh-border-light);
	}

	.pvh-result-item:last-child {
		border-bottom: none;
	}

	.pvh-result-thumb {
		width: 100%;
		border-radius: 10px;
	}

	.pvh-result-content {
		padding: 0 4px;
	}

	.pvh-result-title {
		font-size: 14px;
	}

	.pvh-result-meta {
		font-size: 12px;
	}

	.pvh-result-desc {
		display: none;
	}
}

/* ==========================================================================
   Search Page - Standalone
   ========================================================================== */

/* Full-width search page like category/archive pages */
.pvh-search-page-body .pvh-search-page,
.pvh-search-page-body .pvh-search-page.pvh-full-width {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 auto !important;
	padding: 20px !important;
	min-height: 60vh;
	box-sizing: border-box;
}

/* Override theme containers */
.pvh-search-page-body .site-content,
.pvh-search-page-body .content-area,
.pvh-search-page-body #primary,
.pvh-search-page-body #main,
.pvh-search-page-body .entry-content,
.pvh-search-page-body .container,
.pvh-search-page-body .site-main {
	width: 100% !important;
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin: 0 !important;
}

/* Hide sidebar on search page */
.pvh-search-page-body #secondary,
.pvh-search-page-body .widget-area,
.pvh-search-page-body aside.sidebar {
	display: none !important;
}

.pvh-search-page-body .pvh-search-results {
	margin-top: 24px;
}

@media (max-width: 768px) {
	.pvh-search-page-body .pvh-search-page {
		padding: 15px !important;
	}
}

/* Keep mobile search separated from the next content block without affecting
   single video/live pages where the player intentionally sits flush. */
@media (max-width: 768px) {
	.pvh-home-page > .pvh-search-wrapper {
		margin-bottom: 32px !important;
	}

	.pvh-search-page .pvh-search-wrapper,
	.pvh-search-page-body .pvh-search-wrapper {
		margin-top: 10px !important;
	}
}

@media (max-width: 480px) {
	.pvh-home-page > .pvh-search-wrapper {
		margin-bottom: 28px !important;
	}

	.pvh-search-page .pvh-search-wrapper,
	.pvh-search-page-body .pvh-search-wrapper {
		margin-top: 8px !important;
	}
}

.pvh-search-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
	text-align: center;
	color: var(--pvh-text-secondary);
}

.pvh-search-empty-state svg {
	margin-bottom: 24px;
	opacity: 0.3;
	color: var(--pvh-text-secondary);
}

.pvh-search-empty-state h2 {
	margin: 0 0 12px 0;
	font-size: 24px;
	font-weight: 600;
	color: var(--pvh-text);
}

.pvh-search-empty-state p {
	margin: 0;
	font-size: 15px;
	max-width: 400px;
	line-height: 1.6;
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

@media (prefers-color-scheme: dark) {
	.pvh-search-wrapper {
		--pvh-bg: #0f0f0f;
		--pvh-bg-secondary: #272727;
		--pvh-bg-hover: #3f3f3f;
		--pvh-text: #f1f1f1;
		--pvh-text-secondary: #aaa;
		--pvh-border: #3f3f3f;
		--pvh-border-light: #272727;
	}
}

.dark .pvh-search-wrapper,
.pvh-dark-mode .pvh-search-wrapper {
	--pvh-bg: #0f0f0f;
	--pvh-bg-secondary: #272727;
	--pvh-bg-hover: #3f3f3f;
	--pvh-text: #f1f1f1;
	--pvh-text-secondary: #aaa;
	--pvh-border: #3f3f3f;
	--pvh-border-light: #272727;
}

/* ==========================================================================
   Hide user menu on mobile when bottom bar is active
   ========================================================================== */
@media screen and (max-width: 768px) {
	.pvh-search-bar .pvh-user-menu,
	.pvh-search-bar .pvh-auth-buttons {
		display: none !important;
	}
}

/* ==========================================================================
   Desktop Layout - User menu left, Search center, Filter right
   ========================================================================== */
@media screen and (min-width: 1024px) {
	.pvh-search-bar-inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
	}

	/* User menu / Auth buttons - Left side */
	.pvh-search-bar-inner .pvh-user-menu,
	.pvh-search-bar-inner .pvh-auth-buttons {
		order: -1;
		flex-shrink: 0;
	}

	/* Search form - Center */
	.pvh-search-form {
		flex: 0 1 560px;
		max-width: 560px;
		margin: 0 auto;
	}

	.pvh-no-search-addon .pvh-search-form {
		flex: 1 1 auto;
		max-width: none;
		margin: 0;
		min-width: 0;
	}

	/* Filter toggle - Right side (stays in place) */
	.pvh-filter-toggle {
		flex-shrink: 0;
		margin-left: auto;
	}

	.pvh-no-search-addon .pvh-search-bar-inner {
		justify-content: flex-start;
	}

	/* No filters mode - Search form takes full width */
	.pvh-no-filters .pvh-search-form {
		flex: 1;
		max-width: none;
		margin: 0;
	}
}

/* ==========================================================================
   No Filters Mode - Full width search
   ========================================================================== */
.pvh-no-filters .pvh-search-bar-inner {
	justify-content: stretch;
}

.pvh-no-filters .pvh-search-form {
	flex: 1;
}
