.rcdps {
	--rcdps-blue: #072C90;
	--rcdps-blue-dark: #03133F;
	--rcdps-blue-tint: #EEF1F8;
	--rcdps-line: #D5D8DE;
	--rcdps-muted: #8A8F98;
	position: relative;
	max-width: 760px;
	margin: 0;
	color: #3f3f3f;
	font-size: 16px;
	line-height: 1.45;
}

.rcdps *,
.rcdps *::before,
.rcdps *::after {
	box-sizing: border-box;
}

.rcdps-label,
.rcdps-status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Search bar ---------- */

.rcdps-bar {
	display: flex;
	align-items: stretch;
	gap: 6px;
	padding: 5px 5px 5px 14px;
	background: #fff;
	border: 1px solid var(--rcdps-line);
	border-radius: 6px;
	transition: border-color .15s, box-shadow .15s;
}

.rcdps-bar::before {
	content: "";
	flex: none;
	align-self: center;
	width: 18px;
	height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='7.5' cy='7.5' r='6' fill='none' stroke='%236B7079' stroke-width='1.6'/%3E%3Cpath d='M12 12l4.5 4.5' stroke='%236B7079' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
}

.rcdps-bar:focus-within {
	border-color: var(--rcdps-blue);
	box-shadow: 0 0 0 3px rgba(7, 44, 144, .12);
}

/* Input and wrapping placeholder share one grid cell; the taller one sets the height. */
.rcdps-field {
	display: grid;
	flex: 1;
	min-width: 0;
	min-height: 44px;
}

.rcdps-field > * {
	grid-area: 1 / 1;
}

.rcdps-placeholder {
	align-self: center;
	padding: 4px;
	font-size: 16px;
	line-height: 1.3;
	color: var(--rcdps-muted);
	pointer-events: none;
}

.rcdps .rcdps-input:not(:placeholder-shown) + .rcdps-placeholder {
	visibility: hidden;
}

.rcdps .rcdps-input {
	width: 100%;
	min-width: 0;
	height: 100%;
	min-height: 44px;
	margin: 0;
	padding: 0 4px;
	font: inherit;
	font-size: 16px;
	color: #222;
	text-overflow: ellipsis;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.rcdps .rcdps-input::placeholder {
	color: transparent;
	opacity: 1;
}

.rcdps .rcdps-input::-webkit-search-cancel-button {
	cursor: pointer;
}

/* Mirrors the site's .button / .grad-blue global classes, which Elementor only
   loads on pages that already use them. */
.rcdps .rcdps-submit {
	flex: none;
	min-width: 112px;
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: 0 24px;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	color: #fff;
	background-color: var(--rcdps-blue);
	background-image: linear-gradient(90deg, #072C90 0%, #03133F 100%);
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.rcdps .rcdps-submit:hover,
.rcdps .rcdps-submit:focus-visible {
	color: #fff;
	background-image: linear-gradient(90deg, #072C90 0%, #072C90 100%);
}

.rcdps .rcdps-submit:focus-visible {
	outline: 2px solid var(--rcdps-blue);
	outline-offset: 2px;
}

/* ---------- Variants ---------- */

/* button="no": the bar is just the icon and the field. */
.rcdps--no-button .rcdps-bar {
	padding-right: 12px;
}

/* size="compact": narrow bar (e.g. header); results open wider than the bar. */
.rcdps--compact {
	width: 300px;
	max-width: 100%;
}

.rcdps--compact .rcdps-bar {
	padding-top: 2px;
	padding-bottom: 2px;
}

.rcdps.rcdps--compact .rcdps-results {
	right: auto;
	width: max(100%, 460px);
	max-width: calc(100vw - 32px);
}

/* ---------- Results ---------- */

.rcdps .rcdps-results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 50;
	max-height: min(480px, 70vh);
	margin: 0;
	padding: 6px 0;
	overflow-y: auto;
	list-style: none;
	background: #fff;
	border: 1px solid var(--rcdps-line);
	border-radius: 6px;
	box-shadow: 0 12px 28px rgba(3, 19, 63, .14);
}

.rcdps .rcdps-results[hidden] {
	display: none;
}

.rcdps .rcdps-results li {
	margin: 0;
	padding: 0;
}

.rcdps .rcdps-option a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 9px 14px;
	color: inherit;
	text-decoration: none;
}

.rcdps .rcdps-option.is-active a {
	background: var(--rcdps-blue-tint);
}

.rcdps-thumb {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 40px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #E3E5EA;
	border-radius: 4px;
}

.rcdps-thumb img {
	max-width: 88%;
	max-height: 88%;
	object-fit: contain;
}

.rcdps-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.rcdps-part {
	font-size: 17px;
	font-weight: 700;
	color: var(--rcdps-blue);
}

.rcdps-part mark {
	padding: 0;
	color: inherit;
	background: #DCE3F5;
	border-radius: 2px;
}

.rcdps-meta {
	overflow: hidden;
	font-size: 16px;
	color: #5a5f68;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.rcdps-go {
	flex: none;
	padding: 6px 12px;
	font-size: 16px;
	font-weight: 600;
	color: var(--rcdps-blue);
	border: 1px solid var(--rcdps-line);
	border-radius: 4px;
	transition: background-color .15s, color .15s, border-color .15s;
}

.rcdps .rcdps-option.is-active .rcdps-go {
	color: #fff;
	background: linear-gradient(90deg, #072C90 0%, #03133F 100%);
	border-color: transparent;
}

.rcdps .rcdps-results .rcdps-more,
.rcdps .rcdps-results .rcdps-empty {
	margin-top: 4px;
	padding: 12px 16px 8px;
	font-size: 16px;
	color: #5a5f68;
	border-top: 1px solid #EDEEF1;
}

.rcdps .rcdps-results .rcdps-empty {
	margin-top: 0;
	border-top: 0;
}

.rcdps .rcdps-more a,
.rcdps .rcdps-empty a {
	color: var(--rcdps-blue);
	font-weight: 600;
}

/* ---------- Phone ---------- */

@media (max-width: 600px) {
	/* Button drops to its own row so the placeholder keeps the full width. */
	.rcdps-bar {
		flex-wrap: wrap;
		row-gap: 4px;
		padding-left: 12px;
	}

	.rcdps-field {
		flex-basis: calc(100% - 30px);
	}

	.rcdps .rcdps-submit {
		flex-basis: 100%;
		min-width: 0;
	}

	.rcdps .rcdps-option a {
		gap: 10px;
		padding: 9px 12px;
	}

	.rcdps-go {
		display: none;
	}

	.rcdps-meta {
		white-space: normal;
	}
}
