/*
 * Algolia Search autocomplete: structure only. The dropdown sits under the
 * field, above the page, and scrolls on its own. Every visual (surface, radius,
 * shadow, spacing, type) belongs to the host theme.
 */
/* Field width caps the block / widget wrapper, which fills the row it sits in
   first: inside a flex Row a block shrinks to its content otherwise. */
.wp-block-jkd-algolia-search,
.elementor-widget-jkd-algolia-search {
	width: 100%;
	max-width: var(--jkd-algolia-ac-w, none);
}

.jkd-algolia-ac {
	position: relative;
}

.jkd-algolia-ac__input {
	width: 100%;
}

.jkd-algolia-ac__panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	flex-direction: column;
	max-height: var(--jkd-algolia-ac-panel-h, 480px);
	overflow: hidden;
}

/* The results scroll inside the capped panel; the foot (all results link,
   attribution) stays in view under them. */
.jkd-algolia-ac__results {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.jkd-algolia-ac__panel[hidden],
.jkd-algolia-ac__empty[hidden],
.jkd-algolia-ac__all[hidden] {
	display: none;
}

.jkd-algolia-ac__item,
.jkd-algolia-ac__label {
	display: block;
}
