/**
 * mod_gfkereso — GF Kereső
 * A gomb a projekt gombszabályát követi: alap = kék / fehér szöveg,
 * hover-focus-active = narancs / fehér szöveg.
 * A két színt a --gfk-* változókkal írhatod át (branding.css-ben).
 * @version 1.0.0
 */

/* A sablon egy 16px margin-left-et ad a fejléc formjára — ez tolta ki a
   mezőt a container jobb széle alá. Erősebb szelektorral nullázzuk. */
.header-top .t4-header-r form.gf-kereso {
	margin: 0;
}

.gf-kereso {
	--gfk-blue: #1a6fba;
	--gfk-blue-dark: #0d4a82;
	--gfk-orange: #e87722;
	--gfk-orange-dark: #c05a10;
	--gfk-border: #ccd6e0;
	--gfk-text: #1a1a1a;
	--gfk-muted: #6b7280;

	position: relative;
	width: 100%;
	max-width: 420px;
	margin: 0;
}

.gf-kereso__row {
	display: flex;
	align-items: stretch;
}

.gf-kereso__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 12px;
	font-size: 15px;
	color: var(--gfk-text);
	background: #fff;
	border: 1px solid var(--gfk-border);
	border-right: 0;
	border-radius: 6px 0 0 6px;
}

.gf-kereso__input:focus {
	outline: 2px solid var(--gfk-blue);
	outline-offset: -1px;
	border-color: var(--gfk-blue);
}

.gf-kereso__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 44px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--gfk-blue);
	border: 1px solid var(--gfk-blue-dark);
	border-radius: 0 6px 6px 0;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.gf-kereso__btn:hover,
.gf-kereso__btn:focus,
.gf-kereso__btn:active {
	color: #fff;
	background: var(--gfk-orange);
	border-color: var(--gfk-orange-dark);
}

.gf-kereso__icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Legördülő */

.gf-kereso__drop {
	position: absolute;
	z-index: 1030;
	top: calc(100% + 4px);
	left: auto;
	right: 0;
	min-width: 460px;
	max-width: min(560px, calc(100vw - 32px));
	max-height: 60vh;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--gfk-border);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.gf-kereso__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	min-height: 56px;
	color: var(--gfk-text);
	text-decoration: none;
	border-bottom: 1px solid #eef1f4;
}

.gf-kereso__item:last-child {
	border-bottom: 0;
}

.gf-kereso__item:hover,
.gf-kereso__item.is-active {
	color: var(--gfk-text);
	background: #f4f8fc;
	text-decoration: none;
}

.gf-kereso__thumb {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	object-fit: contain;
	background: #f5f5f5;
	border-radius: 4px;
}

.gf-kereso__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.gf-kereso__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
}

.gf-kereso__meta {
	font-size: 12px;
	color: var(--gfk-muted);
}

.gf-kereso__empty {
	padding: 14px 12px;
	font-size: 14px;
	color: var(--gfk-muted);
}

/* Mobil/tablet: a kereső a logó alá, teljes szélességben — egy sorban
   a logóval kilógna a containerből. A :has() a logósorra szűkíti,
   más header-top containert nem érint. */
@media (max-width: 767.98px) {
	.header-top .container:has(.gf-kereso) {
		flex-wrap: wrap;
	}

	.header-top .t4-header-r.ms-auto:has(.gf-kereso) {
		width: 100%;
		margin-left: 0;
		margin-top: 8px;
	}

	.gf-kereso {
		max-width: none;
	}

	.gf-kereso__drop {
		left: 0;
		right: 0;
		min-width: 0;
		max-width: none;
	}
}

@media (max-width: 575.98px) {
	.gf-kereso {
		max-width: none;
	}

	.gf-kereso__btn-text {
		display: none;
	}

	.gf-kereso__drop {
		left: 0;
		right: 0;
		min-width: 0;
		max-width: none;
	}

	.gf-kereso__btn {
		padding: 0 14px;
	}
}
