/**
 * WRC Knowledge Hub search suggestions.
 *
 * Dropdown for the Elementor search widget. Colours inherit from Elementor's
 * global palette where it's defined, so this follows the site theme.
 */

.wrc-suggest {
	position: absolute;
	z-index: 9999;
	top: calc( 100% + 6px );
	left: 0;
	right: 0;
	max-height: 420px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e2e6ea;
	border-radius: 6px;
	box-shadow: 0 12px 32px rgba( 16, 42, 67, 0.16 );
	text-align: left;
	font-size: 15px;
	line-height: 1.4;
}

.wrc-suggest[hidden] {
	display: none;
}

/* ------------------------------------------------------------- groupings */

.wrc-suggest__group + .wrc-suggest__group {
	border-top: 1px solid #eef1f4;
}

.wrc-suggest__group-title {
	padding: 10px 16px 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #7a8794;
}

/* ----------------------------------------------------------------- items */

.wrc-suggest__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 16px;
	color: #1d2b3a;
	text-decoration: none;
	transition: background-color 0.12s ease;
}

.wrc-suggest__item:hover,
.wrc-suggest__item:focus,
.wrc-suggest__item.is-active {
	background: #f2f6fa;
	color: var( --e-global-color-primary, #0b6ea8 );
	text-decoration: none;
}

.wrc-suggest__item-label {
	flex: 1 1 auto;
	/* Titles run long — cap at two lines rather than blowing out the panel. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wrc-suggest__item-meta {
	flex: 0 0 auto;
	font-size: 12px;
	color: #7a8794;
	white-space: nowrap;
}

/* --------------------------------------------------- footer / status rows */

.wrc-suggest__all {
	display: block;
	padding: 11px 16px;
	border-top: 1px solid #eef1f4;
	background: #fafbfc;
	font-size: 13px;
	font-weight: 600;
	color: var( --e-global-color-primary, #0b6ea8 );
	text-decoration: none;
}

.wrc-suggest__all:hover,
.wrc-suggest__all:focus {
	background: #f2f6fa;
	text-decoration: underline;
}

.wrc-suggest__status {
	padding: 14px 16px;
	color: #7a8794;
	font-size: 14px;
}

.wrc-suggest__status--error {
	color: #b3261e;
}

/* ----------------------------------------------------------------- mobile */

@media ( max-width: 767px ) {
	.wrc-suggest {
		max-height: 60vh;
		font-size: 14px;
	}

	.wrc-suggest__item {
		/* Stack the report number under the title on narrow screens. */
		flex-direction: column;
		gap: 2px;
	}
}
