/* OPT Adoption Finder — Warm & Welcoming palette */

.opt-af {
	--af-accent: #e8420a;   /* brand #FF4500, deepened for text contrast */
	--af-accent-bright: #ff4500;
	--af-coral: #ff6347;
	--af-brown: #a52a2a;
	--af-bg: #fbf6ea;
	--af-panel: #ffffff;
	--af-ink: #2b1d16;
	--af-muted: #8a7a6e;
	--af-line: #e8decb;
	--af-chip: #f5e9d4;
	color: var(--af-ink);
	font-size: 16px;
	line-height: 1.55;
}

.opt-af *,
.opt-af *::before,
.opt-af *::after { box-sizing: border-box; }

.opt-af a { color: var(--af-accent); }

/* ---- Search form ---- */

.opt-af-form {
	background: var(--af-panel);
	border: 1px solid var(--af-line);
	border-radius: 12px;
	padding: 18px;
	margin: 0 0 18px;
}

.opt-af-loc {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.opt-af-loc input[type="text"] {
	flex: 1 1 180px;
	min-width: 0;
	padding: 10px 14px;
	border: 1.5px solid var(--af-line);
	border-radius: 8px;
	font-size: 16px;
	background: var(--af-panel);
	color: var(--af-ink);
}

.opt-af-loc input[type="text"]:focus {
	outline: 2px solid var(--af-accent);
	outline-offset: 1px;
	border-color: var(--af-accent);
}

.opt-af-geo {
	flex: 0 0 auto;
	padding: 10px 14px;
	border: 1.5px solid var(--af-line);
	border-radius: 8px;
	background: var(--af-chip);
	color: var(--af-ink);
	font-size: 14.5px;
	cursor: pointer;
}

.opt-af-geo:hover { border-color: var(--af-accent); }

.opt-af-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.opt-af-filters label {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 12.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--af-muted);
	flex: 1 1 120px;
	min-width: 110px;
}

.opt-af-filters select,
.opt-af-filters input[type="text"] {
	padding: 8px 10px;
	border: 1.5px solid var(--af-line);
	border-radius: 8px;
	font-size: 15px;
	background: var(--af-panel);
	color: var(--af-ink);
	font-weight: 400;
	text-transform: none;
	letter-spacing: normal;
}

