/* RFP Unified Filter — widget styles (v2.2)
   Enqueued only on the RFP archive.
   Dark panel style: brand navy #154360 panel, mustard #ffdb58 headings. */

.rfp-filter-form {
	font-family: inherit;
	background: #154360;
	color: #ffffff;
	padding: 16px;
	border-radius: 8px;
}

/* Toolbar row: "Clear all filters" link, right-aligned, only rendered
   when at least one filter is active. */
.rfp-filter-form .rfp-filter-toolbar {
	text-align: right;
	margin-bottom: 8px;
}

/* Doubled class + !important: themes commonly style widget-area links
   (color, opacity, background-image underlines) with high specificity,
   which made this link nearly invisible on the navy panel. */
.rfp-filter-form .rfp-clear-link.rfp-clear-link {
	color: #ffdb58 !important;
	opacity: 1 !important;
	background: none !important;
	font-size: 13px;
	font-weight: bold;
	text-decoration: underline !important;
	text-decoration-color: #ffdb58 !important;
}

.rfp-filter-form .rfp-clear-link.rfp-clear-link:hover,
.rfp-filter-form .rfp-clear-link.rfp-clear-link:focus {
	color: #ffffff !important;
	text-decoration-color: #ffffff !important;
}

/* Fieldsets replace bare headings; reset browser chrome. */
.rfp-filter-form fieldset {
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.rfp-filter-form .rfp-filter-block {
	margin-bottom: 16px;
}

/* Section headings: mustard, uppercase — NYSCR-style. */
.rfp-filter-form .rfp-filter-heading {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-size: 13px;
	font-weight: bold;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #ffdb58;
}

.rfp-filter-form label {
	display: block;
	margin-bottom: 4px;
	font-weight: normal;
	color: #ffffff;
}

.rfp-filter-form input[type="text"],
.rfp-filter-form select {
	width: 100%;
	padding: 8px;
	margin-bottom: 4px;
	border: 1px solid #ffffff;
	border-radius: 4px;
	background: #ffffff;
	color: #1a1a1a;
	font: inherit;
}

.rfp-filter-form input[type="text"]::placeholder {
	color: #666666;
	opacity: 1;
}

/* Scrollable checkbox groups: transparent on the navy panel, white labels. */
.rfp-filter-form .checkbox-group {
	max-height: 150px;
	overflow-y: auto;
	border: 1px solid rgba(255, 255, 255, 0.35);
	padding: 8px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.06);
}

.rfp-filter-form .checkbox-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: normal;
	color: #ffffff;
	cursor: pointer;
}

.rfp-filter-form .checkbox-group label:last-child {
	margin-bottom: 0;
}

.rfp-filter-form .checkbox-group input[type="checkbox"] {
	margin-right: 6px;
	accent-color: #ffdb58;
}

/* ---- Custom sort dropdown (JS-enhanced) --------------------------------
   The native <select> stays in the DOM for form submission and no-JS
   fallback; when enhanced it is hidden and replaced by button + listbox. */

.rfp-filter-form .rfp-select {
	position: relative;
	margin-bottom: 4px;
}

.rfp-filter-form .rfp-select-native {
	display: none;
}

.rfp-filter-form .rfp-select-toggle {
	display: block;
	width: 100%;
	padding: 8px 32px 8px 8px;
	border: 1px solid #ffffff;
	border-radius: 4px;
	background: #ffffff;
	color: #1a1a1a;
	font: inherit;
	text-align: left;
	font-weight: normal;
	cursor: pointer;
	position: relative;
	transition: none;
}

/* Caret. */
.rfp-filter-form .rfp-select-toggle::after {
	content: "";
	position: absolute;
	right: 12px;
	top: 50%;
	margin-top: -3px;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #154360;
}

.rfp-filter-form .rfp-select-toggle[aria-expanded="true"]::after {
	margin-top: -3px;
	border-top: none;
	border-bottom: 6px solid #154360;
}

.rfp-filter-form .rfp-select-list {
	position: absolute;
	z-index: 100;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #ffffff;
	border: 1px solid #154360;
	border-radius: 4px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
	max-height: 280px;
	overflow-y: auto;
}

.rfp-filter-form .rfp-select-list [role="option"] {
	display: block;
	margin: 0;
	padding: 8px 12px;
	color: #1a1a1a;
	cursor: pointer;
}

/* The brand highlight: mustard background, navy text. */
.rfp-filter-form .rfp-select-list [role="option"].is-active {
	background: #ffdb58;
	color: #154360;
}

/* Currently applied choice. */
.rfp-filter-form .rfp-select-list [role="option"][aria-selected="true"] {
	font-weight: bold;
	color: #154360;
}

.rfp-filter-form .rfp-filter-note {
	margin: 2px 0 0;
	font-size: 12px;
	color: #d9e2ea;
}

.rfp-filter-form .rfp-filter-submit {
	margin: 0;
}

/* Search CTA: mustard on navy, inverts on hover. */
.rfp-filter-form .rfp-filter-submit button {
	background: #ffdb58;
	color: #154360;
	padding: 10px 16px;
	border: none;
	cursor: pointer;
	width: 100%;
	font-weight: bold;
	border-radius: 4px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.rfp-filter-form .rfp-filter-submit button:hover {
	background: #ffffff;
	color: #154360;
}

/* Visible keyboard focus everywhere (WCAG 2.4.7) — mustard reads
   clearly against the navy panel. */
.rfp-filter-form input:focus-visible,
.rfp-filter-form select:focus-visible,
.rfp-filter-form button:focus-visible,
.rfp-filter-form .rfp-select-list:focus-visible,
.rfp-filter-form .rfp-clear-link:focus-visible,
.rfp-filter-form .checkbox-group:focus-visible {
	outline: 2px solid #ffdb58;
	outline-offset: 2px;
}

/* Fallback for browsers without :focus-visible support. */
.rfp-filter-form input:focus,
.rfp-filter-form select:focus,
.rfp-filter-form button:focus,
.rfp-filter-form .rfp-select-list:focus,
.rfp-filter-form .rfp-clear-link:focus,
.rfp-filter-form .checkbox-group:focus {
	outline: 2px solid #ffdb58;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.rfp-filter-form .rfp-filter-submit button {
		transition: none;
	}
}
