/**
 * ZBH Search Bar — עיצוב
 * סרגל חיפוש אופקי + עמודת אזורים. נקי, ממוקד, מזמין ללחיצה.
 */

:root {
	--zbh-sb-accent: #7b1fa2;
	--zbh-sb-cta: #ffb300;
	--zbh-sb-radius: 14px;
	--zbh-sb-aside: 268px;
	--zbh-sb-gap: 26px;
}

.zbh-sb-hidden {
	display: none !important;
}

/* ── הפריסה: תוכן + עמודת אזורים ─────────────────────── */

.zbh-sb-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--zbh-sb-aside);
	gap: var(--zbh-sb-gap);
	align-items: start;
	max-width: 1560px;
	margin-inline: auto;
	padding-inline: 18px;
	box-sizing: border-box;
}

.zbh-sb-main {
	min-width: 0;
}

.zbh-sb-aside {
	position: sticky;
	top: 24px;
	align-self: start;
}

/* הפאנל מפסיק לרחף והופך לחלק מהפריסה */
.zbh-sb-panel {
	position: static !important;
	inset: auto !important;
	width: 100% !important;
	max-width: 100% !important;
	transform: none !important;
	max-height: calc(100vh - 60px);
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: var(--zbh-sb-radius);
	box-shadow: 0 2px 20px -8px rgba(60, 20, 90, .3);
	scrollbar-width: thin;
	scrollbar-color: rgba(123, 31, 162, .35) transparent;
}

.zbh-sb-panel::-webkit-scrollbar {
	width: 6px;
}

.zbh-sb-panel::-webkit-scrollbar-thumb {
	background: rgba(123, 31, 162, .3);
	border-radius: 999px;
}

.zbh-sb-panel a:hover,
.zbh-sb-panel li:hover {
	background-color: rgba(123, 31, 162, .07);
}

/* ── סרגל החיפוש האופקי ─────────────────────────────── */

.zbh-sb-bar {
	position: static !important;
	inset: auto !important;
	transform: none !important;
	width: 100% !important;
	max-width: 100% !important;
	max-height: none !important;
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	padding: 14px !important;
	margin: 0 0 26px !important;
	box-sizing: border-box;
	border-radius: var(--zbh-sb-radius);
	border: 2px solid var(--zbh-sb-cta) !important;
	background: #fff !important;
	box-shadow: 0 6px 26px -14px rgba(0, 0, 0, .35);
	overflow: visible !important;
}

/* כותרות פנימיות של הטופס מיותרות בסרגל */
.zbh-sb-bar > h1,
.zbh-sb-bar > h2,
.zbh-sb-bar > h3,
.zbh-sb-bar > h4 {
	display: none !important;
}

.zbh-sb-bar .zbh-sb-field {
	flex: 1 1 180px;
	min-width: 0;
	margin: 0 !important;
}

/* שדות הקלט - גובה אחיד, מראה נקי */
.zbh-sb-bar input,
.zbh-sb-bar select {
	width: 100% !important;
	min-height: 50px;
	padding: 10px 12px !important;
	border: 1px solid #d8d2dd !important;
	border-radius: 10px !important;
	background: #fff !important;
	font-size: 15px !important;
	box-sizing: border-box;
	transition: border-color .18s ease, box-shadow .18s ease;
}

.zbh-sb-bar input:focus,
.zbh-sb-bar select:focus {
	border-color: var(--zbh-sb-accent) !important;
	box-shadow: 0 0 0 3px rgba(123, 31, 162, .14);
	outline: none;
}

.zbh-sb-bar label {
	display: block;
	margin-bottom: 5px;
	font-size: 12.5px;
	font-weight: 700;
	color: #5c5266;
	letter-spacing: .01em;
}

/* כפתור החיפוש - העוגן הוויזואלי של הסרגל */
.zbh-sb-bar button,
.zbh-sb-bar input[type="submit"],
.zbh-sb-bar [class*="submit"] {
	flex: 0 0 auto;
	min-height: 50px;
	padding: 0 34px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--zbh-sb-accent) !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	cursor: pointer;
	box-shadow: 0 5px 16px -7px rgba(123, 31, 162, .9);
	transition: filter .18s ease, transform .12s ease;
}

.zbh-sb-bar button:hover,
.zbh-sb-bar input[type="submit"]:hover {
	filter: brightness(1.1);
}

.zbh-sb-bar button:active {
	transform: scale(.98);
}

/* ── טאבלט: העמודה מצטמצמת ──────────────────────────── */

@media (max-width: 1280px) {
	:root {
		--zbh-sb-aside: 224px;
		--zbh-sb-gap: 18px;
	}
}

/* ── מובייל: עמודה אחת, הפאנל מעל התוצאות ───────────── */

@media (max-width: 1024px) {
	.zbh-sb-grid {
		grid-template-columns: 1fr;
		padding-inline: 12px;
	}
	.zbh-sb-aside {
		position: static;
		order: -1;
	}
	.zbh-sb-panel {
		max-height: 280px;
	}
	.zbh-sb-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.zbh-sb-bar .zbh-sb-field {
		flex: 1 1 auto;
	}
	.zbh-sb-bar button,
	.zbh-sb-bar input[type="submit"] {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zbh-sb-bar input,
	.zbh-sb-bar button {
		transition: none !important;
	}
}
