/* WP Shelter — public-facing styles. Plain CSS, no preprocessor. */

/* Visually-hidden text for screen readers. Mirrors WP core's helper so
   plugin markup stays accessible even under themes that don't ship it. */
.shelter-pagination .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	position: absolute;
	word-wrap: normal !important;
}

.shelter-archive,
.shelter-single,
.shelter-shortcode {
	--shelter-card-gap: 1.25rem;
	--shelter-radius: 6px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1rem;
	color: #1f2933;
	font-size: 16px;
	line-height: 1.5;
}

/* Archive layout: sidebar + main column. */
.shelter-archive__layout {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 2rem;
}
@media (max-width: 720px) {
	.shelter-archive__layout {
		grid-template-columns: 1fr;
	}
}
.shelter-archive__title {
	font-size: 1.75rem;
	margin: 0 0 0.25rem;
}
.shelter-archive__description {
	color: #4a5568;
	margin: 0 0 1rem;
}
.shelter-archive__empty {
	padding: 2rem;
	text-align: center;
	color: #6b7280;
}

/* Friendly empty-state callout (no animals / no filter matches). */
.shelter-empty {
	margin: 1rem 0;
	padding: 2rem 1.5rem;
	text-align: center;
	border-radius: calc(var(--shelter-radius) * 2);
	border: 1px solid transparent;
}
.shelter-empty--none {
	background: #fdf6e3; /* warm pastel */
	border-color: #f5e6bd;
	color: #7a5c12;
}
.shelter-empty--filtered {
	background: #eef4fb; /* cool pastel blue */
	border-color: #cfe0f3;
	color: #33506f;
}
.shelter-empty__icon {
	font-size: 2.5rem;
	line-height: 1;
	margin: 0 0 0.5rem;
}
.shelter-empty__title {
	font-size: 1.25rem;
	margin: 0 0 0.5rem;
	color: inherit;
}
.shelter-empty__message {
	max-width: 40rem;
	margin: 0 auto 1.25rem;
	color: inherit;
}
.shelter-empty__actions {
	margin: 0;
}
.shelter-empty__button {
	display: inline-block;
	padding: 0.55rem 1.25rem;
	border-radius: var(--shelter-radius);
	background: #1f2937;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}
.shelter-empty__button:hover,
.shelter-empty__button:focus {
	background: #111827;
	color: #fff;
}
.shelter-empty__button:focus {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}

/* Grid of cards. */
.shelter-grid {
	display: grid;
	gap: var(--shelter-card-gap);
}
.shelter-grid--cols-1 { grid-template-columns: 1fr; }
.shelter-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shelter-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shelter-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
	.shelter-grid--cols-3,
	.shelter-grid--cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 600px) {
	.shelter-grid--cols-2,
	.shelter-grid--cols-3,
	.shelter-grid--cols-4 {
		grid-template-columns: 1fr;
	}
}

/* Card. */
.shelter-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: var(--shelter-radius);
	/* No `overflow: hidden` here — it clips the keyboard focus ring of the
	   inner block link. The media child clips its own image instead. */
	transition: box-shadow 0.15s ease;
}
.shelter-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.shelter-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
	border-radius: var(--shelter-radius);
}
.shelter-card__link:hover {
	color: inherit;
}
.shelter-card__link:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}
.shelter-card__media {
	background: #f1f5f9;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-top-left-radius: var(--shelter-radius);
	border-top-right-radius: var(--shelter-radius);
}
.shelter-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.shelter-card__media--empty {
	color: #5b6675;
	font-style: italic;
}
.shelter-card__body {
	padding: 0.9rem 1rem 1.1rem;
}
.shelter-card__title {
	font-size: 1.1rem;
	margin: 0 0 0.4rem;
}
.shelter-card__facts {
	margin: 0.3rem 0 0;
	color: #4b5563;
	font-size: 0.9rem;
}

