/* =====================================================
   Kells Search Popup
   ===================================================== */

/* ── Trigger button (the icon dropped into a menu/header) ── */
.kells-search-trigger {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.4rem;
	color: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
	vertical-align: middle;
	background-color: #F1B434;
}



.kells-search-trigger:hover {
	color: #333;
}
.kells-search-trigger svg {
	width: 22px;
	height: 22px;
	fill: #fff;
	display: block;
}

/* ── Overlay / backdrop ── */
.kells-search-overlay {
	position: fixed;
	inset: 0;
	background: rgba(29, 33, 73, 0.55);
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 64px 1rem 1rem;
	overflow-y: auto;
	box-sizing: border-box;
}
.kells-search-overlay[hidden] {
	display: none !important;
}

/* ── Modal shell ── */
.kells-search-modal {
	background: #ffffff;
	width: 100%;
	max-width: 700px;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 90px);
	position: relative;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
	flex-shrink: 0;
}

/* ── Close button ── */
.kells-search-close {
	position: absolute;
	top: -30px;
    right: -30px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.5rem;
	line-height: 1;
	color: #f5f5f5;
	padding: 0.2rem 0.4rem;
	z-index: 2;
	transition: color 0.2s;
	font-family: Arial, sans-serif;
}
.kells-search-close:hover {
	color: #1D2149;
}

/* ── Search input row ── */
.kells-search-bar {
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid #e5e5e5;
	flex-shrink: 0;
}
.kells-search-input {
	flex: 1;
	border: none;
	outline: none;
	padding: 1rem 2.5rem 1rem 1.25rem;
	font-size: 1rem;
	font-family: "Montserrat", sans-serif;
	color: #1D2149;
	background: #ffffff;
	min-width: 0;
	box-sizing: border-box;
}
.kells-search-input::placeholder {
	color: #aaaaaa;
}
.kells-search-submit {
	flex-shrink: 0;
	width: 54px;
	border: none;
	background: #F1B434;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	padding: 0;
}
.kells-search-submit:hover {
	background: #C49A4C;
}
.kells-search-submit svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	flex-shrink: 0;
}

/* ── Tabs ── */
.kells-search-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	border-bottom: 1px solid #e5e5e5;
	flex-shrink: 0;
}
.kells-tab {
	background: none;
	border: 1px solid #cccccc;
	cursor: pointer;
	font-size: 0.8125rem;
	font-family: "Montserrat", sans-serif;
	font-weight: 500;
	color: #777777;
	padding: 0.35rem 0.9rem;
	transition: border-color 0.2s, color 0.2s, font-weight 0.1s;
	white-space: nowrap;
	letter-spacing: 0.01em;
}
.kells-tab.active {
	border-color: #1D2149;
	color: #1D2149;
	font-weight: 700;
}
.kells-tab:hover:not(.active) {
	border-color: #888888;
	color: #333333;
}

/* ── Results container ── */
.kells-search-results {
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}

/* ── Individual result row ── */
.kells-result-item {
	display: flex;
	gap: 1rem;
	padding: 0.9rem 1.25rem;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: inherit;
	transition: background 0.15s;
	align-items: flex-start;
}
.kells-result-item:hover {
	background: #f7f8fc;
}
.kells-result-item:last-child {
	border-bottom: none;
}

/* Thumbnail wrapper */
.kells-result-img-wrap {
	flex-shrink: 0;
	width: 105px;
}
.kells-result-thumb {
	width: 105px;
	height: 130px;
	object-fit: cover;
	object-position: center top;
	display: block;
}
.kells-result-thumb--placeholder {
	width: 105px;
	height: 130px;
	display: block;
	background: #e8ebf5;
}

/* Insights thumb: square */
.kells-result-item[data-type="insights"] .kells-result-thumb,
.kells-result-item[data-type="insights"] .kells-result-thumb--placeholder {
	height: 105px;
}

/* Result body */
.kells-result-body {
	flex: 1;
	min-width: 0;
}
.kells-result-title {
	font-size: 0.9375rem;
	font-weight: 700;
	color: #F1B434;
	font-family: "Montserrat", sans-serif;
	margin: 0 0 0.2rem;
	line-height: 1.3;
}
.kells-result-title mark {
	background: none;
	color: inherit;
	font-weight: 700;
	text-transform: uppercase;
}
.kells-result-url {
	font-size: 0.6875rem;
	color: #F1B434;
	font-family: "Montserrat", sans-serif;
	margin: 0 0 0.4rem;
	word-break: break-all;
	opacity: 0.85;
	display: block;
}
.kells-result-excerpt {
	font-size: 0.8125rem;
	color: #444444;
	font-family: "Montserrat", sans-serif;
	line-height: 1.65;
	margin: 0 0 0.35rem;
}
.kells-result-excerpt em {
	font-style: normal;
	font-weight: 700;
	color: #1D2149;
}
.kells-result-expertise {
	font-size: 0.75rem;
	color: #555555;
	font-family: "Montserrat", sans-serif;
	margin: 0.3rem 0 0;
	line-height: 1.5;
}
.kells-result-expertise strong {
	font-weight: 700;
	color: #1D2149;
}

/* ── State messages ── */
.kells-search-state {
	text-align: center;
	padding: 2.5rem 1.25rem;
	font-size: 0.9375rem;
	font-family: "Montserrat", sans-serif;
	color: #888888;
}

/* ── Responsive ── */
@media (max-width: 520px) {
	.kells-search-overlay {
		padding: 0;
		align-items: flex-start;
	}
	.kells-search-modal {
		max-width: 100%;
		max-height: 100vh;
		box-shadow: none;
	}
	.kells-result-img-wrap {
		width: 72px;
	}
	.kells-result-thumb,
	.kells-result-thumb--placeholder {
		width: 72px;
		height: 90px;
	}
	.kells-result-item[data-type="insights"] .kells-result-thumb,
	.kells-result-item[data-type="insights"] .kells-result-thumb--placeholder {
		height: 72px;
	}
}
