/* =========================================================
   TOE BEANS DESIGN SYSTEM
   LOST PETS

   Canonical page-specific presentation for lost-pets.html.

   Shared:
   - navbar
   - footer
   - buttons
   - icons
   - forms
   - account menu
   - modal primitives

   remain owned by their shared design-system files.
   ========================================================= */


/* =========================================================
   PAGE
   ========================================================= */

body.ds-lost-pets-page {
  min-height: 100vh;
  margin: 0;
  background: var(--ds-background);
  color: var(--ds-text);
}

body.ds-sighting-modal-open {
  overflow: hidden;
}

.ds-lost-pets-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 72px;
}


/* =========================================================
   HERO
   ========================================================= */

.ds-lost-pets-hero {
  display: grid;
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(300px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}

.ds-lost-pets-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.ds-lost-pets-kicker {
  margin: 0 0 8px;
  color: var(--ds-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ds-lost-pets-hero-copy h1 {
  margin: 0 0 14px;
  color: var(--ds-heading);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
}

.ds-lost-pets-hero-text {
  max-width: 720px;
  margin: 0;
  color: var(--ds-muted);
  font-size: 17px;
  line-height: 1.65;
}


/* =========================================================
   HELP CARD
   ========================================================= */

.ds-lost-pets-help-card {
  display: flex;
  gap: 18px;
  height: 100%;
  padding: 26px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface-alt);
  box-shadow: var(--ds-shadow-sm);
}

.ds-lost-pets-help-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-primary);
}

.ds-lost-pets-help-content {
  min-width: 0;
}

.ds-lost-pets-help-title {
  display: block;
  margin-bottom: 8px;
  color: var(--ds-heading);
  font-size: 17px;
}

.ds-lost-pets-help-text {
  margin: 0 0 12px;
  color: var(--ds-muted);
  line-height: 1.6;
}

.ds-lost-pets-help-callout {
  color: var(--ds-heading);
  font-weight: 800;
}

.ds-lost-pets-help-link {
  color: var(--ds-primary);
  font-weight: 800;
  text-decoration: none;
}

.ds-lost-pets-help-link:hover {
  text-decoration: underline;
}


/* =========================================================
   TABS
   ========================================================= */

.ds-lost-pets-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.ds-lost-pets-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: var(--ds-surface);
  color: var(--ds-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ds-lost-pets-tab .ds-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.ds-lost-pets-tab[aria-selected="true"] {
  border-color: var(--ds-primary);
  background: var(--ds-primary);
  color: #fff;
}


/* =========================================================
   FILTER CARD
   ========================================================= */

.ds-lost-pet-filter-card {
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.ds-lost-pet-filter-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.ds-lost-pet-filter-heading h2 {
  margin: 0;
  color: var(--ds-heading);
}

.ds-lost-pets-count {
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 800;
}

.ds-lost-pet-filter-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 2fr)
    minmax(220px, 1fr)
    auto;
  gap: 16px;
  align-items: end;
}

.ds-lost-pet-filter-grid label {
  display: block;
  margin-bottom: 7px;
  color: var(--ds-heading);
  font-size: 13px;
  font-weight: 800;
}

.ds-lost-pet-filter-grid input,
.ds-lost-pet-filter-grid select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-text);
  font: inherit;
}

.ds-lost-pet-filter-grid input:focus,
.ds-lost-pet-filter-grid select:focus {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.ds-lost-pets-filter-button-wrap {
  display: flex;
}


/* =========================================================
   PAGE STATES
   ========================================================= */

.ds-lost-pets-page-message {
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
}

.ds-lost-pets-feed {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.ds-lost-pets-loading,
.ds-lost-pets-empty-state,
.ds-lost-pets-error-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 24px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
  text-align: center;
}

.ds-lost-pets-loading-icon,
.ds-lost-pets-empty-icon,
.ds-lost-pets-error-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--ds-primary);
}

.ds-lost-pets-error-icon {
  color: var(--ds-danger);
}


/* =========================================================
   LOST PET CARD
   ========================================================= */

