/* ETA — wyszukiwarka produktów (header + archiwum sklepu) */

/* Jedna ikona: ukryj natywny widget TRX/Elementor, zostaw przycisk JS */
body.eta-search-enabled .elementor-widget-trx_sc_layouts_search,
body.eta-search-enabled .sc_layouts_search,
body.eta-search-enabled [class*="trx_sc_layouts_search"],
body.eta-search-enabled .header-search-button {
	display: none !important;
}

body.eta-search-enabled .eta-header-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 31, 63, 0.12);
	border-radius: 8px;
	background: #fff;
	color: var(--eta-navy, #001f3f);
	cursor: pointer;
	transition: background 160ms ease, border-color 160ms ease;
}

/* Desktop: bez obrysu — jak pozostałe ikony w pasku */
@media (min-width: 1280px) {
	body.eta-search-enabled .elementor-275 .elementor-element-92b524c > .eta-header-search-toggle,
	body.eta-search-enabled .eta-header-icons > .eta-header-search-toggle {
		width: var(--eta-header-icon-size, 44px);
		min-width: var(--eta-header-icon-size, 44px);
		height: var(--eta-header-icon-size, 44px);
		padding: 0;
		border: none;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}
}

/* Mobile: ikona w jednym rzędzie z koszykiem i hamburgerem */
@media (max-width: 1279px) {
	.elementor-275 .elementor-element-3ef0979 > .eta-header-search-toggle {
		display: none !important;
	}

	.elementor-275 .elementor-element-9ad2858 > .eta-header-search-toggle {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: auto !important;
		height: 44px !important;
		min-width: 0 !important;
		max-width: none !important;
		padding: 0 var(--eta-header-icon-pad-x, 4px) !important;
		margin: 0 !important;
		border: none;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.elementor-275 .elementor-element-9ad2858 > .eta-header-search-toggle svg {
		width: 22px;
		height: 22px;
	}

	.elementor-275 .elementor-element-9ad2858 {
		gap: var(--eta-header-icon-gap, 8px) !important;
	}
}

body.eta-search-enabled .eta-header-search-toggle:hover,
body.eta-search-enabled .eta-header-search-toggle:focus-visible {
	background: var(--eta-bg-soft, #f2f8fb);
	border-color: rgba(0, 31, 63, 0.22);
}

@media (min-width: 1280px) {
	body.eta-search-enabled .elementor-275 .elementor-element-92b524c > .eta-header-search-toggle:hover,
	body.eta-search-enabled .elementor-275 .elementor-element-92b524c > .eta-header-search-toggle:focus-visible,
	body.eta-search-enabled .eta-header-icons > .eta-header-search-toggle:hover,
	body.eta-search-enabled .eta-header-icons > .eta-header-search-toggle:focus-visible {
		background: transparent;
		border-color: transparent;
		color: var(--eta-navy, #001f3f);
		opacity: 0.72;
	}
}

.eta-header-search-panel {
	position: fixed;
	inset: 0;
	z-index: 999990;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: max(calc(var(--eta-header-offset, 88px) + 16px), 96px) 16px 24px;
	background: rgba(0, 20, 40, 0.45);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.eta-header-search-panel.is-open {
	display: flex;
}

.eta-header-search-panel__inner {
	width: min(720px, 100%);
	padding: 20px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 31, 63, 0.18);
}

.eta-header-search-panel__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.eta-header-search-panel__query {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
}

.eta-header-search-panel__input {
	min-height: 52px;
	padding: 0 16px;
	border: 1px solid rgba(0, 31, 63, 0.12);
	border-radius: 10px;
	font-size: 16px;
}

.eta-header-search-panel__submit,
.eta-header-search-panel__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 20px;
	border: none;
	border-radius: 10px;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	letter-spacing: 0;
	text-align: center;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.eta-header-search-panel__submit {
	align-self: stretch;
	min-width: 96px;
	background: var(--eta-navy, #001f3f) !important;
	color: #fff !important;
}

.eta-header-search-panel__submit:hover,
.eta-header-search-panel__submit:focus-visible {
	background: #002a55 !important;
	color: #fff !important;
}

.eta-header-search-panel__close {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: transparent !important;
	background-image: none !important;
	color: var(--eta-navy, #001f3f) !important;
	box-shadow: none !important;
	transition: background-color 0.15s ease;
}

body.eta-search-enabled .eta-header-search-panel__close:hover,
body.eta-search-enabled .eta-header-search-panel__close:focus-visible {
	background: var(--eta-bg-soft, #f2f8fb) !important;
	background-color: var(--eta-bg-soft, #f2f8fb) !important;
	background-image: none !important;
	color: var(--eta-navy, #001f3f) !important;
	border: none !important;
	box-shadow: none !important;
}

.eta-header-search-panel__close-label,
.eta-header-search-panel__close-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.eta-header-search-panel__close-icon {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
}

.eta-header-search-panel__close-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.eta-header-search-panel__close.is-x-visible .eta-header-search-panel__close-label {
	opacity: 0;
	visibility: hidden;
}

.eta-header-search-panel__close.is-x-visible .eta-header-search-panel__close-icon {
	opacity: 1;
	visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
	.eta-header-search-panel__close:hover .eta-header-search-panel__close-label,
	.eta-header-search-panel__close:focus-visible .eta-header-search-panel__close-label {
		opacity: 0;
		visibility: hidden;
	}

	.eta-header-search-panel__close:hover .eta-header-search-panel__close-icon,
	.eta-header-search-panel__close:focus-visible .eta-header-search-panel__close-icon {
		opacity: 1;
		visibility: visible;
	}
}

/* ── AJAX live search (header + archiwum sklepu) ─────────────────────── */
.eta-search-live {
	margin-top: 4px;
	border: 1px solid rgba(0, 31, 63, 0.1);
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.eta-search-live[hidden] {
	display: none !important;
}

.eta-search-live__list {
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: min(360px, 50vh);
	overflow-y: auto;
}

.eta-search-live__item + .eta-search-live__item {
	border-top: 1px solid rgba(0, 31, 63, 0.08);
}

.eta-search-live__link {
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 12px;
	align-items: center;
	padding: 20px 14px;
	color: var(--eta-navy, #001f3f);
	text-decoration: none;
	transition: background 140ms ease;
}

.eta-search-live__link:hover,
.eta-search-live__link:focus-visible {
	background: var(--eta-bg-soft, #f2f8fb);
}

.eta-search-live__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 8px;
	overflow: hidden;
	background: #f6f8fa;
}

.eta-search-live__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.eta-search-live__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.eta-search-live__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.eta-search-live__price {
	font-size: 14px;
	color: rgba(0, 31, 63, 0.72);
}

.eta-search-live__price .woocommerce-Price-amount {
	font-weight: 700;
	color: var(--eta-navy, #001f3f);
}

.eta-search-live__empty {
	padding: 24px 16px;
	color: rgba(0, 31, 63, 0.65);
	font-size: 14px;
	line-height: 1.4;
}

.eta-search-live__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 0 20px;
	border-top: 1px solid rgba(0, 31, 63, 0.08);
	background: var(--eta-navy, #001f3f) !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	letter-spacing: 0;
	text-align: center;
	text-decoration: none;
	transition: background 140ms ease;
}

.eta-search-live__more:hover,
.eta-search-live__more:focus-visible {
	background: #002a55;
}

.eta-search-live__more[hidden] {
	display: none !important;
}

.eta-header-search-panel__form .eta-search-live {
	margin-top: 0;
}

.eta-shop-search .eta-search-live {
	margin-top: 12px;
	box-shadow: var(--eta-shadow, 0 12px 40px -8px rgba(0, 31, 63, 0.12));
}

.eta-shop-search {
	margin: 0 0 24px;
}

.eta-shop-search__form {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 14px 16px;
	border: 1px solid var(--eta-border, rgba(0, 31, 63, 0.08));
	border-radius: 14px;
	background: #fff;
	box-shadow: var(--eta-shadow, 0 12px 40px -8px rgba(0, 31, 63, 0.12));
}

.eta-shop-search__icon {
	display: inline-flex;
	color: var(--eta-navy, #001f3f);
}

.eta-shop-search__input {
	width: 100%;
	min-height: 48px;
	padding: 0 12px;
	border: 1px solid rgba(0, 31, 63, 0.1);
	border-radius: 10px;
	font-size: 16px;
}

/* Kolory: eta-buttons-global.css */
.eta-shop-search__submit {
	min-height: 48px;
	padding: 0 22px;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	text-align: center;
}

@media (max-width: 767px) {
	.eta-shop-search__form {
		grid-template-columns: auto 1fr;
	}
	.eta-shop-search__submit {
		grid-column: 1 / -1;
		width: 100%;
	}
}
