* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f6f4ef;
  color: #2b2b2b;
  margin: 0;
  padding: 0 0 60px;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1100px; }

/* Top nav */
nav.topnav {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
nav.topnav a {
  text-decoration: none;
  color: #2b2b2b;
  font-weight: 600;
  font-size: 14px;
}
nav.topnav a.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; color: #d9622b; }
nav.topnav a.brand img { height: 28px; width: auto; }
nav.topnav a:hover { color: #d9622b; }
nav.topnav a.donate-link { margin-left: auto; color: #b8860b; }
nav.topnav a.donate-link:hover { color: #8a6508; }

button:disabled, button[disabled] {
  background: #d9d9d9;
  color: #888;
  cursor: not-allowed;
}
button:disabled:hover { background: #d9d9d9; }

/* Scam banner */
.scam-banner {
  background: #fdecea;
  border-bottom: 2px solid #e57373;
  color: #7a1f1f;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.scam-banner strong { text-decoration: underline; }

h1 { margin-bottom: 4px; }
.subtitle { color: #666; margin-top: 0; }
.notice {
  background: #fff4e0;
  border: 1px solid #f0c979;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.notice code { background: #f0e0bd; padding: 1px 5px; border-radius: 4px; }

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input, textarea {
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-weight: 400;
  font-family: inherit;
}
button {
  background: #d9622b;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: #bf5322; }
button:disabled { background: #ccc; cursor: not-allowed; }
#status { margin-top: 16px; font-weight: 600; }
#status.error { color: #c0392b; }
#status.success { color: #2b7a3f; }

.vet-card, .report-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-top: 14px;
  font-size: 15px;
}
.vet-card h3, .report-card strong { font-size: 18px; }
.vet-card p, .report-card p { margin: 4px 0; font-size: 15px; color: #555; }
.report-card { border-left: 5px solid #d9622b; }

.vet-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.vet-actions button, .vet-actions a {
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 7px;
  text-decoration: none;
  display: inline-block;
  color: white;
  border: none;
  cursor: pointer;
}
.btn-whatsapp { background: #25D366; }
.btn-whatsapp:hover { background: #1ebe5b; }
.btn-email-vet { background: #2b6ca3; }
.btn-email-vet:hover { background: #1f5480; }

#findVetsBtn { background: #6b8f5c; }
#findVetsBtn:hover { background: #567749; }

hr { margin: 32px 0 16px; border: none; border-top: 1px solid #ddd; }

#reportPhoto img, .report-card img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  margin-top: 10px;
  display: block;
  cursor: zoom-in;
}
.report-card img { max-height: 200px; }
.report-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.report-photos img { max-height: 160px; max-width: 48%; }
.contact-hint { font-size: 13px; color: #777; margin-top: 8px; }
.contact-hint a { color: #d9622b; font-weight: 600; }

.lightbox {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; cursor: zoom-out; padding: 24px;
}
.lightbox.hidden { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.5); }

.email-prompt { font-weight: 600; margin: 16px 0 8px; font-size: 14px; }
.email-app-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.email-app-buttons button { flex: 1 1 calc(50% - 8px); min-width: 140px; background: #2b6ca3; font-size: 14px; padding: 10px; }
.email-app-buttons button:hover { background: #1f5480; }
#emailCopyBtn { background: #6b6b6b; }
#emailCopyBtn:hover { background: #545454; }
.share-fb-btn { background: #1877F2; margin-top: 8px; }
.share-fb-btn:hover { background: #1360c4; }

/* Map */
#mapPicker {
  height: 260px;
  border-radius: 10px;
  margin-top: 6px;
  border: 1px solid #ddd;
}
.map-hint { font-size: 12px; color: #777; margin: 4px 0 0; font-weight: 400; }
.radius-row { display: flex; align-items: center; gap: 10px; }
.radius-row input[type="range"] { flex: 1; }
.radius-value { font-weight: 700; min-width: 48px; text-align: right; }

/* Hero */
.hero { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.hero img { flex-shrink: 0; }

/* Found-a-Dog: selectable report cards now use the same .card-grid layout as the
   Lost Pets / Found Pets boards (see below) instead of a single stacked column. */

/* FAQ */
.faq-item { background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.faq-item h3 { margin: 0 0 8px; font-size: 15px; }
.faq-item p { margin: 0; font-size: 14px; color: #555; line-height: 1.5; }

/* Liability notice for phone/social contact info */
.liability-notice {
  background: #fdf2e9;
  border: 1px solid #f0b97d;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #7a4a1f;
  line-height: 1.5;
}

/* Small preview maps embedded in report cards */
.mini-map {
  height: 130px;
  border-radius: 8px;
  margin-top: 10px;
  border: 1px solid #eee;
}
.mini-map-large { height: 260px; }

/* Reveal contact info button + result */
.reveal-contact-btn {
  background: #6b4fa0;
  font-size: 13px;
  padding: 8px 12px;
  margin-top: 10px;
}
.reveal-contact-btn:hover { background: #55408a; }
.revealed-contact {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f2edf9;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.turnstile-widget-container { margin-top: 8px; }

/* Nav: right-aligned group (counter + pill buttons + donate) */
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.pill-lost { background: #fdecea; color: #b3392b; }
.pill-lost:hover { background: #fadbd7; color: #b3392b; }
.pill-reunited { background: #e5f6ea; color: #218a4a; }
.pill-reunited:hover { background: #d3f0dc; color: #218a4a; }

/* Animated green "pets reunited" counter */
.reunited-counter {
  font-size: 13px;
  font-weight: 700;
  color: #1e8449;
  background: #eafaf0;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.reunited-counter .count { display: inline-block; min-width: 1ch; }

/* Date + time side by side on the report form */
.date-time-row { display: flex; gap: 12px; }
.date-time-row label { flex: 1; }

/* Print poster flyer button */
.print-poster-btn { background: #b8860b; margin-top: 12px; }
.print-poster-btn:hover { background: #96700a; }

/* UP (bump) button on report cards */
.up-btn {
  background: #6b8f5c;
  font-size: 13px;
  padding: 6px 10px;
  margin-top: 8px;
}
.up-btn:hover { background: #567749; }

/* Simplified report form: quick-post fields + collapsible details */
.use-location-btn {
  background: #2b6ca3;
  font-size: 13px;
  padding: 8px 12px;
  margin-top: 8px;
  width: auto;
}
.use-location-btn:hover { background: #1f5480; }
.toggle-details-btn {
  background: #f0e8f8;
  color: #6b4fa0;
  font-size: 14px;
  margin-top: 4px;
}
.toggle-details-btn:hover { background: #e6d9f5; }
.more-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #faf8fc;
  border-radius: 10px;
  padding: 16px;
  margin-top: 6px;
}
.reward-badge {
  display: inline-block;
  background: #fff4d6;
  color: #8a6500;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 6px 0;
}
.fb-group-shortcut {
  display: inline-block;
  background: #1877F2;
  color: white;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 7px;
  margin: 4px 6px 4px 0;
  text-decoration: none;
}
.fb-group-shortcut:hover { background: #1360c4; }

/* Cookie consent banner */
#cookieConsentBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2b2b2b;
  color: #f0f0f0;
  padding: 14px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 2000;
}
#cookieConsentBanner a { color: #f5b041; }
#cookieConsentAcceptBtn {
  background: #d9622b;
  padding: 8px 16px;
  font-size: 13px;
  white-space: nowrap;
  width: auto;
}
#cookieConsentAcceptBtn:hover { background: #bf5322; }

/* Sidebar layout for the Missing Pets page — main grid + a compact "Recently Found" rail */
.missing-pets-layout { display: flex; gap: 28px; align-items: flex-start; margin-top: 16px; }
.missing-pets-main { flex: 1; min-width: 0; }
.found-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.found-sidebar h2 { font-size: 16px; margin: 0 0 4px; }
.found-sidebar .sidebar-subtitle { font-size: 12px; color: #888; margin: 0 0 12px; }
.sidebar-list { display: flex; flex-direction: column; gap: 10px; }
.sidebar-mini-card {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.sidebar-mini-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.08); border-color: #f0c090; }
.sidebar-mini-card img, .sidebar-mini-card .no-photo-mini {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f2ece0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.sidebar-mini-card .info { min-width: 0; }
.sidebar-mini-card .info strong { font-size: 13px; display: block; }
.sidebar-mini-card .info span {
  font-size: 12px;
  color: #888;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 800px) {
  .missing-pets-layout { flex-direction: column; }
  .found-sidebar { width: 100%; }
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.grid-card {
  display: flex;
  flex-direction: column;
  border-left: none;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.grid-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.14);
  transform: translateY(-2px);
}
.grid-card.selected { border-color: #d9622b; background: #fff8f2; }
.grid-card-photo {
  position: relative;
  height: 160px;
  background: #eee;
}
.grid-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: none;
  cursor: zoom-in;
  margin: 0;
}
.grid-card-photo .no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: #f2ece0;
}
.grid-reward-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
}
.grid-card-body { padding: 14px; }
.grid-card-body strong { font-size: 16px; }
.grid-card-meta { font-size: 12px; color: #888; margin: 4px 0 8px; }
.grid-card-desc {
  font-size: 13px;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.grid-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.grid-card-actions button, .grid-card-actions a.view-listing-link { width: auto; font-size: 12px; padding: 7px 10px; margin: 0; }
.grid-card .mini-map { height: 100px; }

/* "View full listing" — a small pill-style link used on every grid card, styled like a
   button so it's obviously clickable without competing visually with the primary actions. */
a.view-listing-link {
  display: inline-block;
  background: #f0e0bd;
  color: #6b4e10;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}
a.view-listing-link:hover { background: #e8d3a0; }

/* Decorative paw accents */
.paw-divider {
  display: flex;
  justify-content: center;
  gap: 14px;
  opacity: 0.35;
  margin: 24px 0;
}
.paw-divider img { width: 22px; height: 22px; }
.section-icon { width: 22px; height: 22px; vertical-align: middle; margin-right: 6px; }

/* Two-column Local Resources layout */
.resources-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 10px;
}
.resources-columns h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 800px) {
  .resources-columns { grid-template-columns: 1fr; }
}

/* Homepage welcome banner */
.welcome-banner {
  background: linear-gradient(135deg, #fff3e6, #ffe8d1);
  border: 1px solid #f0c090;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.welcome-banner h2 { margin: 0 0 6px; font-size: 19px; }
.welcome-banner p { margin: 0; font-size: 14px; color: #5a4a3a; }

/* "Coming soon" feature teaser card (e.g. Nearby Vets) */
.coming-soon-card {
  position: relative;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.coming-soon-card .icon { font-size: 32px; flex-shrink: 0; opacity: 0.7; }
.coming-soon-card .text { flex: 1; }
.coming-soon-card h3 { margin: 0 0 2px; font-size: 15px; color: #666; }
.coming-soon-card p { margin: 0; font-size: 13px; color: #999; }
.coming-soon-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  background: #6b4e10;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.03em;
}

/* Type badge — used on the listing page and on grid cards so a card's status/type is clear
   even out of page context (shared, screenshotted, etc.) */
.listing-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 11px;
  background: #f0e0bd;
  color: #6b4e10;
}
.listing-badge.lost { background: #fdecea; color: #b3392b; }
.listing-badge.found { background: #e5f6ea; color: #218a4a; }
.grid-card-badge-row { margin-bottom: 6px; }

/* Location filter dropdown — Missing Pets page */
.filter-bar { display: flex; gap: 10px; margin: 4px 0 4px; flex-wrap: wrap; }
.filter-dropdown { position: relative; }
.filter-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  width: auto;
  margin: 0;
  color: #333;
}
.filter-btn:hover { border-color: #d9622b; }
.filter-btn.active { border-color: #d9622b; background: #fff8f2; color: #d9622b; font-weight: 600; }
.filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 14px;
  width: 320px;
  max-height: 320px;
  overflow-y: auto;
}
.filter-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.filter-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: normal;
  padding: 5px 4px;
  border-radius: 6px;
  cursor: pointer;
  margin: 0;
}
.filter-panel label:hover { background: #faf8f5; }
.filter-panel input[type="radio"] { width: auto; margin: 0; accent-color: #d9622b; }

/* Nav "More" dropdown — replaces a flat wall of secondary links with one grouped menu */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: none;
  border: none;
  font-weight: 600;
  font-size: 14px;
  color: #2b2b2b;
  cursor: pointer;
  padding: 0;
  width: auto;
  margin: 0;
  font-family: inherit;
}
.nav-dropdown-btn:hover { color: #d9622b; }
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  padding: 8px;
  min-width: 170px;
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.nav-dropdown-panel a {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.nav-dropdown-panel a:hover { background: #faf8f5; }

/* Homepage layout — form as the main focus, sidebar for context/secondary actions.
   Uses the same left-to-right, main+sidebar pattern as the Missing Pets page. */
.homepage-layout { display: flex; gap: 28px; align-items: flex-start; margin-top: 4px; }
.homepage-main { flex: 1; min-width: 0; max-width: 640px; }
.homepage-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}
.sidebar-card h3 { margin: 0 0 10px; font-size: 15px; }
.sidebar-card p { margin: 0 0 8px; font-size: 13px; color: #777; }
.sidebar-card a {
  font-size: 14px;
  font-weight: 600;
  color: #d9622b;
  text-decoration: none;
  padding: 6px 0;
}
.sidebar-card a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .homepage-layout { flex-direction: column; }
  .homepage-main { max-width: 100%; }
  .homepage-sidebar { width: 100%; }
}

/* Post-submission success panel — redesigned to sit at the top, in one card, with distinct
   colors per section instead of every box using the same cream/tan .notice styling. */
.success-panel {
  background: #fff;
  border-radius: 14px;
  border-top: 5px solid #218a4a;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 20px;
}
.success-panel h2 { margin: 0 0 14px; color: #218a4a; font-size: 20px; }
.success-top-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.success-photo { flex: 0 0 160px; }
.success-photo img { width: 160px; height: 160px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.success-poster-cell { flex: 1; min-width: 200px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.success-poster-cell .print-poster-btn { width: auto; align-self: flex-start; }
.success-id-line { font-size: 13px; color: #777; margin: 0; }

.fb-share-box {
  background: #eaf3ff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.fb-share-header { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; color: #1450a3; }
.fb-share-header .fb-icon { width: 22px; height: 22px; }
.fb-copy-btn {
  width: auto;
  background: #1877F2;
  margin-top: 4px;
}
.fb-copy-btn:hover { background: #145dc4; }

.success-bottom-row { display: flex; gap: 14px; flex-wrap: wrap; }
.success-link-box {
  flex: 1;
  min-width: 200px;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
}
.whattodo-callout {
  flex: 1;
  min-width: 220px;
  background: linear-gradient(135deg, #ede4fb, #e3d6f7);
  border: 1px solid #d6c2f0;
  border-radius: 10px;
  padding: 18px 20px;
}
.whattodo-callout h3 { margin: 0 0 8px; font-size: 16px; color: #5b3a94; }
.whattodo-callout a { font-weight: 700; color: #6b3fa0; font-size: 15px; }