.ds-lost-pet-card {
  display: grid;
  grid-template-columns: minmax(320px, 38%) minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.ds-lost-pet-card-clickable {
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ds-lost-pet-card-clickable:hover,
.ds-lost-pet-card-clickable:focus-visible {
  border-color: var(--ds-primary);
  box-shadow: var(--ds-shadow-lg, var(--ds-shadow-sm));
}

.ds-lost-pet-card-clickable:focus-visible {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.ds-lost-pet-media {
  position: relative;
  min-width: 0;
  align-self: stretch;
  margin: 14px 0 14px 14px;
  padding: 10px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.ds-lost-pet-photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ds-lost-pet-photo-tile {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;$1}

.ds-lost-pet-photo-tile > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ds-lost-pet-photo-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 18px;
  color: var(--ds-muted);
  text-align: center;
}

.ds-lost-pet-photo-placeholder .ds-icon {
  width: 34px;
  height: 34px;
}

.ds-lost-pet-photo-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ds-heading);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ds-lost-pet-missing-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--ds-danger-solid);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.ds-lost-pet-missing-badge.inline-badge {
  position: static;
  box-shadow: none;
}

.ds-lost-pet-missing-badge .ds-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.ds-lost-pet-sighting-badge {
  background: var(--ds-primary);
}

.ds-lost-pet-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 14px;
  margin: 14px;
  padding: 18px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.ds-lost-pet-heading {
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ds-border);
}

.ds-lost-pet-heading .ds-lost-pets-kicker {
  margin-bottom: 5px;
}

.ds-lost-pet-heading h2 {
  margin: 0;
  color: var(--ds-heading);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.08;
}

.ds-lost-pet-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
}

.ds-lost-pet-fact {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  margin: 0;
  color: var(--ds-muted);
  line-height: 1.4;
}

.ds-lost-pet-fact dt {
  color: var(--ds-heading);
  font-weight: 700;
}

.ds-lost-pet-fact dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ds-lost-pet-approach-warning,
.ds-lost-pet-reward-box {
  padding: 12px 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
}

.ds-lost-pet-map-section {
  padding: 12px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
}

.ds-lost-pet-map-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.ds-lost-pet-map-heading strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ds-heading);
}

.ds-lost-pet-map-heading p {
  margin: 0;
  color: var(--ds-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ds-lost-pet-map-location {
  color: var(--ds-heading);
  font-weight: 700;
}

.ds-lost-pet-map-time {
  color: var(--ds-text);
  font-weight: 700;
}

.ds-lost-pet-map-privacy {
  margin-top: 2px;
}

.ds-lost-pet-map {
  width: 100%;
  height: 175px;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: #f3f5f1;
}

.ds-lost-pet-map-unavailable {
  padding: 12px 14px;
  border: 1px dashed var(--ds-border);
  border-radius: var(--ds-radius-md);
  color: var(--ds-muted);
  background: var(--ds-surface);
}

.ds-lost-pet-map-unavailable strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ds-heading);
}

.ds-lost-pet-map-unavailable p {
  margin: 5px 0 0;
}

.leaflet-interactive.ds-lost-pet-map-area {
  stroke: var(--ds-danger);
  stroke-width: 2px;
  fill: var(--ds-danger);
  fill-opacity: 0.12;
}

.leaflet-interactive.ds-lost-pet-map-point {
  stroke: var(--ds-danger);
  fill: var(--ds-danger);
  fill-opacity: 1;
}

.ds-lost-pet-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ds-lost-pet-detail {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-text);
  line-height: 1.5;
  box-shadow: var(--ds-shadow-sm);
}

.ds-lost-pet-detail strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ds-heading);
  font-size: 12px;
  font-weight: 800;
}

.ds-lost-pet-detail p {
  margin: 0;
}

.ds-lost-pet-approach-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-color: var(--ds-danger);
  border-left: 4px solid var(--ds-danger);
  background: var(--ds-danger-soft);
}

.ds-lost-pet-approach-warning p {
  margin: 3px 0 0;
}

.ds-lost-pet-reward-box {
  display: flex;
  gap: 8px;
  align-items: baseline;
  border-left: 4px solid var(--ds-warning, var(--ds-primary));
}

.ds-lost-pet-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.ds-lost-pet-saw-button {
  min-width: 180px;
}







.ds-lost-pet-detail strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ds-heading);
  font-size: 13px;
  font-weight: 800;
}

.ds-lost-pet-detail p {
  margin: 0;
}

.ds-lost-pet-approach-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-color: var(--ds-danger);
  border-left: 4px solid var(--ds-danger);
  background: var(--ds-danger-soft);
}

.ds-lost-pet-approach-warning p {
  margin: 4px 0 0;
}

.ds-lost-pet-reward-box {
  display: flex;
  gap: 8px;
  align-items: baseline;
  border-left: 4px solid var(--ds-warning, var(--ds-primary));
}

.ds-lost-pet-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ds-lost-pet-thumbnails img {
  display: block;
  width: 58px;
  height: 58px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  object-fit: cover;
  background: var(--ds-surface);
}

.ds-lost-pet-actions {
  display: grid;
  margin-top: auto;
  padding-top: 2px;
}

.ds-lost-pet-saw-button {
  width: 100%;
  min-width: 0;
}



/* =========================================================
   SIGHTING MODAL
   ========================================================= */