/* Status badge. */
.shelter-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: #e2e8f0;
	color: #1f2937;
}
.shelter-status--available { background: #d1fae5; color: #065f46; }
.shelter-status--foster    { background: #dbeafe; color: #1e40af; }
.shelter-status--reserved  { background: #fef3c7; color: #92400e; }
.shelter-status--adopted   { background: #ede9fe; color: #5b21b6; }
.shelter-status--unavailable { background: #fee2e2; color: #991b1b; }
.shelter-status--deceased  { background: #e5e7eb; color: #374151; }

/* Filter bar. */
.shelter-filters {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: var(--shelter-radius);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}
.shelter-filters__group {
	border: 0;
	padding: 0;
	margin: 0;
}
.shelter-filters__group legend {
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.4rem;
}
.shelter-filters__radio {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.9rem;
	margin: 0.15rem 0;
	cursor: pointer;
}
.shelter-filters__submit,
.shelter-filters__reset {
	display: inline-block;
	font-size: 0.9rem;
	text-align: center;
}
.shelter-filters__reset {
	margin-left: 0.5rem;
}

/* Pagination.
   `paginate_links( type => list )` wraps the links in
   `<ul class="page-numbers"><li><a class="page-numbers">…`, so the <ul> itself
   also carries the `page-numbers` class. We reset the list and lay the items
   out as a horizontal row of button-like controls, taking care NOT to give the
   wrapping <ul> the button styling. */
.shelter-pagination {
	margin: 1.5rem 0 0;
}
.shelter-pagination ul.page-numbers {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	justify-content: center;
}
.shelter-pagination ul.page-numbers li {
	margin: 0;
	padding: 0;
	list-style: none;
}
/* The individual links / current marker / dots. `:not(ul)` keeps the button
   styling off the wrapping list even though it shares the class. */
.shelter-pagination .page-numbers:not(ul) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	color: #1f2937;
	background: #fff;
	text-decoration: none;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.shelter-pagination a.page-numbers:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
}
.shelter-pagination .page-numbers.current {
	background: #1f2937;
	color: #fff;
	border-color: #1f2937;
	font-weight: 600;
}
/* The "…" gap marker is not interactive: no border/background. */
.shelter-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	min-width: 1.5rem;
	padding: 0;
}
.shelter-pagination a.page-numbers:focus-visible,
.shelter-filters__submit:focus-visible,
.shelter-filters__reset:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.shelter-pagination .page-numbers:not(ul) {
		transition: none;
	}
}

/* Single page. */
.shelter-single__header {
	margin-bottom: 1.25rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.shelter-shortcode--animal .shelter-single {
	border: 1px solid #e2e8f0;
	border-radius: var(--shelter-radius);
	padding: 1.25rem;
	background: #fff;
}
.shelter-shortcode--animal .shelter-single__title {
	font-size: 1.5rem;
}
.shelter-shortcode--animal .shelter-single__title a {
	color: inherit;
	text-decoration: none;
}
.shelter-shortcode--animal .shelter-single__title a:hover {
	text-decoration: underline;
}
.shelter-single__title {
	font-size: 2rem;
	margin: 0;
}
.shelter-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2rem;
}
@media (max-width: 720px) {
	.shelter-single__layout {
		grid-template-columns: 1fr;
	}
}
.shelter-single__media img {
	max-width: 100%;
	height: auto;
	border-radius: var(--shelter-radius);
}
.shelter-single__no-photo {
	background: #f1f5f9;
	padding: 3rem;
	text-align: center;
	color: #5b6675;
	border-radius: var(--shelter-radius);
}
/* Interactive gallery: main viewer + horizontal thumbnail strip. */
.shelter-gallery__viewer img {
	width: 100%;
	height: auto;
	border-radius: var(--shelter-radius);
}
.shelter-gallery__strip-wrap {
	position: relative;
	display: flex;
	align-items: center;
	margin-top: 0.8rem;
}
.shelter-gallery__strip {
	display: flex;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.shelter-gallery__thumb {
	flex: 0 0 auto;
}
.shelter-gallery__thumb-link {
	display: block;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	line-height: 0;
}
.shelter-gallery__thumb.is-active .shelter-gallery__thumb-link {
	border-color: #1d4ed8;
}
.shelter-gallery__thumb-link img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	display: block;
}
.shelter-gallery__nav {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	margin: 0 0.25rem;
	padding: 0;
	border: 1px solid #cbd5e1;
	border-radius: 50%;
	background: #fff;
	color: #1d2327;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.shelter-gallery__nav:hover {
	background: #f1f5f9;
}
.shelter-gallery__nav:disabled {
	opacity: 0.35;
	cursor: default;
}
.shelter-gallery__nav[hidden] {
	display: none;
}
.shelter-single__facts {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.25rem;
}
.shelter-single__facts th,
.shelter-single__facts td {
	text-align: left;
	padding: 0.4rem 0.6rem;
	border-bottom: 1px solid #e2e8f0;
	vertical-align: top;
}
.shelter-single__facts th {
	width: 35%;
	font-weight: 600;
	color: #4a5568;
}
.shelter-single__description {
	margin: 0 0 1.5rem;
}

/* Contact form. Shares the visual language of the supporter form: a white
   card with a soft border + shadow, 8/12px radii, focus rings and coloured
   labels. Keep these values in sync with `.shelter-supporter-form` below. */
.shelter-contact-form {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.75rem;
	margin: 1.5rem 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
}
.shelter-contact-form__title {
	margin: 0 0 0.35rem;
	font-size: 1.4rem;
}
.shelter-contact-form label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.3rem;
	color: #374151;
}
.shelter-contact-form input[type="text"],
.shelter-contact-form input[type="email"],
.shelter-contact-form input[type="tel"],
.shelter-contact-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55rem 0.7rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 1rem;
	line-height: 1.4;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.shelter-contact-form input[type="text"]:focus,
.shelter-contact-form input[type="email"]:focus,
.shelter-contact-form input[type="tel"]:focus,
.shelter-contact-form textarea:focus {
	outline: none;
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}
.shelter-contact-form__submit {
	width: 100%;
	padding: 0.7rem 1rem;
	font-size: 1.05rem;
	border-radius: 8px;
	cursor: pointer;
}
.shelter-contact-form__honeypot {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.shelter-contact-form__notice {
	padding: 0.85rem 1rem;
	border-radius: 8px;
	margin: 1.5rem 0;
	font-size: 0.95rem;
}
.shelter-contact-form__notice--success {
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	color: #065f46;
}
.shelter-contact-form__notice--error {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}
.shelter-contact-form__field-error {
	display: block;
	margin-top: 0.25rem;
	color: #b91c1c;
	font-size: 0.85em;
}
.shelter-contact-form__required-note {
	font-size: 0.85rem;
	color: #6b7280;
	margin: 0 0 1.25rem;
}
.shelter-contact-form__error-summary ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}
.shelter-contact-form__error-summary-title {
	margin: 0;
	font-weight: 600;
}
.shelter-contact-form [aria-invalid="true"] {
	border-color: #b91c1c;
}
.shelter-contact-form [aria-invalid="true"]:focus {
	box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}
.shelter-filters__radio input:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 1px;
}

/* Skip link: visually hidden until it receives keyboard focus. */
.shelter-skip-link {
	margin: 0;
}
.shelter-skip-link a {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.shelter-skip-link a:focus {
	position: static;
	width: auto;
	height: auto;
	display: inline-block;
	padding: 0.5rem 0.75rem;
	margin-bottom: 0.75rem;
	background: #1f2937;
	color: #fff;
	border-radius: 4px;
}
/* The results region takes focus from the skip link; hide its focus ring
   (it is a scroll target, not an interactive control). */
.shelter-archive__main:focus {
	outline: none;
}

/* Respect users who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.shelter-card {
		transition: none;
	}
	html {
		scroll-behavior: auto;
	}
}

/* ---------------------------------------------------------------------------
   Supporter / membership form.

   The built-in page (`shelter-supporter-page`) centres a single card in the
   viewport; the same form embedded via the shortcode inherits the field
   styling but not the page chrome (no `__inner` wrapper around it there).
   --------------------------------------------------------------------------- */
.shelter-supporter-page {
	display: flex;
	justify-content: center;
	padding: 2.5rem 1rem;
}
.shelter-supporter-page__inner {
	width: 100%;
	max-width: 680px;
}
.shelter-supporter-page__header {
	text-align: center;
	margin-bottom: 1.75rem;
}
.shelter-supporter-page__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.6rem, 4vw, 2.25rem);
	line-height: 1.2;
}
.shelter-supporter-page__intro {
	color: #4b5563;
	font-size: 1.05rem;
	line-height: 1.6;
}
.shelter-supporter-page__intro p:last-child {
	margin-bottom: 0;
}

