/**
 * Families Archive Styles
 * Styles for filter dropdown and taxonomy pills
 *
 * @package RIDS-USA
 */

/* Filter Wrapper */
.families-filter-wrapper {
	margin-bottom: 2rem;
	padding: 1.5rem 20px;
}

.families-filter-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.families-filter-label {
	display: block;
	font-weight: 600;
	font-size: 1rem;
	color: #333;
	margin: 0;
}

.families-count {
	font-weight: 600;
	font-size: 1rem;
	color: #333;
}

/* Select2 Customization */
.families-filter-wrapper .select2-container {
	width: 100% !important;
	max-width: 400px;
}

.families-filter-wrapper .select2-container--default .select2-selection--single {
	height: 48px;
	border: 2px solid rgba(0, 0, 0, 0.1);
	border-bottom-color: #01559B;
	border-radius: 4px;
	background-color: #fff;
	transition: border-color 0.3s ease;
	outline: none;
}

.families-filter-wrapper .select2-container--default .select2-selection--single:focus {
	outline: none;
}

.families-filter-wrapper .select2-container--default.select2-container--open .select2-selection--single,
.families-filter-wrapper .select2-container--default.select2-container--focus .select2-selection--single {
	outline: none;
	box-shadow: none;
}

.families-filter-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 44px;
	padding-left: 16px;
	padding-right: 50px;
	color: #333;
	font-size: 16px;
}

.families-filter-wrapper .select2-container--default .select2-selection--single .select2-selection__clear {
	position: absolute;
	right: 30px;
	top: 50%;
	transform: translateY(-50%);
	height: auto;
	width: 20px;
	line-height: 20px;
	text-align: center;
	font-size: 18px;
	color: #999;
	cursor: pointer;
	margin-right: 0;
	transition: color 0.3s ease;
}

.families-filter-wrapper .select2-container--default .select2-selection--single .select2-selection__clear:hover {
	color: #333;
}

.families-filter-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 44px;
	right: 12px;
}

.families-filter-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: #666 transparent transparent transparent;
	border-width: 6px 6px 0 6px;
	margin-top: -3px;
}

.families-filter-wrapper .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-color: transparent transparent #666 transparent;
	border-width: 0 6px 6px 6px;
	margin-top: -3px;
}

/* Select2 Dropdown */
.families-filter-wrapper .select2-dropdown {
	top: 100% !important;
	bottom: auto !important;
	margin-top: 4px;
	border: 2px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.select2-container--default .select2-results__option {
	padding: 12px 16px;
	font-size: 16px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: #01559B;
	color: #fff;
}

.select2-container--default .select2-results__option[aria-selected=true] {
	background-color: #f0f0f0;
}

.select2-container--default .select2-results__option[aria-selected=true].select2-results__option--highlighted {
	background-color: #01559B;
}

/* Taxonomy Pills - Reusable for archive and single views */
.portfolio-categories .family-taxonomy-pill {
	position: relative;
	z-index: 20;
	display: inline-block;
	padding: 8px 16px;
	border-radius: 1000px;
	font-family: var(--headings-font-family);
	font-size: 10px;
	font-weight: var(--headings-font-weight, 600);
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-color, var(--text-color-emphasis));
	--background-color: var(--background-color-emphasis);
	background-color: var(--background-color);
	transition: all 0.3s ease-out;
	white-space: nowrap;
	margin-top: var(--category-gap, 5px);
	margin-inline-end: var(--category-gap, 5px);
	cursor: default;
}

.portfolio-categories:not(.inline-categories) .family-taxonomy-pill:not(:last-of-type) {
	margin-inline-end: var(--category-gap, 5px);
}

.portfolio-categories:not(.inline-categories) .family-taxonomy-pill {
	margin-top: var(--category-gap, 5px);
}

.portfolio-categories .family-taxonomy-pill svg {
	display: inline-block;
	vertical-align: middle;
	margin-right: 6px;
	width: 12px;
	height: 12px;
}

/* Archive Content */
.families-archive-content {
	transition: opacity 0.3s ease;
}

.families-archive-content.loading {
	pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
	.families-filter-wrapper {
		margin-bottom: 1.5rem;
		padding: 1rem 20px;
	}

	.families-filter-header {
		flex-direction: column-reverse;
		align-items: flex-start;
		gap: 1rem;
	}

	.families-filter-wrapper .select2-container {
		max-width: 100%;
	}

	.family-donation-form {
		margin-left: -20px;
		margin-right: -20px;
		width: calc(100% + 40px);
		padding: 1rem;
	}
}