.ds-sighting-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ds-sighting-modal.hidden {
  display: none;
}

.ds-sighting-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.56);
}

.ds-sighting-card {
  position: relative;
  z-index: 1;
  width: min(800px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-lg, var(--ds-shadow-sm));
}

.ds-sighting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--ds-border);
}

.ds-sighting-header h2 {
  margin: 0 0 6px;
  color: var(--ds-heading);
}

.ds-lost-pets-small {
  margin: 0;
  color: var(--ds-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ds-sighting-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: var(--ds-surface);
  color: var(--ds-text);
  cursor: pointer;
}

.ds-sighting-close:hover {
  background: var(--ds-surface-alt);
}

.ds-sighting-matched-pet-section,
.ds-sighting-form-section {
  padding: 22px 24px;
  border-bottom: 1px solid var(--ds-border);
}

.ds-sighting-detail-body {
  display: grid;
  gap: 16px;
  padding: 22px 24px;
}

.ds-sighting-detail-photo {
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  aspect-ratio: 16 / 9;
}

.ds-sighting-detail-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ds-sighting-detail-map {
  height: 240px;
}

.ds-sighting-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.ds-sighting-section-heading > span:first-child {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
  color: var(--ds-primary);
}

.ds-sighting-section-heading h3 {
  margin: 0 0 4px;
  color: var(--ds-heading);
}

.ds-sighting-two-column,
.ds-sighting-location-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ds-sighting-form-section label {
  display: block;
  margin-bottom: 7px;
  color: var(--ds-heading);
  font-size: 13px;
  font-weight: 800;
}

.ds-sighting-form-section input,
.ds-sighting-form-section select,
.ds-sighting-form-section textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-text);
  font: inherit;
}

.ds-sighting-form-section textarea {
  min-height: 120px;
  resize: vertical;
}

.ds-sighting-form-section input:focus,
.ds-sighting-form-section select:focus,
.ds-sighting-form-section textarea:focus {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}


/* =========================================================
   LOCATION METHOD
   ========================================================= */

.ds-sighting-location-options {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ds-sighting-location-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  cursor: pointer;
}

.ds-sighting-location-option.selected {
  border-color: var(--ds-primary);
  background: var(--ds-surface-alt);
}

.ds-sighting-location-option input {
  width: auto;
  flex: 0 0 auto;
}

.ds-sighting-location-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--ds-primary);
}

.ds-sighting-location-option small {
  display: block;
  margin-top: 2px;
  color: var(--ds-muted);
}

.ds-sighting-gps-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
}


/* =========================================================
   MATCHED PET SUMMARY
   ========================================================= */

.ds-sighting-pet-summary {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ds-sighting-summary-photo,
.ds-sighting-summary-photo-placeholder {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
}

.ds-sighting-summary-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ds-sighting-summary-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--ds-muted);
}

.ds-sighting-summary-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  color: var(--ds-danger);
  font-size: 13px;
  font-weight: 800;
}


/* =========================================================
   PHOTO PREVIEW
   ========================================================= */

.ds-sighting-photo-preview {
  margin-top: 12px;
}

.ds-sighting-photo-preview img {
  display: block;
  max-width: 240px;
  max-height: 240px;
  border-radius: var(--ds-radius-md);
  object-fit: cover;
}


/* =========================================================
   FORM MESSAGE
   ========================================================= */

.ds-sighting-form-message {
  margin: 20px 24px 0;
  padding: 12px 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
}

.ds-sighting-form-message.success {
  border-color: var(--ds-primary);
}

.ds-sighting-form-message.error {
  border-color: var(--ds-danger);
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}


/* =========================================================
   MODAL ACTIONS
   ========================================================= */

.ds-sighting-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px 24px;
}


/* =========================================================
   HIDDEN STATE
   ========================================================= */

.ds-lost-pets-page .hidden {
  display: none !important;
}


/* =========================================================
   ICON SIZE INSIDE LOST PET UI
   ========================================================= */

.ds-lost-pets-page .ds-icon {
  width: 20px;
  height: 20px;
}

.ds-lost-pets-help-icon .ds-icon,
.ds-lost-pets-loading-icon .ds-icon,
.ds-lost-pets-empty-icon .ds-icon {
  width: 24px;
  height: 24px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */





/* =========================================================
   LOST PET FEED LOAD STABILITY

   Reserve the approximate footprint of one desktop lost-pet card
   while the feed is loading so asynchronously loaded pet content
   does not shift the rest of the page.
   ========================================================= */

.ds-lost-pets-feed {
  min-height: 620px;
}

.ds-lost-pets-loading {
  min-height: 620px;
  align-content: center;
}