/* The form itself: a card with soft border + shadow. */
.shelter-supporter-form-wrap {
	max-width: 680px;
	margin: 0 auto;
}
.shelter-supporter-page .shelter-supporter-form-wrap {
	max-width: none;
}
.shelter-supporter-form {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.75rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
}
.shelter-supporter-form__title {
	margin: 0 0 0.35rem;
	font-size: 1.4rem;
}
.shelter-supporter-form__required-note {
	margin: 0 0 1.25rem;
	font-size: 0.85rem;
	color: #6b7280;
}
.shelter-supporter-form__group {
	border: 0;
	border-top: 1px solid #eef0f2;
	border-radius: 0;
	padding: 1.25rem 0 0.25rem;
	margin: 0 0 0.75rem;
	min-width: 0;
}
.shelter-supporter-form__group:first-of-type {
	border-top: 0;
	padding-top: 0;
}
.shelter-supporter-form__group legend {
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
	padding: 0;
	margin-bottom: 0.5rem;
}
.shelter-supporter-form__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}
.shelter-supporter-form__row > p {
	flex: 1 1 200px;
	margin: 0.5rem 0;
	min-width: 0;
}
.shelter-supporter-form__row > p.shelter-supporter-form__field--wide {
	flex-basis: 100%;
}
.shelter-supporter-form label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.3rem;
	color: #374151;
}
.shelter-supporter-form__optional {
	font-weight: 400;
	color: #9ca3af;
	font-size: 0.85em;
}
.shelter-supporter-form input[type="text"],
.shelter-supporter-form input[type="email"],
.shelter-supporter-form input[type="tel"],
.shelter-supporter-form input[type="date"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55rem 0.7rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 1rem;
	line-height: 1.4;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.shelter-supporter-form input[type="text"]:focus,
.shelter-supporter-form input[type="email"]:focus,
.shelter-supporter-form input[type="tel"]:focus,
.shelter-supporter-form input[type="date"]:focus {
	outline: none;
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}
.shelter-supporter-form__field {
	margin: 0.5rem 0;
}
.shelter-supporter-form__label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.4rem;
	color: #374151;
}
.shelter-supporter-form__radio,
.shelter-supporter-form__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400;
	margin: 0.35rem 0;
	color: #374151;
	cursor: pointer;
}
.shelter-supporter-form__radio input,
.shelter-supporter-form__checkbox input {
	margin: 0.15rem 0 0;
	flex-shrink: 0;
}
.shelter-supporter-form__bank {
	margin-top: 0.85rem;
	padding: 0.85rem 1rem;
	background: #f9fafb;
	border: 1px solid #eef0f2;
	border-radius: 8px;
}
.shelter-supporter-form__bank--hidden {
	display: none;
}
.shelter-supporter-form__terms {
	margin: 1.25rem 0;
	padding: 0.85rem 1rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}
