/**
 * Archive: Resources
 *
 * Banner, multiselect topic filter, card grid.
 */

/*
 * ====================================================================== *
 * Banner
 * ====================================================================== *
 */

/*
 * ====================================================================== *
 * Feed
 * ====================================================================== *
 */

.resource-archive-feed {
	padding-top: var(--module-spacing-large);
}

/* Header row — title left, filter right */

.resource-archive-header {
	align-items: flex-end;
	display: flex;
	justify-content: space-between;
	margin-bottom: var(--module-spacing-medium);
}

.resource-archive-header .heading-2 {
	margin: 0;
}

.resource-filter-dropdown {
	display: inline-block;
	position: relative;
}

.resource-filter-toggle {
	align-items: center;
	background: var(--samoyed-white);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23E6E9EB'/%3E%3Cpath d='M9 11.5l3 3 3-3' stroke='%2303071D' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-position: right 16px center;
	background-repeat: no-repeat;
	border: 1px solid var(--wolfhound-gray);
	border-radius: var(--border-radius-normal);
	color: var(--retriever-black);
	cursor: pointer;
	display: flex;
	font-family: var(--body-font);
	font-size: calc(16rem / 16);
	line-height: calc(24 / 16);
	min-width: 200px;
	padding: 14px 48px 14px 20px;
}

.resource-filter-toggle svg {
	display: none;
}

.resource-filter-toggle[aria-expanded="true"] {
	border-color: var(--husky-blue-50);
	outline: 2px solid var(--husky-blue-50);
	outline-offset: -1px;
}

.resource-filter-panel[hidden] {
	display: none;
}

.resource-filter-panel {
	background: var(--samoyed-white);
	border: 1px solid var(--wolfhound-gray);
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	gap: 2px;
	left: 0;
	max-height: 300px;
	min-width: 240px;
	overflow-y: auto;
	padding: var(--text-spacing-xxsmall);
	position: absolute;
	top: calc(100% + 4px);
	z-index: 10;
}

.resource-filter-option {
	align-items: center;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	font-size: calc(15rem / 16);
	gap: var(--text-spacing-xxsmall);
	padding: 4px var(--text-spacing-xxsmall);
}

.resource-filter-option:hover {
	background: var(--pitty-off-white);
}

.resource-filter-option input[type="checkbox"] {
	accent-color: var(--mustang-blue);
}

/* Card overrides */

.resource-archive-feed .card.card-resource {
	background: var(--appaloosa-beige);
	border: none;
	flex-direction: column;
}

.resource-archive-feed .card.card-resource .media {
	aspect-ratio: 16 / 9;
	width: 100%;
}

.resource-archive-feed .card.card-resource .heading-6 {
	transition: color 0.2s ease;
}

.resource-archive-feed .card.card-resource:hover .heading-6 {
	color: #3D5A72;
}

.resource-archive-feed .card.card-resource .btn.text-arrow::after {
	transition: transform 0.2s ease;
}

.resource-archive-feed .card.card-resource:hover .btn.text-arrow::after {
	transform: translateX(3px);
}

.resource-archive-feed .card.card-resource:hover .btn.text-arrow {
	color: inherit;
}

.resource-archive-feed .card.card-resource .text-and-button p.small-text {
	color: var(--retriever-black);
	margin-bottom: var(--text-spacing-xsmall);
}

/* Pills — match animal card style */

.card.card-resource .text-and-button .pill {
	background: var(--collie-blue);
	color: var(--russian-blue);
	font-size: calc(11rem / 16);
	letter-spacing: 1.6px;
	padding: 4px 12px;
}

/* Card grid */

.resource-archive-feed form .resource-results ul {
	display: grid;
	column-gap: var(--module-spacing-small);
	grid-template-columns: 1fr 1fr;
	row-gap: var(--module-spacing-small);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Load more button — full width below cards */

.resource-results > [jx-form-pagination] {
	margin-top: var(--text-spacing-medium);
	width: 100%;
}

/*
 * ====================================================================== *
 * MQ <=1200px — Laptop
 * ====================================================================== *
 */

@media only screen and (max-width: calc(1200rem / 16)) {

	.resource-archive-feed {
		padding-top: var(--module-spacing-small);
	}

}

/*
 * ====================================================================== *
 * MQ <=950px — Tablet
 * ====================================================================== *
 */

@media only screen and (max-width: calc(950rem / 16)) {

	.resource-filter-toggle {
		min-width: auto;
	}

	.resource-archive-feed form .resource-results ul {
		column-gap: var(--text-spacing-large);
		row-gap: var(--text-spacing-large);
	}

}

/*
 * ====================================================================== *
 * MQ <=650px — Mobile
 * ====================================================================== *
 */

@media only screen and (max-width: calc(650rem / 16)) {

	.resource-archive-header {
		align-items: flex-start;
		flex-direction: column;
		gap: var(--text-spacing-small);
	}

	.resource-archive-feed form .resource-results ul {
		grid-template-columns: 1fr;
	}

	.card.card-resource {
		flex-direction: column;
	}

	.card.card-resource .media {
		aspect-ratio: 3 / 2;
		width: 100%;
	}

}
