/* GeekPress Game Theme — global header search bar
   Self-contained colours (this bar shows on every page, including
   non-GeekPress pages where the --geekui-* palette is not loaded).
   Dark cyberpunk by default; light variant via body[data-theme]. */

.gpg-searchrow {
	background: #0a0f17;
	border-bottom: 1px solid rgba(0, 212, 196, 0.12);
}

.gpg-searchrow-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 9px 24px;
	display: flex;
	justify-content: flex-end;
}

/* ── Search widget ───────────────────────────────────────────────── */
.gpg-search {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 460px;
	font-family: var(--geekui-font-base, 'Rajdhani', 'Inter', system-ui, sans-serif);
}

.gpg-search-type {
	flex: 0 0 auto;
	height: 38px;
	padding: 0 28px 0 12px;
	background: #11151f;
	color: #00d4c4;
	border: 1px solid rgba(0, 212, 196, 0.32);
	border-right: none;
	border-radius: 6px 0 0 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d4c4' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 12px;
}

.gpg-search-field {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
}

.gpg-search-field svg {
	position: absolute;
	left: 12px;
	width: 16px;
	height: 16px;
	color: #00d4c4;
	pointer-events: none;
}

.gpg-search-input {
	width: 100%;
	height: 38px;
	box-sizing: border-box;
	padding: 0 14px 0 36px;
	background: #11151f;
	color: #e9edf6;
	border: 1px solid rgba(0, 212, 196, 0.32);
	border-radius: 0 6px 6px 0;
	font-size: 13px;
	outline: none;
}

.gpg-search-input::placeholder {
	color: #6c7689;
}

.gpg-search-input:focus {
	border-color: #00d4c4;
	box-shadow: 0 0 0 2px rgba(0, 212, 196, 0.18);
}

/* ── Results dropdown ────────────────────────────────────────────── */
.gpg-search-results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	max-height: 70vh;
	overflow-y: auto;
	background: #0e141d;
	border: 1px solid rgba(0, 212, 196, 0.32);
	border-radius: 8px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
	z-index: 2147482000;
	padding: 6px;
	/* Firefox */
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 212, 196, 0.45) transparent;
}
/* WebKit */
.gpg-search-results::-webkit-scrollbar { width: 10px; }
.gpg-search-results::-webkit-scrollbar-track {
	background: transparent;
	margin: 4px 0;
}
.gpg-search-results::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, rgba(0, 212, 196, 0.55), rgba(0, 212, 196, 0.30));
	border: 2px solid #0e141d;
	border-radius: 6px;
	box-shadow: 0 0 6px rgba(0, 212, 196, 0.35) inset;
}
.gpg-search-results::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(180deg, rgba(0, 212, 196, 0.85), rgba(0, 212, 196, 0.55));
	box-shadow: 0 0 10px rgba(0, 212, 196, 0.6) inset;
}
.gpg-search-results::-webkit-scrollbar-corner { background: transparent; }

.gpg-search-item {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 8px 10px;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.14s ease;
}

.gpg-search-item:hover {
	background: rgba(0, 212, 196, 0.10);
}

.gpg-search-thumb {
	flex: 0 0 auto;
	width: 34px;
	height: 46px;
	border-radius: 3px;
	background-color: #1a2030;
	background-size: cover;
	background-position: center;
	border: 1px solid rgba(0, 212, 196, 0.18);
}

.gpg-search-info {
	flex: 1 1 auto;
	min-width: 0;
}

.gpg-search-title {
	display: block;
	color: #e9edf6;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gpg-search-year {
	color: #8b93ab;
	font-weight: 400;
}

.gpg-search-badge {
	flex: 0 0 auto;
	padding: 3px 9px;
	background: rgba(0, 212, 196, 0.12);
	border: 1px solid rgba(0, 212, 196, 0.34);
	border-radius: 3px;
	color: #00d4c4;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.gpg-search-empty {
	padding: 16px;
	text-align: center;
	color: #8b93ab;
	font-size: 13px;
}

/* ── Light mode ──────────────────────────────────────────────────── */
body[data-theme="light"] .gpg-searchrow {
	background: #e4e8ee;
	border-bottom-color: rgba(10, 143, 134, 0.18);
}
body[data-theme="light"] .gpg-search-type {
	background-color: #ffffff;
	color: #0a8f86;
	border-color: rgba(10, 143, 134, 0.34);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a8f86' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
}
body[data-theme="light"] .gpg-search-field svg { color: #0a8f86; }
body[data-theme="light"] .gpg-search-input {
	background: #ffffff;
	color: #18202c;
	border-color: rgba(10, 143, 134, 0.34);
}
body[data-theme="light"] .gpg-search-input::placeholder { color: #7a828f; }
body[data-theme="light"] .gpg-search-input:focus {
	border-color: #0a8f86;
	box-shadow: 0 0 0 2px rgba(10, 143, 134, 0.18);
}
body[data-theme="light"] .gpg-search-results {
	background: #ffffff;
	border-color: rgba(10, 143, 134, 0.30);
	box-shadow: 0 16px 40px rgba(24, 32, 44, 0.18);
}
body[data-theme="light"] .gpg-search-item:hover { background: rgba(10, 143, 134, 0.10); }
body[data-theme="light"] .gpg-search-thumb { background-color: #e4e8ee; border-color: rgba(10, 143, 134, 0.18); }
body[data-theme="light"] .gpg-search-title { color: #18202c; }
body[data-theme="light"] .gpg-search-year { color: #7a828f; }
body[data-theme="light"] .gpg-search-badge {
	background: rgba(10, 143, 134, 0.10);
	border-color: rgba(10, 143, 134, 0.34);
	color: #0a8f86;
}
body[data-theme="light"] .gpg-search-empty { color: #7a828f; }

body[data-theme="light"] .gpg-search-results {
	scrollbar-color: rgba(10, 143, 134, 0.55) transparent;
}
body[data-theme="light"] .gpg-search-results::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, rgba(10, 143, 134, 0.65), rgba(10, 143, 134, 0.35));
	border-color: #ffffff;
	box-shadow: 0 0 6px rgba(10, 143, 134, 0.35) inset;
}
body[data-theme="light"] .gpg-search-results::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(180deg, rgba(10, 143, 134, 0.9), rgba(10, 143, 134, 0.6));
	box-shadow: 0 0 10px rgba(10, 143, 134, 0.55) inset;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.gpg-searchrow-inner { padding: 8px 14px; }
	.gpg-search { max-width: none; }
}