.shelter-supporter-form__terms-text {
	margin-top: 0;
	font-size: 0.9em;
	color: #374151;
}
.shelter-supporter-form__submit {
	width: 100%;
	padding: 0.7rem 1rem;
	font-size: 1.05rem;
	border-radius: 8px;
	cursor: pointer;
}
.shelter-supporter-form__notice {
	padding: 0.85rem 1rem;
	border-radius: 8px;
	margin-bottom: 1.25rem;
}
.shelter-supporter-form__notice--success {
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	color: #065f46;
}
.shelter-supporter-form__notice--error {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}
.shelter-supporter-form__error-summary ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}
.shelter-supporter-form__field-error {
	display: block;
	color: #b91c1c;
	font-size: 0.85em;
	margin-top: 0.25rem;
}
.shelter-supporter-form [aria-invalid="true"] {
	border-color: #b91c1c;
}
.shelter-supporter-form [aria-invalid="true"]:focus {
	box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

/* ---------------------------------------------------------------------------
   "Become a member" banner (animal archive + single).
   --------------------------------------------------------------------------- */
.shelter-supporter-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin: 0 0 1.5rem;
	padding: 0.85rem 1.15rem;
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	border-radius: 8px;
}
.shelter-supporter-banner__text {
	font-weight: 600;
	color: #065f46;
}
.shelter-supporter-banner__cta {
	flex-shrink: 0;
}