.opt-af-submit {
	display: inline-block;
	padding: 11px 26px;
	border: 0;
	border-radius: 8px;
	background: var(--af-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.opt-af-submit:hover { background: var(--af-brown); }
.opt-af-submit:disabled { opacity: 0.6; cursor: wait; }

/* ---- Status / notices ---- */

.opt-af-status { min-height: 1.5em; margin: 0 0 10px; font-size: 15px; color: var(--af-muted); }

.opt-af-notice {
	background: var(--af-chip);
	border-left: 4px solid var(--af-accent);
	border-radius: 0 8px 8px 0;
	padding: 10px 14px;
	margin: 0 0 14px;
	font-size: 14.5px;
}

.opt-af-coverage-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: 12px;
}

.opt-af-browse-us {
	padding: 9px 18px;
	border: 0;
	border-radius: 8px;
	background: var(--af-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.opt-af-browse-us:hover { background: var(--af-brown); }

.opt-af-ng-interest {
	font-size: 14px;
	font-weight: 700;
}

.opt-af-error {
	background: var(--af-chip);
	border-left: 4px solid var(--af-brown);
	border-radius: 0 8px 8px 0;
	padding: 12px 16px;
	margin: 0 0 14px;
	font-size: 15px;
}

.opt-af-empty {
	grid-column: 1 / -1;
	background: var(--af-panel);
	border: 1px dashed var(--af-line);
	border-radius: 12px;
	padding: 28px 22px;
	text-align: center;
	color: var(--af-muted);
}

.opt-af-empty button {
	margin-top: 10px;
	padding: 8px 18px;
	border: 1.5px solid var(--af-accent);
	border-radius: 8px;
	background: transparent;
	color: var(--af-accent);
	font-weight: 700;
	cursor: pointer;
}

/* ---- Results grid ---- */

.opt-af-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 14px;
	margin: 0 0 14px;
}

.opt-af.is-loading .opt-af-results { opacity: 0.45; pointer-events: none; }

.opt-af-card {
	background: var(--af-panel);
	border: 1px solid var(--af-line);
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	text-align: left;
	padding: 0;
	display: flex;
	flex-direction: column;
	font: inherit;
	color: inherit;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.opt-af-card:hover,
.opt-af-card:focus-visible {
	box-shadow: 0 4px 16px rgba(43, 29, 22, 0.14);
	transform: translateY(-2px);
	outline: none;
	border-color: var(--af-coral);
}

.opt-af-card-photo {
	aspect-ratio: 4 / 3;
	width: 100%;
	object-fit: cover;
	display: block;
	background: var(--af-chip);
}

.opt-af-card-photo.is-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 42px;
	color: var(--af-muted);
}

.opt-af-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }

.opt-af-card-name { font-size: 17px; font-weight: 700; color: var(--af-accent); margin: 0; }

.opt-af-card-breed {
	font-size: 13.5px;
	color: var(--af-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.opt-af-card-meta { font-size: 12.5px; color: var(--af-muted); }

.opt-af-card-org {
	font-size: 12px;
	color: var(--af-muted);
	margin-top: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.opt-af-dist {
	display: inline-block;
	background: var(--af-chip);
	color: var(--af-brown);
	border-radius: 99px;
	padding: 1px 9px;
	font-size: 11.5px;
	font-weight: 700;
}

/* ---- Pager ---- */

.opt-af-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 4px 0 16px;
	font-size: 14.5px;
}

.opt-af-pager button {
	padding: 7px 16px;
	border: 1.5px solid var(--af-line);
	border-radius: 8px;
	background: var(--af-panel);
	color: var(--af-ink);
	font-weight: 600;
	cursor: pointer;
}

.opt-af-pager button:hover:not(:disabled) { border-color: var(--af-accent); color: var(--af-accent); }
.opt-af-pager button:disabled { opacity: 0.4; cursor: default; }

/* ---- Map ---- */

.opt-af-map {
	height: 380px;
	border: 1px solid var(--af-line);
	border-radius: 12px;
	margin: 0 0 10px;
	z-index: 0;
}

.opt-af-map:empty { display: none; }

/* ---- Attribution ---- */

.opt-af-attribution {
	font-size: 12.5px;
	color: var(--af-muted);
	text-align: center;
	margin: 6px 0 0;
}

/* ---- Detail views (animal / shelter) ---- */

.opt-af-back {
	display: inline-block;
	margin: 0 0 14px;
	padding: 7px 14px;
	border: 1.5px solid var(--af-line);
	border-radius: 8px;
	background: var(--af-panel);
	color: var(--af-ink);
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
}

.opt-af-back:hover { border-color: var(--af-accent); color: var(--af-accent); }

.opt-af-profile {
	background: var(--af-panel);
	border: 1px solid var(--af-line);
	border-radius: 12px;
	overflow: hidden;
}

.opt-af-gallery { display: flex; gap: 6px; overflow-x: auto; background: var(--af-chip); }

.opt-af-gallery img {
	height: 320px;
	max-width: 100%;
	object-fit: cover;
	flex: 0 0 auto;
	border-radius: 0;
}

.opt-af-gallery.is-placeholder {
	height: 200px;
	align-items: center;
	justify-content: center;
	font-size: 64px;
	color: var(--af-muted);
}

.opt-af-profile-body { padding: 20px 22px 24px; }

.opt-af-profile-body h2 { margin: 0 0 4px; font-size: 28px; color: var(--af-accent); }

.opt-af-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 14px; }

.opt-af-chip {
	background: var(--af-chip);
	color: var(--af-brown);
	border-radius: 99px;
	padding: 3px 12px;
	font-size: 12.5px;
	font-weight: 700;
}

.opt-af-desc { white-space: pre-line; margin: 0 0 18px; max-width: 68ch; }

.opt-af-cta {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 8px;
	background: var(--af-accent);
	color: #fff !important;
	font-size: 16.5px;
	font-weight: 700;
	text-decoration: none;
}

.opt-af-cta:hover { background: var(--af-brown); color: #fff; }

.opt-af-cta-note { font-size: 13px; color: var(--af-muted); margin: 8px 0 0; }

.opt-af-orgcard {
	margin: 18px 0 0;
	padding: 14px 16px;
	border: 1px solid var(--af-line);
	border-radius: 10px;
	background: var(--af-bg);
	font-size: 14.5px;
}

.opt-af-orgcard b { display: block; font-size: 15.5px; }

.opt-af-orgcard a { font-weight: 600; }

.opt-af-shelter-head { padding: 20px 22px; }
.opt-af-shelter-head h2 { margin: 0 0 4px; font-size: 26px; color: var(--af-accent); }
.opt-af-shelter-head p { margin: 2px 0; color: var(--af-muted); font-size: 14.5px; }

.opt-af-section-title {
	font-size: 19px;
	font-weight: 700;
	margin: 22px 0 10px;
}

/* ---- Skeleton loading ---- */

@keyframes opt-af-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 0.9; } }

.opt-af-skel {
	background: var(--af-panel);
	border: 1px solid var(--af-line);
	border-radius: 12px;
	overflow: hidden;
	animation: opt-af-pulse 1.2s ease-in-out infinite;
}

.opt-af-skel .ph { aspect-ratio: 4 / 3; background: var(--af-chip); }
.opt-af-skel .ln { height: 12px; background: var(--af-chip); border-radius: 6px; margin: 10px 12px; }
.opt-af-skel .ln.short { width: 55%; }

/* ---- Mobile ---- */

@media (max-width: 560px) {
	.opt-af-results { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
	.opt-af-map { height: 280px; }
	.opt-af-gallery img { height: 230px; }
	.opt-af-filters label { flex-basis: calc(50% - 5px); }
	.opt-af-submit { width: 100%; }
}
