/**
 * Styling for the searchable area field.
 *
 * Deliberately minimal and inherited where possible, so it sits naturally inside
 * whatever theme the checkout uses rather than fighting it.
 */

.palki-dks-wrapper.palki-dks-hidden {
	display: none !important;
}

/* The real WooCommerce field. Kept in the DOM and reachable by keyboard for
   assistive tech, but visually replaced by the combobox. */
.palki-dks__native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.palki-dks {
	position: relative;
	width: 100%;
}

.palki-dks__input {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	color: inherit;
	padding: 0.75em 0.9em;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: transparent;
	opacity: 0.999; /* keeps the border colour from inheriting too faintly */
}

.palki-dks__input:focus {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.palki-dks__list {
	position: absolute;
	z-index: 40;
	top: calc(100% + 2px);
	left: 0;
	right: 0;
	max-height: 16em;
	overflow-y: auto;
	margin: 0;
	padding: 0;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.palki-dks__option {
	padding: 0.6em 0.9em;
	cursor: pointer;
	line-height: 1.3;
	color: #1a1a1a;
}

.palki-dks__option.is-active,
.palki-dks__option:hover {
	background: #f0f0f0;
}

.palki-dks__empty {
	padding: 0.75em 0.9em;
	color: #666;
	font-style: italic;
}

.palki-dks__hint {
	margin: 0.4em 0 0;
	font-size: 0.85em;
	line-height: 1.35;
	opacity: 0.75;
}

.palki-dks.is-guessed .palki-dks__input {
	border-style: dashed;
}

@media (prefers-color-scheme: dark) {
	.palki-dks__list {
		background: #1f1f1f;
		border-color: rgba(255, 255, 255, 0.2);
	}

	.palki-dks__option {
		color: #f0f0f0;
	}

	.palki-dks__option.is-active,
	.palki-dks__option:hover {
		background: #333;
	}
}
