/*
 * Hľadanie na celom portáli (od 1.70.0): lupa v záhlaví, panel s okamžitými výsledkami a stránka výsledkov.
 * Farby berie z palety témy (--wp--preset--color--*), ktorú noc a červený režim v rybar-night.css prepisujú, takže sedí vo všetkých troch režimoch.
 */

/* ------------------------------------------------------------------ lupa v záhlaví */

.ryb-sx-open {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--line, #d3dfe3);
	background: transparent;
	color: var(--wp--preset--color--ink-2, #35505f);
	line-height: 0;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.ryb-sx-open:hover {
	background: var(--wp--preset--color--shallow, #dcebee);
	color: var(--wp--preset--color--deep, #0a2f45);
}
.ryb-sx-open:active {
	transform: scale(.96);
}
.ryb-sx-open:focus-visible {
	outline: 3px solid var(--wp--preset--color--river, #0f7b8a);
	outline-offset: 2px;
}
@media (max-width: 380px) {
	.ryb-sx-open {
		width: 38px;
		height: 38px;
	}
}

/* ------------------------------------------------------------------ panel */

html.ryb-sx-lock {
	overflow: hidden;
}
.ryb-sx {
	position: fixed;
	inset: 0;
	z-index: 100200; /* nad prekrytím mobilného menu témy (100000) */
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: max(8vh, 20px) 12px 12px;
	color: var(--wp--preset--color--ink, #0d2230);
	text-align: left;
}
.ryb-sx[hidden] {
	display: none;
}
.ryb-sx,
.ryb-sx *,
.ryb-sx *::before,
.ryb-sx *::after {
	box-sizing: border-box;
}
.ryb-sx__bd {
	position: absolute;
	inset: 0;
	background: rgba(6, 16, 20, .58);
}
.ryb-sx__box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 40rem;
	max-height: min(40rem, calc(100dvh - max(8vh, 20px) - 12px));
	border-radius: 18px;
	border: 1px solid var(--wp--preset--color--line, #d3dfe3);
	background: var(--wp--preset--color--surface, #fff);
	box-shadow: 0 2px 4px rgba(6, 16, 20, .18), 0 28px 60px -20px rgba(6, 16, 20, .6);
	overflow: hidden;
}
.ryb-sx__t {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.ryb-sx__form {
	flex: none;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 10px 10px 16px;
	border-bottom: 1px solid var(--wp--preset--color--line, #d3dfe3);
}
.ryb-sx__field {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-sx__field svg {
	flex: none;
}
.ryb-sx input.ryb-sx__q {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--wp--preset--color--deep, #0a2f45);
	font: inherit;
	font-size: 1.0625rem; /* 17 px: iOS pri poli menšom než 16 px približuje stránku */
	font-weight: 500;
	line-height: 1.3;
	-webkit-appearance: none;
	appearance: none;
}
.ryb-sx input.ryb-sx__q::placeholder {
	color: var(--wp--preset--color--mute, #5b7280);
	opacity: 1;
	font-weight: 400;
}
.ryb-sx input.ryb-sx__q::-webkit-search-decoration,
.ryb-sx input.ryb-sx__q::-webkit-search-cancel-button {
	-webkit-appearance: none;
}
.ryb-sx__field:focus-within {
	color: var(--wp--preset--color--river, #0f7b8a);
}
.ryb-sx__x {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--wp--preset--color--mute, #5b7280);
	line-height: 0;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.ryb-sx__x:hover {
	background: var(--wp--preset--color--shallow, #dcebee);
	color: var(--wp--preset--color--deep, #0a2f45);
}
.ryb-sx__x:focus-visible,
.ryb-sx a:focus-visible,
.ryb-sx button:focus-visible {
	outline: 3px solid var(--wp--preset--color--river, #0f7b8a);
	outline-offset: -3px;
}
.ryb-sx__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 6px 8px 10px;
}
.ryb-sx__status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.ryb-sx__h {
	margin: 12px 8px 6px;
	font-size: .8125rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-sx__start[hidden],
.ryb-sx__list[hidden],
.ryb-sx__recent[hidden] {
	display: none;
}

/* rýchle odkazy a naposledy hľadané */
.ryb-sx__quick,
.ryb-srp__quick {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}
.ryb-sx__quick a,
.ryb-srp__quick a {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 46px;
	padding: 8px 12px;
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--line, #d3dfe3);
	color: var(--wp--preset--color--ink, #0d2230);
	font-size: .9063rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease;
}
.ryb-sx__quick svg,
.ryb-srp__quick svg {
	flex: none;
	color: var(--wp--preset--color--river, #0f7b8a);
}
.ryb-sx__quick a:hover,
.ryb-srp__quick a:hover {
	background: var(--wp--preset--color--shallow, #dcebee);
	border-color: var(--wp--preset--color--river, #0f7b8a);
}
.ryb-sx__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 8px;
}
.ryb-sx__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid var(--wp--preset--color--line, #d3dfe3);
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--ink-2, #35505f);
	font: inherit;
	font-size: .875rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}
.ryb-sx__chip:hover {
	background: var(--wp--preset--color--shallow, #dcebee);
	border-color: var(--wp--preset--color--river, #0f7b8a);
}
.ryb-sx__chip svg {
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-sx__recent-h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.ryb-sx__clear {
	margin: 12px 8px 6px 0;
	padding: 4px 6px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--wp--preset--color--river-2, #0b5f6b);
	font: inherit;
	font-size: .8125rem;
	font-weight: 600;
	cursor: pointer;
}
.ryb-sx__clear:hover {
	text-decoration: underline;
}

/* výsledky */
.ryb-sx__g {
	margin: 0;
	padding: 0;
}
.ryb-sx__gh {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 10px 8px 2px;
	font-size: .8125rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-sx__gh a {
	padding: 4px 6px;
	margin-right: -6px;
	border-radius: 6px;
	color: var(--wp--preset--color--river-2, #0b5f6b);
	font-weight: 600;
	text-decoration: none;
}
.ryb-sx__gh a:hover {
	text-decoration: underline;
}
.ryb-sx__r {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 7px 10px;
	border-radius: 12px;
	color: var(--wp--preset--color--ink, #0d2230);
	text-decoration: none;
}
.ryb-sx__r[aria-selected='true'] {
	background: color-mix(in srgb, var(--wp--preset--color--river, #0f7b8a) 15%, transparent);
	box-shadow: inset 3px 0 0 var(--wp--preset--color--river, #0f7b8a);
}
.ryb-sx__ri {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--wp--preset--color--river, #0f7b8a) 13%, transparent);
	color: var(--wp--preset--color--river, #0f7b8a);
	line-height: 0;
}
.ryb-sx__rt {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ryb-sx__rn {
	font-size: .9688rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--wp--preset--color--deep, #0a2f45);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ryb-sx__rs {
	font-size: .8125rem;
	line-height: 1.25;
	color: var(--wp--preset--color--mute, #5b7280);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ryb-sx__rk {
	flex: none;
	font-size: .75rem;
	font-style: normal;
	line-height: 1;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-sx mark,
.ryb-srp mark {
	padding: 0 1px;
	border-radius: 3px;
	background: color-mix(in srgb, var(--wp--preset--color--sun, #f2b632) 42%, transparent);
	color: inherit;
}
.ryb-sx__all {
	margin-top: 8px;
	border-top: 1px solid var(--wp--preset--color--line, #d3dfe3);
	border-radius: 0 0 12px 12px;
	font-weight: 600;
	color: var(--wp--preset--color--river-2, #0b5f6b);
}
.ryb-sx__all .ryb-sx__ri {
	background: transparent;
}
.ryb-sx__none {
	margin: 0;
	padding: 28px 14px 22px;
	text-align: center;
}
.ryb-sx__none b {
	display: block;
	margin-bottom: 6px;
	font-size: 1rem;
	color: var(--wp--preset--color--deep, #0a2f45);
	overflow-wrap: anywhere;
}
.ryb-sx__none span {
	font-size: .875rem;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-sx__none button {
	display: inline-flex;
	margin-top: 10px;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--wp--preset--color--line, #d3dfe3);
	border-radius: 10px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	align-items: center;
	cursor: pointer;
}
.ryb-sx__keys {
	flex: none;
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 9px 16px;
	border-top: 1px solid var(--wp--preset--color--line, #d3dfe3);
	font-size: .75rem;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-sx__keys kbd {
	display: inline-block;
	min-width: 1.5em;
	margin-right: 4px;
	padding: 1px 5px;
	border: 1px solid var(--wp--preset--color--line, #d3dfe3);
	border-radius: 5px;
	background: var(--wp--preset--color--canvas, #eef3f4);
	font: inherit;
	font-size: .6875rem;
	text-align: center;
}
@media (hover: none), (max-width: 700px) {
	.ryb-sx__keys {
		display: none;
	}
}
@media (hover: hover) {
	.ryb-sx__r:hover:not([aria-selected='true']) {
		background: color-mix(in srgb, var(--wp--preset--color--river, #0f7b8a) 8%, transparent);
	}
}

/* telefón: panel na celú obrazovku, aby klávesnica neprekrývala výsledky */
@media (max-width: 700px) {
	.ryb-sx {
		padding: 0;
	}
	.ryb-sx__box {
		max-width: none;
		height: 100dvh;
		max-height: none;
		border: 0;
		border-radius: 0;
	}
	.ryb-sx__form {
		padding-top: max(10px, env(safe-area-inset-top));
	}
	.ryb-sx__body {
		padding-bottom: max(12px, env(safe-area-inset-bottom));
	}
}

/* otvorenie: krátky nábeh, bez neho pri znížení pohybu */
@media (prefers-reduced-motion: no-preference) {
	html:not([data-ryb-motion='off']) .ryb-sx:not([hidden]) .ryb-sx__bd {
		animation: ryb-sx-fade .16s ease-out;
	}
	html:not([data-ryb-motion='off']) .ryb-sx:not([hidden]) .ryb-sx__box {
		animation: ryb-sx-in .18s cubic-bezier(.23, 1, .32, 1);
	}
}
@keyframes ryb-sx-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes ryb-sx-in {
	from { opacity: 0; transform: translateY(-8px) scale(.985); }
	to { opacity: 1; transform: none; }
}
html[data-ryb-motion='on'] .ryb-sx:not([hidden]) .ryb-sx__box {
	animation: ryb-sx-in .18s cubic-bezier(.23, 1, .32, 1);
}

/* červený režim a noc: panel je tmavý (paleta témy sa prepisuje v rybar-night.css), podklad je tmavší */
html:is([data-ryb-theme='night'], [data-ryb-theme='ember']) .ryb-sx__bd {
	background: rgba(2, 6, 5, .72);
}
html:is([data-ryb-theme='night'], [data-ryb-theme='ember']) .ryb-sx__box {
	background: var(--n-bg1);
	border-color: var(--n-line);
	box-shadow: 0 2px 4px rgba(0, 0, 0, .6), 0 28px 60px -20px rgba(0, 0, 0, .9);
}
html:is([data-ryb-theme='night'], [data-ryb-theme='ember']) .ryb-sx__keys kbd {
	background: var(--n-bg2);
}
html:is([data-ryb-theme='night'], [data-ryb-theme='ember']) .ryb-sx__r[aria-selected='true'] {
	background: var(--n-bg3);
}
html:is([data-ryb-theme='night'], [data-ryb-theme='ember']) .ryb-sx mark,
html:is([data-ryb-theme='night'], [data-ryb-theme='ember']) .ryb-srp mark {
	background: color-mix(in srgb, var(--n-sun) 30%, transparent);
}

/* ------------------------------------------------------------------ stránka výsledkov (/?s=) */

.ryb-srp {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 18px;
	max-width: 56rem;
	margin-left: 0 !important; /* blok témy by ho inak vycentroval, kým nadpis a pole sú vľavo */
	margin-right: auto !important;
}
.ryb-srp__lead {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.4;
	font-weight: 600;
	color: var(--wp--preset--color--deep, #0a2f45);
	overflow-wrap: anywhere;
}
.ryb-srp__none {
	padding: 6px 0 14px;
}
.ryb-srp__none p {
	margin: 0 0 4px;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-srp__none .ryb-srp__lead {
	color: var(--wp--preset--color--deep, #0a2f45);
}
.ryb-srp__sum {
	margin: 0 0 4px;
	font-size: .875rem;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-srp__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 10px;
}
.ryb-srp__tab {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 38px;
	padding: 0 14px;
	border: 1px solid var(--wp--preset--color--line, #d3dfe3);
	border-radius: 999px;
	color: var(--wp--preset--color--ink-2, #35505f);
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease;
}
.ryb-srp__tab b {
	font-weight: 600;
	font-size: .75rem;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-srp__tab:hover {
	background: var(--wp--preset--color--shallow, #dcebee);
}
.ryb-srp__tab.is-on {
	border-color: var(--wp--preset--color--river, #0f7b8a);
	background: color-mix(in srgb, var(--wp--preset--color--river, #0f7b8a) 15%, transparent);
	color: var(--wp--preset--color--deep, #0a2f45);
}
.ryb-srp__grp {
	margin: 10px 0 6px;
}
.ryb-srp__gh {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--deep, #0a2f45);
}
.ryb-srp__gh svg {
	flex: none;
	color: var(--wp--preset--color--river, #0f7b8a);
}
.ryb-srp__gh b {
	font-size: .8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-srp__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--wp--preset--color--line, #d3dfe3);
	border-radius: 14px;
	overflow: hidden;
	background: var(--wp--preset--color--surface, #fff);
}
.ryb-srp__list li + li {
	border-top: 1px solid var(--wp--preset--color--line, #d3dfe3);
}
.ryb-srp__row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 8px 14px;
	color: var(--wp--preset--color--ink, #0d2230);
	text-decoration: none;
	transition: background-color .15s ease;
}
.ryb-srp__row:hover {
	background: color-mix(in srgb, var(--wp--preset--color--river, #0f7b8a) 9%, transparent);
}
.ryb-srp__row:focus-visible {
	outline: 3px solid var(--wp--preset--color--river, #0f7b8a);
	outline-offset: -3px;
}
.ryb-srp__ico {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--wp--preset--color--river, #0f7b8a) 13%, transparent);
	color: var(--wp--preset--color--river, #0f7b8a);
	line-height: 0;
}
.ryb-srp__tx {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ryb-srp__t {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wp--preset--color--deep, #0a2f45);
	overflow-wrap: anywhere;
}
.ryb-srp__tx small {
	font-size: .8125rem;
	line-height: 1.3;
	color: var(--wp--preset--color--mute, #5b7280);
	overflow-wrap: anywhere;
}
.ryb-srp__row em {
	flex: none;
	font-size: .75rem;
	font-style: normal;
	color: var(--wp--preset--color--mute, #5b7280);
}
.ryb-srp__more {
	margin: 8px 2px 0;
	font-size: .9375rem;
}
.ryb-srp__more a {
	font-weight: 600;
	color: var(--wp--preset--color--river-2, #0b5f6b);
}
html:is([data-ryb-theme='night'], [data-ryb-theme='ember']) .ryb-srp__list {
	background: var(--n-bg1);
}
@media (max-width: 520px) {
	.ryb-srp__row em {
		display: none;
	}
}
@media (max-width: 340px) {
	.ryb-sx__quick,
	.ryb-srp__quick {
		grid-template-columns: minmax(0, 1fr);
	}
}
