/**
 * Featured Animal — grid layout with circular photo, pet tag badge, and content
 */

.module.featured-animal {
	overflow-x: clip;
}

.module.featured-animal .container {
	display: grid;
	gap: var(--gap);
	grid-template-columns: var(--grid);
}

/*** Photo Column ***/

.module.featured-animal .photo-column {
	align-items: center;
	display: flex;
	flex-direction: column;
	grid-column: 1 / span 6;
	margin-left: var(--container-breakout);
	padding-right: var(--text-spacing-small);
	position: relative;
}

.module.featured-animal .media {
	aspect-ratio: 1;
	border-radius: 999px;
	flex-shrink: 0;
	margin-bottom: -64px;
	width: 100%;
}

/*** Badge ***/

.module.featured-animal .badge {
	--badge-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cpath fill-rule='evenodd' d='M80 160a80 80 0 100-160 80 80 0 000 160zm0-125a12 12 0 100-24 12 12 0 000 24z' fill='white'/%3E%3C/svg%3E");
	align-items: center;
	display: flex;
	filter: drop-shadow(0px 8px 32px rgba(0, 0, 0, 0.08));
	flex-direction: column;
	gap: 4px;
	height: 168px;
	justify-content: center;
	padding: var(--text-spacing-xsmall) 0 12px 8px;
	position: relative;
	width: 168px;
	z-index: 1;
}

.module.featured-animal .badge::before,
.module.featured-animal .badge::after {
	content: '';
	height: 160px;
	mask-image: var(--badge-mask);
	mask-repeat: no-repeat;
	mask-size: 100% 100%;
	position: absolute;
	width: 160px;
}

.module.featured-animal .badge::before {
	background: var(--husky-blue);
	left: 0;
	top: 8px;
}

.module.featured-animal .badge::after {
	background: var(--husky-blue-50);
	left: 8px;
	top: 0;
}

.module.featured-animal .badge > * {
	position: relative;
	z-index: 1;
}

.module.featured-animal .badge .pill {
	font-size: calc(11rem / 16);
}

.module.featured-animal .badge-name {
	color: var(--russian-blue);
	display: block;
	font-family: var(--body-font);
	font-size: calc(30rem / 16);
	font-weight: 700;
	line-height: calc(32 / 30);
	text-align: center;
}

.module.featured-animal .badge .animal-type-icon {
	height: auto;
	margin: 4px 0 0;
	width: 32px;
}

/*** Content ***/

.module.featured-animal .content {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	grid-column: 7 / span 6;
	justify-content: center;
	min-width: 0;
	padding-left: var(--text-spacing-xsmall);
}

.module.featured-animal .location {
	align-items: center;
	display: flex;
	gap: var(--text-spacing-xsmall);
}

.module.featured-animal .location-pin {
	align-items: center;
	aspect-ratio: 1;
	background: var(--collie-blue);
	border-radius: var(--border-radius-normal);
	color: var(--russian-blue);
	display: flex;
	flex-shrink: 0;
	font-size: calc(15rem / 16);
	justify-content: center;
	height: 40px;
	padding: 0;
	width: 40px;
}

.module.featured-animal .content p {
	margin: 0;
}

.module.featured-animal .content > * + * {
	margin-top: var(--text-spacing-xsmall);
}

.module.featured-animal .content > * + .content-styles {
	margin-top: var(--text-spacing-small);
}

.module.featured-animal .content > * + .buttons {
	margin-top: var(--text-spacing-medium);
}

/** No Image **/

.module.featured-animal.no-image .content {
	align-items: center;
	grid-column: 4 / span 6;
	padding-left: 0;
	text-align: center;
}

.module.featured-animal.no-image .location {
	justify-content: center;
}

.module.featured-animal.no-image .buttons {
	justify-content: center;
}

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

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

	.module.featured-animal .container {
		display: block;
	}

	.module.featured-animal .photo-column {
		margin-left: 0;
		padding-right: 0;
	}

	.module.featured-animal .media {
		margin: 0 auto -64px;
		max-width: 475px;
		width: 100%;
	}

	.module.featured-animal .content {
		align-items: center;
		margin-top: var(--text-spacing-large);
		padding-left: 0;
		text-align: center;
	}

	.module.featured-animal .location {
		justify-content: center;
	}

	.module.featured-animal .buttons {
		justify-content: center;
	}

}

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

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

	.module.featured-animal .badge {
		height: 128px;
		width: 128px;
	}

	.module.featured-animal .badge::before,
	.module.featured-animal .badge::after {
		height: 120px;
		width: 120px;
	}

	.module.featured-animal .badge .pill {
		font-size: calc(10rem / 16);
	}

	.module.featured-animal .badge-name {
		font-size: calc(22rem / 16);
	}

	.module.featured-animal .badge .animal-type-icon {
		width: 22px;
	}

	.module.featured-animal .content {
		align-items: flex-start;
		margin-top: var(--text-spacing-medium);
		text-align: left;
	}

	.module.featured-animal .location {
		justify-content: flex-start;
	}

	.module.featured-animal .buttons {
		align-items: flex-start;
		flex-direction: column;
		gap: var(--text-spacing-medium);
		justify-content: flex-start;
	}

}
