/* FPLF main legal forms search */
.fplf-search-facet {
	width: 100%;
	max-width: 620px;
	margin-left: auto;
	margin-right: auto;
}

.fplf-search-facet .facetwp-facet {
	margin-bottom: 0;
}

.fplf-search-facet .facetwp-input-wrap,
.fplf-search-facet input.facetwp-search {
	width: 100%;
}

.fplf-search-facet input.facetwp-search {
	box-sizing: border-box;
	min-height: 56px;
	padding: 0 54px 0 18px;
	font-size: 16px;
	line-height: 1.4;
	color: #0f2747;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
}

.fplf-search-facet input.facetwp-search::placeholder {
	color: #6b7280;
	opacity: 1;
}

.fplf-search-facet input.facetwp-search:focus {
	outline: none;
	border-color: #2f6fdd;
	box-shadow: 0 0 0 3px rgba(47, 111, 221, 0.12);
}

.fplf-search-facet .facetwp-icon {
	width: 52px;
	opacity: 0.6;
}

/* FPLF FILTER CARD */

/* State choices search */
.fplf-state-search-wrap {
	position: relative;
	width: 100%;
	margin: 0 0 14px;
}

#fplf-state-search {
	box-sizing: border-box;
	width: 100%;
	height: 40px;
	padding: 0 12px;

	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	color: #0f2747;

	background: #ffffff;
	border: 1px solid #d6e0ec;
	border-radius: 6px;
}

#fplf-state-search::placeholder {
	color: #7b8798;
	opacity: 1;
}

#fplf-state-search:focus {
	outline: none;
	border-color: #3478e5;
	box-shadow: 0 0 0 3px rgba(52, 120, 229, 0.12);
}

/* Scrollable State list when more states are imported */
.fplf-state-facet .facetwp-facet {
	width: 100%;
	max-height: 230px;
	overflow-y: auto;
	padding-right: 6px;
	margin-bottom: 0;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

.fplf-state-facet .facetwp-facet::-webkit-scrollbar {
	width: 6px;
}

.fplf-state-facet .facetwp-facet::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 10px;
}

.fplf-filter-card {
	width: 100%;
	align-items: stretch !important;
	text-align: left !important;
}

/* =========================================
   STATE SEE MORE / SEE LESS
========================================= */

/* FacetWP inactive toggle must always remain hidden */
.fplf-state-facet .facetwp-toggle.facetwp-hidden,
.facetwp-flyout .facetwp-toggle.facetwp-hidden {
	display: none !important;
}

/* Visible toggle */
.fplf-state-facet .facetwp-toggle:not(.facetwp-hidden),
.facetwp-flyout .facetwp-toggle:not(.facetwp-hidden) {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;

	width: auto !important;
	margin-top: 8px !important;
	padding: 6px 10px !important;

	background: #f5f8fc;
	border: 1px solid #d6e0eb;
	border-radius: 6px;

	color: #2463c7 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;

	text-decoration: none !important;
	cursor: pointer;
}

.fplf-state-facet .facetwp-toggle:not(.facetwp-hidden):hover,
.facetwp-flyout .facetwp-toggle:not(.facetwp-hidden):hover {
	background: #edf4fb;
	border-color: #b7cae0;
	color: #174f87 !important;
}

/* Main filter title */

.fplf-filter-title {
	width: 100%;
	margin: 0 0 30px;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	text-align: left !important;
	color: #0f2747;
}


/* State and Form Category headings */

.fplf-filter-heading {
	width: 100%;
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left !important;
	color: #0f2747;
}

.fplf-filter-heading-spaced {
	margin-top: 28px;
}


/* Facet wrappers */

.fplf-checkbox-facet,
.fplf-category-facet {
	width: 100%;
	text-align: left !important;
}

.fplf-checkbox-facet .facetwp-facet,
.fplf-category-facet .facetwp-facet {
	width: 100%;
	margin-bottom: 0;
	text-align: left !important;
}


/* CUSTOM STATE CHECKBOX */

.fplf-checkbox-facet .facetwp-checkbox {
	position: relative;
	display: block;

	min-height: 24px;
	margin-bottom: 10px;
	padding: 2px 0 2px 28px !important;

	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	text-align: left !important;
	color: #0f2747;

	background-image: none !important;
	cursor: pointer;
}


/* Empty checkbox */

.fplf-checkbox-facet .facetwp-checkbox::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;

	width: 16px;
	height: 16px;
	box-sizing: border-box;

	background: #ffffff;
	border: 1.5px solid #b8c5d6;
	border-radius: 3px;

	transform: translateY(-50%);
	transition:
		background-color 0.15s ease,
		border-color 0.15s ease;
}


/* Checkbox hover */

