/**
 * BYO Product Search — frontend
 */

.byo-ps-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	margin: 0 12px 0 0;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
	color: #1a1a1a !important;
	cursor: pointer;
	line-height: 0;
	vertical-align: middle;
	position: relative;
	z-index: 1;
}

.byo-ps-trigger:hover,
.byo-ps-trigger:focus,
.byo-ps-trigger:active {
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	opacity: 0.7;
}

.byo-ps-trigger__icon {
	display: block;
	width: 22px;
	height: 22px;
}

.byo-ps-trigger__icon svg {
	display: block;
	width: 100%;
	height: 100%;
	stroke: currentColor;
	fill: none;
}

.byo-ps-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.92);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s;
}

.byo-ps-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.byo-ps-overlay__close {
	position: absolute;
	top: 20px;
	right: 24px;
	z-index: 1;
	padding: 0;
	margin: 0;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
	color: #fff !important;
	font-size: 3.5rem;
	line-height: 1;
	cursor: pointer;
}

.byo-ps-overlay__close:hover,
.byo-ps-overlay__close:focus {
	opacity: 0.75;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.byo-ps-overlay__close span {
	display: inline-block;
	color: #fff !important;
	font-weight: 400;
	line-height: 1;
}

.byo-ps-form {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
	width: 100%;
}

.byo-ps-search-panel {
	width: 100%;
	max-width: 720px;
}

.byo-ps-form__input {
	flex: 1 1 220px;
	min-width: 0;
	padding: 16px 20px;
	border: 0 !important;
	border-bottom: 2px solid rgba(255, 255, 255, 0.35) !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 1.5rem;
	line-height: 1.3;
	outline: none;
}

.byo-ps-form__input::placeholder {
	color: rgba(255, 255, 255, 0.55);
}

.byo-ps-form__input:focus {
	border-bottom-color: #fff;
}

.byo-ps-form__submit {
	flex: 0 0 auto;
	padding: 14px 28px;
	border: 1px solid #fff;
	border-radius: 0;
	background: #fff;
	color: #111;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.byo-ps-form__submit:hover,
.byo-ps-form__submit:focus {
	background: transparent;
	color: #fff;
}

body.byo-ps-overlay-open {
	overflow: hidden;
}

.byo-ps-live-results {
	display: none;
	width: 100%;
	margin-top: 12px;
	max-height: 360px;
	overflow-y: auto;
	border: 1px solid rgba(255, 255, 255, 0.5);
	background: rgba(10, 10, 10, 0.9);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.byo-ps-live-results.is-visible {
	display: block;
}

.byo-ps-live-results__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.byo-ps-live-results__item + .byo-ps-live-results__item {
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.byo-ps-live-results__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 14px;
	text-decoration: none;
	color: #fff;
}

.byo-ps-live-results__link:hover,
.byo-ps-live-results__link:focus {
	background: rgba(255, 255, 255, 0.1);
}

.byo-ps-live-results__thumb {
	display: inline-flex;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	overflow: hidden;
}

.byo-ps-live-results__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.byo-ps-live-results__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.byo-ps-live-results__title {
	font-size: 0.95rem;
	line-height: 1.2;
	color: #fff;
}

.byo-ps-live-results__price {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.75);
}

.byo-ps-live-results__empty {
	margin: 0;
	padding: 14px;
	color: rgba(255, 255, 255, 0.8);
}
