/**
 * GCHS ShelterLuv — Animal listing and detail styles.
 */

/* ==========================================================================
   Type Tabs
   ========================================================================== */

.gchs-animal-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid var(--wp--preset--color--neutral-light, #e4e5ed);
}

.gchs-animal-tabs__btn {
	padding: 0.875rem 1.5rem;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--neutral-mid, #686868);
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.gchs-animal-tabs__btn:hover {
	color: var(--wp--preset--color--primary-dark, #34577c);
}

.gchs-animal-tabs__btn--active {
	color: var(--wp--preset--color--primary-dark, #34577c);
	border-bottom-color: var(--wp--preset--color--accent-warm, #e07c3a);
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.gchs-animal-filters {
	margin-bottom: 2rem;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
	border-radius: 12px;
	overflow: hidden;
}

.gchs-animal-filters__row {
	display: flex;
	align-items: stretch;
}

.gchs-animal-filters__field {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
	position: relative;
}

.gchs-animal-filters__field:last-child {
	border-right: none;
}

.gchs-animal-filters__field--search {
	flex: 1.5;
	position: relative;
}

.gchs-animal-filters__label {
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wp--preset--color--neutral-mid, #686868);
	padding: 0.625rem 0.875rem 0;
	display: block;
}

.gchs-animal-filters__icon {
	position: absolute;
	left: 0.875rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--wp--preset--color--neutral-mid, #686868);
	pointer-events: none;
}

.gchs-animal-filters__search {
	width: 100%;
	padding: 1rem 0.875rem 1rem 2.5rem;
	border: none;
	background: transparent;
	font-family: var(--wp--preset--font-family--body, 'Source Serif Pro', serif);
	font-size: 0.9375rem;
	color: var(--wp--preset--color--contrast, #000);
	outline: none;
}

.gchs-animal-filters__search::placeholder {
	color: var(--wp--preset--color--neutral-mid, #686868);
}

.gchs-animal-filters select {
	width: 100%;
	padding: 0.25rem 0.875rem 0.625rem;
	border: none;
	background: transparent;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary-dark, #34577c);
	cursor: pointer;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23686868' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	padding-right: 2rem;
}

.gchs-animal-filters__field:focus-within {
	background: rgba(112, 157, 204, 0.04);
}

/* Active filter tags */
.gchs-animal-filters__active {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	border-top: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
	background: rgba(112, 157, 204, 0.04);
}

.gchs-animal-filters__active-label {
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--wp--preset--color--neutral-mid, #686868);
	white-space: nowrap;
}

.gchs-animal-filters__tags {
	display: flex;
	gap: 0.375rem;
	flex-wrap: wrap;
}

.gchs-animal-filters__tag {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.5rem;
	background: var(--wp--preset--color--primary-dark, #34577c);
	color: #fff;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	border-radius: 4px;
}

.gchs-animal-filters__tag button {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	font-size: 0.875rem;
	padding: 0;
	line-height: 1;
	transition: color 0.15s ease;
}

.gchs-animal-filters__tag button:hover {
	color: #fff;
}

.gchs-animal-filters__clear {
	margin-left: auto;
	background: none;
	border: none;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--wp--preset--color--accent-warm, #e07c3a);
	cursor: pointer;
	padding: 0;
	white-space: nowrap;
}

.gchs-animal-filters__clear:hover {
	text-decoration: underline;
}

/* Toolbar (result count + view toggle) */
.gchs-animal-filters__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 1rem;
	border-top: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
}

.gchs-animal-filters__result-count {
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.75rem;
	color: var(--wp--preset--color--neutral-mid, #686868);
}

.gchs-animal-filters__quick-filters {
	display: flex;
	gap: 0.375rem;
}

.gchs-quick-filter {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.3rem 0.625rem;
	border-radius: 20px;
	border: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
	background: none;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--wp--preset--color--neutral-mid, #686868);
	transition: all 0.15s ease;
	white-space: nowrap;
}

.gchs-quick-filter:hover {
	border-color: var(--wp--preset--color--primary-dark, #34577c);
	color: var(--wp--preset--color--primary-dark, #34577c);
}

.gchs-quick-filter--active {
	background: var(--wp--preset--color--primary-dark, #34577c);
	border-color: var(--wp--preset--color--primary-dark, #34577c);
	color: #fff;
}

.gchs-quick-filter__dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.gchs-quick-filter--active .gchs-quick-filter__dot {
	background: #fff !important;
}

.gchs-animal-filters__view-toggle {
	display: flex;
	gap: 0.25rem;
}

.gchs-view-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid transparent;
	background: none;
	cursor: pointer;
	color: var(--wp--preset--color--neutral-mid, #686868);
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.gchs-view-btn:hover {
	color: var(--wp--preset--color--primary-dark, #34577c);
	background: rgba(0, 0, 0, 0.03);
}

.gchs-view-btn--active {
	color: var(--wp--preset--color--primary-dark, #34577c);
	border-color: var(--wp--preset--color--neutral-light, #e4e5ed);
	background: rgba(112, 157, 204, 0.08);
}

/* Responsive filters */
@media (max-width: 768px) {
	.gchs-animal-filters__view-toggle,
	.gchs-animal-filters__quick-filters {
		display: none;
	}

	.gchs-animal-filters__row {
		flex-direction: column;
	}

	.gchs-animal-filters__field {
		border-right: none;
		border-bottom: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
	}

	.gchs-animal-filters__field:last-child {
		border-bottom: none;
	}

	.gchs-animal-filters__label {
		padding-top: 0.5rem;
	}

	.gchs-animal-filters select {
		padding-bottom: 0.5rem;
	}
}

/* ==========================================================================
   Animal Grid
   ========================================================================== */

.gchs-animal-grid {
	display: grid;
	grid-template-columns: repeat(var(--gchs-animal-cols, 3), 1fr);
	gap: 24px;
	min-height: 200px;
}

.gchs-animal-grid__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 3rem;
	color: var(--wp--preset--color--neutral-mid, #686868);
	font-size: 1.125rem;
}

/* Loading spinner */
.gchs-animal-grid__loading {
	display: flex;
	justify-content: center;
	padding: 2rem;
	max-height: 120px;
	overflow: hidden;
	opacity: 1;
	transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
}

.gchs-animal-grid__loading[aria-hidden="true"] {
	max-height: 0;
	opacity: 0;
	padding: 0 2rem;
}

.gchs-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid var(--wp--preset--color--neutral-light, #e4e5ed);
	border-top-color: var(--wp--preset--color--primary, #709dcc);
	border-radius: 50%;
	animation: gchs-spin 0.7s linear infinite;
}

@keyframes gchs-spin {
	to { transform: rotate(360deg); }
}

.gchs-lottie-spinner {
	width: 80px;
	height: 80px;
	filter: brightness(0) saturate(100%) invert(35%) sepia(15%) saturate(1200%) hue-rotate(175deg) brightness(90%);
}

/* Skeleton loading cards */
.gchs-animal-card--skeleton {
	pointer-events: none;
}

.gchs-skeleton-pulse {
	background: linear-gradient(90deg, #e4e5ed 25%, #f0f0f5 50%, #e4e5ed 75%);
	background-size: 200% 100%;
	animation: gchs-shimmer 1.5s infinite;
	border-radius: 4px;
	height: 100%;
	width: 100%;
}

@keyframes gchs-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ==========================================================================
   Animal Card
   ========================================================================== */

.gchs-animal-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: var(--wp--preset--color--contrast, #000);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* Entrance animation — only inside the animals container (adopt listing pages) */
.gchs-animals-container .gchs-animal-card {
	opacity: 0;
	transform: translateY(20px);
	transition: box-shadow 0.25s ease, transform 0.5s ease, opacity 0.5s ease;
	transition-delay: calc(var(--card-index, 0) * 60ms);
}

.gchs-animals-container .gchs-animal-card.gchs-card-visible {
	opacity: 1;
	transform: translateY(0);
}

.gchs-animals-container .gchs-animal-card--skeleton {
	opacity: 1;
	transform: none;
	transition-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
	.gchs-animals-container .gchs-animal-card {
		opacity: 1;
		transform: none;
		transition-delay: 0ms;
	}
}

.gchs-animal-card:hover {
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
	transform: translateY(-4px);
}

.gchs-animal-card__photo {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--wp--preset--color--neutral-light, #e4e5ed);
}

.gchs-animal-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.gchs-animal-card:hover .gchs-animal-card__photo img {
	transform: scale(1.06);
}

.gchs-animal-card__no-photo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--wp--preset--color--neutral-mid, #686868);
	opacity: 0.4;
}

/* Badges */
.gchs-animal-card__badge {
	position: absolute;
	top: 0.75rem;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	padding: 0.25rem 0.625rem;
	border-radius: 3px;
}

.gchs-animal-card__badge--foster {
	left: 0.75rem;
	background: var(--wp--preset--color--primary, #709dcc);
	color: #fff;
}

.gchs-animal-card__badge--fee {
	right: 0.75rem;
	background: var(--wp--preset--color--accent-warm, #e07c3a);
	color: #fff;
}

/* Appointment Required is longer than other badges, so always place it
 * on its own row below the top (foster + fee) row — otherwise it
 * collides with the right-anchored fee badge on cards that have both. */
.gchs-animal-card__badge--behavior {
	left: 0.75rem;
	top: 2.5rem;
	background: #b45309;
	color: #fff;
	display: inline-flex;
	align-items: center;
	max-width: calc(100% - 1.5rem); /* don't overflow the image area */
}

/* Card info */
.gchs-animal-card__info {
	padding: 1rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	flex: 1;
}

.gchs-animal-card__name {
	font-family: var(--wp--preset--font-family--heading, 'League Spartan', sans-serif);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark, #34577c);
	margin: 0;
	line-height: 1.2;
}

.gchs-animal-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--neutral-mid, #686868);
}

.gchs-animal-card__sep {
	opacity: 0.4;
}

.gchs-animal-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	margin-top: auto;
	padding-top: 0.5rem;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--accent-warm, #e07c3a);
	transition: gap 0.2s ease;
}

.gchs-animal-card:hover .gchs-animal-card__cta {
	gap: 0.625rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.gchs-animal-pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
}

.gchs-animal-pagination__info {
	font-size: 0.875rem;
	color: var(--wp--preset--color--neutral-mid, #686868);
}

/* ==========================================================================
   Animal Detail Page
   ========================================================================== */

/* Top Navigation Bar */
.gchs-animal-topbar {
	background: var(--wp--preset--color--neutral-light, #e4e5ed);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.gchs-animal-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.75rem;
}

/* Back button */
.gchs-animal-topbar__back {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary-dark, #34577c);
	text-decoration: none;
	padding: 0.375rem 0.75rem 0.375rem 0.375rem;
	border-radius: 6px;
	transition: background-color 0.15s ease;
	white-space: nowrap;
}

.gchs-animal-topbar__back:hover {
	background: rgba(0, 0, 0, 0.05);
	color: var(--wp--preset--color--accent-warm, #e07c3a);
}

/* Breadcrumb trail */
.gchs-animal-topbar__breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.75rem;
	color: var(--wp--preset--color--neutral-mid, #686868);
}

.gchs-animal-topbar__breadcrumb a {
	color: var(--wp--preset--color--neutral-mid, #686868);
	text-decoration: none;
	transition: color 0.15s ease;
}

.gchs-animal-topbar__breadcrumb a:hover {
	color: var(--wp--preset--color--primary-dark, #34577c);
}

.gchs-animal-topbar__breadcrumb svg {
	opacity: 0.35;
	flex-shrink: 0;
}

.gchs-animal-topbar__breadcrumb span[aria-current] {
	color: var(--wp--preset--color--primary-dark, #34577c);
	font-weight: 600;
}

/* Share links */
.gchs-animal-topbar__share {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.gchs-animal-topbar__share-link {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.4rem 0.5rem;
	border-radius: 6px;
	color: var(--wp--preset--color--neutral-mid, #686868);
	text-decoration: none;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.75rem;
	font-weight: 600;
	background: none;
	border: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gchs-animal-topbar__share-link:hover {
	background: rgba(0, 0, 0, 0.05);
	color: var(--wp--preset--color--primary-dark, #34577c);
}

/* Switch link (Dogs ↔ Cats) */
.gchs-animal-topbar__switch {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--accent-warm, #e07c3a);
	text-decoration: none;
	padding: 0.375rem 0.75rem;
	border-radius: 6px;
	transition: background-color 0.15s ease, gap 0.2s ease;
	white-space: nowrap;
}

.gchs-animal-topbar__switch:hover {
	background: rgba(0, 0, 0, 0.05);
	gap: 0.5rem;
}

/* Responsive — stack on mobile */
@media (max-width: 768px) {
	.gchs-animal-topbar__breadcrumb {
		display: none;
	}

	.gchs-animal-topbar__share span {
		display: none;
	}
}

/* Detail layout */
.gchs-animal-detail {
	padding: var(--wp--preset--spacing--50, 30px) 0 var(--wp--preset--spacing--70, 90px);
	overflow: hidden;
}

.gchs-animal-detail__layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wp--preset--spacing--50, 30px);
	align-items: start;
	min-width: 0;
}

.gchs-animal-detail__gallery,
.gchs-animal-detail__info {
	min-width: 0;
	width: 100%;
	overflow: hidden;
}

/* Slideshow Gallery */
.gchs-slideshow {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: var(--wp--preset--color--neutral-light, #e4e5ed);
	outline: none;
}

.gchs-slideshow__stage {
	position: relative;
	aspect-ratio: 5 / 4;
}

.gchs-slideshow__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.8s ease;
	z-index: 1;
}

.gchs-slideshow__slide--active {
	opacity: 1;
	z-index: 2;
}

.gchs-slideshow__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Progress bar + counter */
.gchs-slideshow__progress-wrap {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
	pointer-events: none;
}

.gchs-slideshow__progress-bar {
	flex: 1;
	height: 3px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 2px;
	overflow: hidden;
}

.gchs-slideshow__progress-fill {
	height: 100%;
	background: #fff;
	border-radius: 2px;
	transition: width 0.5s ease;
}

.gchs-slideshow__counter {
	color: #fff;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0.9;
}

/* Prev / Next arrows */
.gchs-slideshow__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.25s ease, background-color 0.2s ease;
	padding: 0;
}

.gchs-slideshow:hover .gchs-slideshow__arrow {
	opacity: 1;
}

.gchs-slideshow__arrow:hover {
	background: rgba(0, 0, 0, 0.6);
}

.gchs-slideshow__arrow--prev {
	left: 0.75rem;
}

.gchs-slideshow__arrow--next {
	right: 0.75rem;
}

/* Ken Burns effect for single-photo animals */
.gchs-slideshow--ken-burns .gchs-slideshow__slide--active img {
	animation: gchs-ken-burns 20s ease-in-out infinite alternate;
	transform-origin: center;
}

@keyframes gchs-ken-burns {
	0% {
		transform: scale(1) translate(0, 0);
	}
	100% {
		transform: scale(1.08) translate(-1%, -1%);
	}
}

/* Reduced motion — no fade, no ken burns, no autoplay (handled by JS) */
@media (prefers-reduced-motion: reduce) {
	.gchs-slideshow__slide {
		transition: none;
	}

	.gchs-slideshow--ken-burns .gchs-slideshow__slide--active img {
		animation: none;
	}
}

/* Thumbnail wrapper */
.gchs-animal-detail__thumbs-wrap {
	margin-top: 0.75rem;
}

/* Thumbnails */
.gchs-animal-detail__thumbs {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 0.25rem;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.gchs-animal-detail__thumb {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	border-radius: 6px;
	overflow: hidden;
	border: 2px solid transparent;
	cursor: pointer;
	background: none;
	padding: 0;
	scroll-snap-align: start;
	transition: border-color 0.2s ease, opacity 0.2s ease;
	opacity: 0.6;
}

.gchs-animal-detail__thumb--active {
	border-color: var(--wp--preset--color--primary, #709dcc);
	opacity: 1;
}

.gchs-animal-detail__thumb:hover {
	opacity: 1;
}

.gchs-animal-detail__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.gchs-animal-detail__thumb img.is-loaded {
	opacity: 1;
}

/* Video */
.gchs-animal-detail__video {
	margin-top: 1rem;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.gchs-animal-detail__video iframe {
	width: 100%;
	height: 100%;
	border: none;
}

/* ==========================================================================
   Info Panel — Stacked Modern Design
   ========================================================================== */

.gchs-animal-detail__info {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* Hero Name */
.gchs-animal-detail__hero-name {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.gchs-animal-detail__name {
	font-family: var(--wp--preset--font-family--heading, 'League Spartan', sans-serif);
	font-size: clamp(2.5rem, 5vw, 3.5rem);
	font-weight: 800;
	color: var(--wp--preset--color--primary-dark, #34577c);
	margin: 0;
	line-height: 1;
	letter-spacing: -0.02em;
}

.gchs-animal-detail__id {
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--wp--preset--color--neutral-mid, #686868);
	letter-spacing: 0.5px;
}

.gchs-animal-detail__type-badge {
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 0.3rem 0.75rem;
	border-radius: 20px;
	background: var(--wp--preset--color--primary, #709dcc);
	color: #fff;
}

.gchs-animal-detail__status-badge {
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 0.3rem 0.75rem;
	border-radius: 20px;
	background: #dcfce7;
	color: #166534;
}

.gchs-animal-detail__status-badge--foster {
	background: #eff6ff;
	color: #1e40af;
}

/* Actions — prominent, above details */
.gchs-animal-detail__actions {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.gchs-animal-detail__actions-row {
	display: flex;
	gap: 0.625rem;
}

.gchs-animal-detail__actions-row .gchs-btn {
	flex: 1;
	font-size: 0.75rem;
	padding: 0.625rem 1rem;
}

/* Stacked Detail Cards */
.gchs-animal-detail__details-stack {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	border: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
	border-radius: 8px;
	overflow: hidden;
}

.gchs-animal-detail__detail-card {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	padding: 0.875rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
}

.gchs-animal-detail__detail-card:nth-child(odd) {
	border-right: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
}

/* Remove bottom border on last row */
.gchs-animal-detail__details-stack > :nth-last-child(-n+2) {
	border-bottom: none;
}

.gchs-animal-detail__detail-label {
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wp--preset--color--neutral-mid, #686868);
}

.gchs-animal-detail__detail-value {
	font-family: var(--wp--preset--font-family--heading, 'League Spartan', sans-serif);
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark, #34577c);
}

.gchs-animal-detail__detail-card--fee {
	background: rgba(112, 157, 204, 0.06);
}

.gchs-animal-detail__detail-value--fee {
	color: var(--wp--preset--color--accent-warm, #e07c3a);
	font-size: 1.25rem;
}

/* Section label */
.gchs-animal-detail__section-label {
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wp--preset--color--neutral-mid, #686868);
	display: block;
	margin-bottom: 0.5rem;
}

/* Good With / Compatibility */
.gchs-animal-detail__compat {
	padding: 0;
}

.gchs-animal-detail__compat-icons {
	display: flex;
	gap: 0.5rem;
}

.gchs-compat {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 0.5rem 0.875rem;
	border-radius: 8px;
	flex: 1;
	justify-content: center;
}

.gchs-compat--yes {
	background: #dcfce7;
	color: #166534;
}

/* "Not compatible" should read as informational, not a warning. Bright
 * red reads as "danger" and can deter adopters from a perfectly
 * adoptable dog whose only flag is "hasn't been around cats." */
.gchs-compat--no {
	background: #f3f4f6;
	color: #6b7280;
}

/* Outline the heart icon and dim it slightly so "no" looks distinctly
 * different from "yes" without leaning on alarm colors. */
.gchs-compat--no svg {
	opacity: 0.7;
}

/* Attributes */
.gchs-animal-detail__attributes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.gchs-animal-detail__attr-tag {
	padding: 0.375rem 0.875rem;
	background: var(--wp--preset--color--neutral-light, #e4e5ed);
	border-radius: 20px;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.75rem;
	font-weight: 600;
}

/* Shared tooltip mechanics — any attr-tag with a [data-tooltip] attribute
   gets a hover/focus tooltip. Variant classes (--behavior, --health) set
   their own accent colors. */
.gchs-animal-detail__attr-tag[data-tooltip] {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	cursor: help;
	outline: none;
}

.gchs-animal-detail__attr-tag[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 0;
	min-width: 220px;
	max-width: 280px;
	padding: 0.625rem 0.875rem;
	background: #1e3550;
	color: #fff;
	font-family: var(--wp--preset--font-family--body, system-ui, sans-serif);
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: normal;
	text-align: left;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
	z-index: 10;
	white-space: normal;
}

.gchs-animal-detail__attr-tag[data-tooltip]::before {
	content: '';
	position: absolute;
	bottom: calc(100% + 2px);
	left: 1.25rem;
	border: 6px solid transparent;
	border-top-color: #1e3550;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
	z-index: 10;
}

.gchs-animal-detail__attr-tag[data-tooltip]:hover::after,
.gchs-animal-detail__attr-tag[data-tooltip]:hover::before,
.gchs-animal-detail__attr-tag[data-tooltip]:focus-visible::after,
.gchs-animal-detail__attr-tag[data-tooltip]:focus-visible::before {
	opacity: 1;
}

/* Behavior consult variant — amber accent */
.gchs-animal-detail__attr-tag--behavior {
	background: #fff7ed;
	color: #b45309;
	border: 1.5px solid #b45309;
}

.gchs-animal-detail__attr-tag--behavior:focus-visible {
	box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.25);
}

/* Health variant (FIV, FeLV) — teal accent, informational */
.gchs-animal-detail__attr-tag--health {
	background: #ecfeff;
	color: #0e7490;
	border: 1.5px solid #0e7490;
}

.gchs-animal-detail__attr-tag--health:focus-visible {
	box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.25);
}

/* Foster notice */
.gchs-animal-detail__foster-notice {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.875rem 1rem;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	font-size: 0.8125rem;
	color: #1e40af;
}

/* About / Bio — full width below layout */
.gchs-animal-detail__bio {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
}

.gchs-animal-detail__bio-header {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.gchs-animal-detail__bio-header h2 {
	margin: 0;
}

.gchs-animal-detail__bio-tags {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.gchs-animal-detail__bio h2 {
	font-family: var(--wp--preset--font-family--heading, 'League Spartan', sans-serif);
	font-size: var(--wp--preset--font-size--x-large, 1.5rem);
	color: var(--wp--preset--color--primary-dark, #34577c);
	margin: 0 0 1rem;
}

.gchs-animal-detail__bio-content {
	font-size: var(--wp--preset--font-size--medium, 1rem);
	line-height: 1.8;
	color: var(--wp--preset--color--contrast, #000);
	max-width: 780px;
}

/* +N more thumbnails button */
.gchs-animal-detail__thumb--more {
	background: var(--wp--preset--color--primary-dark, #34577c);
	display: flex;
	align-items: center;
	justify-content: center;
}

.gchs-animal-detail__thumb--more span {
	color: #fff;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.8125rem;
	font-weight: 700;
}

/* ==========================================================================
   Animal Badges
   ========================================================================== */

/* ==========================================================================
   Starburst Seal Badges
   ========================================================================== */

/* Badge container — overlaps bottom-right of photo from outside the overflow:hidden div */
.gchs-animal-card__badges {
	display: flex;
	gap: 0.25rem;
	justify-content: flex-end;
	margin-top: -1.75rem;
	margin-right: 0.375rem;
	margin-bottom: -0.25rem;
	position: relative;
	z-index: 4;
	pointer-events: none;
}

/* Base starburst seal badge */
.gchs-animal-badge {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	text-align: center;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.4375rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	line-height: 1.15;
	color: #fff;
	background: var(--badge-color, #34577c);
	border-radius: 50%;
	padding: 0.5rem;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* Starburst edge — the jagged circle effect */
.gchs-animal-badge::before {
	content: '';
	position: absolute;
	inset: -3px;
	background: var(--badge-color, #34577c);
	border-radius: 50%;
	z-index: -1;
	clip-path: polygon(
		50% 0%, 61% 5%, 70% 2%, 76% 10%, 85% 10%, 88% 19%,
		95% 24%, 95% 34%, 100% 42%, 97% 51%, 100% 59%, 95% 66%,
		95% 76%, 88% 81%, 85% 90%, 76% 90%, 70% 98%, 61% 95%,
		50% 100%, 39% 95%, 30% 98%, 24% 90%, 15% 90%, 12% 81%,
		5% 76%, 5% 66%, 0% 59%, 3% 51%, 0% 42%, 5% 34%,
		5% 24%, 12% 19%, 15% 10%, 24% 10%, 30% 2%, 39% 5%
	);
}

.gchs-animal-detail__gallery {
	position: relative;
}

/* Large badges — overlaid on top-left of gallery on detail page */
.gchs-animal-detail__gallery-badges {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 6;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.gchs-animal-badge--lg {
	width: 72px;
	height: 72px;
	font-size: 0.5625rem;
	letter-spacing: 0.4px;
	padding: 0.75rem;
}

.gchs-animal-badge--lg::before {
	inset: -4px;
}

/* Badge color variants */
.gchs-animal-badge--staff_pick {
	--badge-color: #7c3aed;
}

.gchs-animal-badge--one_love_club {
	--badge-color: #db2777;
}

.gchs-animal-badge--just_arrived {
	--badge-color: #e07c3a;
}

.gchs-animal-badge--long_timer {
	--badge-color: #dc2626;
}

/* Animation — subtle bounce on card hover */
.gchs-animal-card:hover .gchs-animal-badge {
	animation: gchs-badge-bounce 0.4s ease;
}

@keyframes gchs-badge-bounce {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

/* ==========================================================================
   Similar Pets
   ========================================================================== */

.gchs-similar-pets {
	margin-top: var(--wp--preset--spacing--60, 70px);
	padding-top: var(--wp--preset--spacing--50, 30px);
	border-top: 1px solid var(--wp--preset--color--neutral-light, #e4e5ed);
}

.gchs-similar-pets__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.gchs-similar-pets__title {
	font-family: var(--wp--preset--font-family--heading, 'League Spartan', sans-serif);
	font-size: var(--wp--preset--font-size--x-large, 1.5rem);
	color: var(--wp--preset--color--primary-dark, #34577c);
	margin: 0;
}

.gchs-similar-pets__view-all {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-family: var(--wp--preset--font-family--subheading, 'Montserrat', sans-serif);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--accent-warm, #e07c3a);
	text-decoration: none;
	transition: gap 0.2s ease;
}

.gchs-similar-pets__view-all:hover {
	gap: 0.625rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.gchs-animal-detail__layout {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.gchs-animal-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.gchs-animal-filters {
		flex-direction: column;
	}

	.gchs-animal-detail {
		padding-top: var(--wp--preset--spacing--40, 20px);
		padding-bottom: var(--wp--preset--spacing--60, 60px);
	}

	.gchs-animal-detail__layout {
		gap: var(--wp--preset--spacing--40, 20px);
		max-width: 100%;
	}

	.gchs-animal-detail__gallery,
	.gchs-animal-detail__info {
		max-width: 100%;
		overflow: hidden;
	}

	.gchs-slideshow {
		border-radius: 8px;
		max-width: 100%;
	}

	.gchs-animal-detail__thumbs-wrap {
		max-width: calc(100vw - 2 * var(--wp--preset--spacing--50, 30px));
		overflow-x: hidden;
	}

	.gchs-animal-detail__thumbs {
		gap: 0.375rem;
		scroll-padding-inline: 0.375rem;
	}

	.gchs-animal-detail__thumb {
		width: 56px;
		height: 56px;
		scroll-snap-align: start;
	}

	.gchs-animal-detail__name {
		font-size: clamp(1.75rem, 8vw, 2.5rem);
	}

	.gchs-animal-detail__actions .gchs-btn {
		max-width: 100%;
		box-sizing: border-box;
	}

	.gchs-animal-detail__details-stack {
		grid-template-columns: 1fr;
	}

	.gchs-animal-detail__detail-card:nth-child(odd) {
		border-right: none;
	}

	.gchs-animal-detail__compat-icons {
		flex-direction: column;
	}

	.gchs-animal-detail__actions-row {
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.gchs-animal-grid {
		grid-template-columns: 1fr;
	}

	.gchs-animal-tabs__btn {
		padding: 0.75rem 1rem;
		font-size: 0.8125rem;
	}
}