.fplf-checkbox-facet .facetwp-checkbox:hover::before {
	border-color: #2f6fdd;
}


/* Selected checkbox */

.fplf-checkbox-facet .facetwp-checkbox.checked::before {
	background: #2f6fdd;
	border-color: #2f6fdd;
}


/* White checkmark */

.fplf-checkbox-facet .facetwp-checkbox.checked::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 5px;

	width: 5px;
	height: 9px;

	border: solid #ffffff;
	border-width: 0 2px 2px 0;

	transform: translateY(-62%) rotate(45deg);
}


/* Result count next to label */

.fplf-checkbox-facet .facetwp-counter {
	margin-left: 3px;
	color: inherit;
}


/* CATEGORY FACET ALIGNMENT */

.fplf-category-facet,
.fplf-category-facet * {
	text-align: left;
}

.fplf-category-facet .facetwp-counter {
	margin-left: 3px;
}

/* UNIFIED STATE + CATEGORY CHECKBOXES */

.fplf-checkbox-facet .facetwp-checkbox {
	position: relative;
	display: flex !important;
	align-items: center;
	width: 100%;
	min-height: 22px;
	margin: 0 0 10px !important;
	padding: 0 0 0 26px !important;

	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	color: #0f2747;

	background-image: none !important;
	cursor: pointer;
}


/* Empty checkbox */

.fplf-checkbox-facet .facetwp-checkbox::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;

	width: 17px;
	height: 17px;
	box-sizing: border-box;

	background: #ffffff;
	border: 1.5px solid #aebdce;
	border-radius: 3px;

	transform: translateY(-50%);
}


/* Selected checkbox */

.fplf-checkbox-facet .facetwp-checkbox.checked::before {
	background: #3478e5;
	border-color: #3478e5;
}


/* White checkmark */

.fplf-checkbox-facet .facetwp-checkbox.checked::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 5px;

	width: 5px;
	height: 9px;

	border: solid #ffffff;
	border-width: 0 2px 2px 0;

	transform: translateY(-62%) rotate(45deg);
}


/* Count beside the label */

.fplf-checkbox-facet .facetwp-counter {
	margin-left: 4px;
	color: inherit;
}


/* HIERARCHICAL CATEGORY STRUCTURE */

/* Child category indentation */

.fplf-category-facet .facetwp-depth {
	margin-left: 22px;
}


/* Parent category can be slightly stronger */

.fplf-category-facet .facetwp-depth-0 > .facetwp-checkbox,
.fplf-category-facet .facetwp-checkbox[data-depth="0"] {
	font-weight: 500;
}


/* Expand/collapse control */

.fplf-category-facet .facetwp-expand {
	margin-left: auto;
	padding-left: 12px;
	font-size: 14px;
	font-weight: 600;
	color: #0f2747;
	text-decoration: none;
}


/* Prevent expand control from moving checkbox alignment */

.fplf-category-facet .facetwp-checkbox {
	padding-right: 4px !important;
}

/* FPLF Reset Filters facet */
.fplf-reset-facet {
	width: 100%;
	margin-top: 28px;
}

.fplf-reset-facet .facetwp-facet {
	width: 100%;
	margin-bottom: 0;
}

.fplf-reset-facet .facetwp-reset,
.fplf-reset-facet button,
.fplf-reset-facet a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;

	width: 100%;
	min-height: 48px;
	padding: 12px 16px;

	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;

	color: #2f6fdd;
	background: #ffffff;
	border: 1px solid #2f6fdd;
	border-radius: 7px;

	cursor: pointer;
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease;
}

/* Reset arrow icon */
.fplf-reset-facet .facetwp-reset::before,
.fplf-reset-facet button::before,
.fplf-reset-facet a::before {
	content: "↻";
	font-size: 19px;
	font-weight: 400;
	line-height: 1;
}

/* Hover */
.fplf-reset-facet .facetwp-reset:hover,
.fplf-reset-facet button:hover,
.fplf-reset-facet a:hover {
	color: #ffffff;
	background: #2f6fdd;
	border-color: #2f6fdd;
}

/* Keyboard focus */
.fplf-reset-facet .facetwp-reset:focus-visible,
.fplf-reset-facet button:focus-visible,
.fplf-reset-facet a:focus-visible {
	outline: 3px solid rgba(47, 111, 221, 0.2);
	outline-offset: 2px;
}

/* Result count */
.fplf-result-count,
.fplf-result-count .facetwp-facet {
	width: 100%;
	margin-bottom: 0;
	text-align: left;
}

.fplf-result-count {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: #0f2747;
}


/* Sort facet */
.fplf-sort-facet,
.fplf-sort-facet .facetwp-facet {
	margin-bottom: 0;
}

.fplf-sort-facet select {
	box-sizing: border-box;
	min-width: 210px;
	height: 48px;
	padding: 0 42px 0 16px;

	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	color: #0f2747;

	background-color: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	cursor: pointer;
}

.fplf-sort-facet select:focus {
	outline: none;
	border-color: #3478e5;
	box-shadow: 0 0 0 3px rgba(52, 120, 229, 0.12);
}

/* Search result title */
.fplf-result-title,
.fplf-result-title a {
	margin: 0;
	color: #103b78;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.fplf-result-title a:hover {
	color: #2f6fdd;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.fplf-result-description {
	margin: 7px 0 12px;
	color: #334155;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
}

.fplf-result-taxonomies {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin-bottom: 0;
	color: #24558c;
	font-size: 13px;
	line-height: 1.4;
}

.fplf-result-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin-top: 0;
	color: #475569;
	font-size: 13px;
	line-height: 1.4;
}

/* Result card actions */
.fplf-result-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	width: 188px;
}

/* Text column clears the action buttons (right 28px + 188px) with a 16px gap. The loop item's own 210px right padding
   (sized for 180px buttons) left 6px of every wrapped title under the buttons (OPEN_ISSUES #22, 2026-11-05).
   From 768px = where the loop item keeps its desktop layout; below, GenerateBlocks sets 28px. */
@media (min-width: 768px) {
	.fplf-result-card {
		padding-right: 232px;
	}
}

/* View Details button */
.fplf-result-view,
.fplf-result-view:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: 100%;
    min-height: 34px;
    padding: 5px 8px;

    color: #1d548d !important;
    background: transparent !important;

    border: 0 !important;
    border-radius: 0;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    box-shadow: none !important;
    transform: none !important;
}

.fplf-result-view::after {
    content: "→";
    transition: transform 0.2s ease;
}

.fplf-result-view,
.fplf-result-view:visited,
.fplf-result-view:hover,
.fplf-result-view:focus {
    text-decoration: none !important;
}

.fplf-result-view:hover::after {
    transform: translateX(3px);
}

/* PDF + DOCX buttons */
.fplf-result-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    box-sizing: border-box;
    width: 100%;
    min-height: 40px;

    padding: 8px 14px;

    border-radius: 6px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    text-align: center;
    text-decoration: none !important;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.fplf-result-download svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}


/* PDF */
.fplf-result-download-pdf,
.fplf-result-download-pdf:visited {
    color: #e53935 !important;
    background: #ffffff;
    border: 1px solid #e53935;
}

.fplf-result-download-pdf svg {
    color: #e53935;
    fill: currentColor;
}

.fplf-result-download-pdf:hover {
    color: #ffffff !important;
    background: #e53935;
}


/* DOCX */
.fplf-result-download-docx,
.fplf-result-download-docx:visited {
    color: #2368bd !important;
    background: #ffffff;
    border: 1px solid #2368bd;
}

.fplf-result-download-docx svg {
    color: #2368bd;
    fill: currentColor;
}

.fplf-result-download-docx:hover {
    color: #ffffff !important;
    background: #2368bd;
}

/* Hover */
.fplf-result-download:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* =========================================
   DOWNLOAD ICONS - HOVER
   White document + colored P / W
========================================= */

/* Document shape becomes white */
.fplf-result-download:hover svg path:first-child,
.fplf-result-download:focus-visible svg path:first-child {
    fill: #ffffff !important;
    stroke: none !important;
}

/* PDF - keep P red */
.fplf-result-download-pdf:hover svg path:nth-child(n+2),
.fplf-result-download-pdf:focus-visible svg path:nth-child(n+2) {
    fill: none !important;
    stroke: #e53935 !important;
}

/* DOCX - keep W blue */
.fplf-result-download-docx:hover svg path:nth-child(n+2),
.fplf-result-download-docx:focus-visible svg path:nth-child(n+2) {
    fill: none !important;
    stroke: #2368bd !important;
}

/* Header → "Search Legal Forms": 40px (32px ≤ 1024px, 24px ≤ 767px) – the same top spacing as the category and Single
   Form pages. GeneratePress's one-container #content padding (40px) used to add to the search block's own 72px above
   779px (module 07 already cancels it below); the search block (GenerateBlocks gb-element-04b42b8d in the archive
   Element, 72px / 40px ≤ 767px) alone sets it now. */
body.post-type-archive-forms.one-container #content.site-content {
	padding-top: 0;
}

body.post-type-archive-forms .fplf-search-copy {
	padding-top: 40px;
}

@media (max-width: 1024px) {
	body.post-type-archive-forms .fplf-search-copy {
		padding-top: 32px;
	}
}

@media (max-width: 767px) {
	body.post-type-archive-forms .fplf-search-copy {
		padding-top: 24px;
	}
}
