.user-rebuild-page {
  width: min(100% - (var(--ds-space-4) * 2), var(--ds-content-width));
  margin-inline: auto;
  padding-block: var(--ds-space-5) var(--ds-space-6);
}

.user-account-hero {
  margin-bottom: var(--ds-space-4);
  display: grid;
  gap: var(--ds-space-2);
padding: var(--ds-space-5) var(--ds-space-6);
  border: 1px solid var(--ds-border);
  border-left: 4px solid var(--ds-primary);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.user-account-hero h1 {
  margin: 0;
  color: var(--ds-heading);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.user-account-identity {
  margin: 0;
  color: var(--ds-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}
#userToeBeansId {
  margin: 0;
  color: var(--ds-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

.user-account-layout {
  display: grid;
  gap: var(--ds-space-3);
}

.user-account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  margin-bottom: var(--ds-space-1);
}

.user-account-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.user-account-tab[aria-selected="true"] {
  border-color: var(--ds-primary);
  color: var(--ds-primary);
}

.user-account-panel[hidden] {
  display: none;
}

.user-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-5);
  margin-bottom: var(--ds-space-4);
  padding-bottom: var(--ds-space-4);
  border-bottom: 1px solid var(--ds-border);
}

.user-section-heading h2 {
  margin: 0 0 var(--ds-space-2);
  color: var(--ds-heading);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.user-section-heading > div > p:last-child {
  margin: 0;
  color: var(--ds-muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
}

.user-section-divider {
  border-top: 1px solid var(--ds-border);
  margin-block: var(--ds-space-6);
}

.user-empty-state {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
}

.user-adoption-card {
  display: grid;
  gap: var(--ds-space-5);
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding: var(--ds-space-6);
}

.user-adoption-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-6);
  padding-bottom: var(--ds-space-5);
  border-bottom: 1px solid var(--ds-border);
}

.user-adoption-header > div {
  min-width: 0;
  max-width: 760px;
}

.user-adoption-header .section-kicker {
  margin: 0 0 var(--ds-space-1);
  color: var(--ds-primary);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-adoption-header h2 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 1.75rem;
  line-height: 1.15;
}

.user-adoption-intro {
  max-width: 720px;
  margin: var(--ds-space-2) 0 0;
  color: var(--ds-muted);
  line-height: 1.55;
}

.user-adoption-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: var(--ds-space-1) var(--ds-space-3);
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: var(--ds-surface-alt);
  color: var(--ds-muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.user-adoption-status[data-state="complete"] {
  border-color: color-mix(
    in srgb,
    var(--ds-success) 36%,
    var(--ds-border)
  );
  background: color-mix(
    in srgb,
    var(--ds-success) 8%,
    var(--ds-surface)
  );
  color: var(--ds-success);
}

.user-adoption-profile-form {
  display: grid;
  gap: var(--ds-space-4);
}

.user-adoption-section {
  min-width: 0;
  margin: 0;
  padding: var(--ds-space-5);
  border: 1px solid color-mix(
    in srgb,
    var(--ds-primary) 18%,
    var(--ds-border)
  );
  border-top: 3px solid var(--ds-primary);
  border-radius: var(--ds-radius-lg);
  background: color-mix(
    in srgb,
    var(--ds-primary) 2%,
    var(--ds-surface)
  );
}

.user-adoption-section legend {
  padding: 0 var(--ds-space-2);
  color: var(--ds-primary);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.3;
}

.user-adoption-section-help {
  margin: 0 0 var(--ds-space-4);
  color: var(--ds-muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
}

.user-adoption-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-4);
  align-items: start;
}

.user-adoption-grid .ds-form-field {
  min-width: 0;
}

.user-adoption-grid + .user-adoption-grid,
.user-adoption-conditional + .user-adoption-grid {
  margin-top: var(--ds-space-4);
}

.user-adoption-full {
  grid-column: 1 / -1;
}

.user-adoption-conditional {
  margin-top: var(--ds-space-4);
  padding: var(--ds-space-4);
  border: 1px solid color-mix(
    in srgb,
    var(--ds-primary) 24%,
    var(--ds-border)
  );
  border-left: 3px solid var(--ds-primary);
  border-radius: var(--ds-radius-md);
  background: color-mix(
    in srgb,
    var(--ds-primary) 5%,
    var(--ds-surface)
  );
}

.user-adoption-conditional[hidden] {
  display: none;
}

.user-adoption-profile-form input,
.user-adoption-profile-form select,
.user-adoption-profile-form textarea {
  width: 100%;
}

.user-adoption-profile-form textarea {
  min-height: 104px;
  resize: vertical;
}

.user-adoption-check {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-4);
  color: var(--ds-text);
  line-height: 1.5;
  cursor: pointer;
}

.user-adoption-check input {
  flex: 0 0 auto;
  width: auto;
  margin-top: 0.2rem;
}

.user-adoption-confirmation {
  border-color: color-mix(
    in srgb,
    var(--ds-primary) 28%,
    var(--ds-border)
  );
  border-top-color: var(--ds-primary);
  background: color-mix(
    in srgb,
    var(--ds-primary) 5%,
    var(--ds-surface)
  );
}

.user-adoption-confirmation .user-adoption-check {
  margin-top: 0;
}

.user-adoption-disclaimer {
  max-width: 780px;
  margin: var(--ds-space-3) 0 0;
  color: var(--ds-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.user-adoption-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ds-space-4);
  padding-top: var(--ds-space-2);
}

.user-adoption-actions .ds-message {
  flex: 1 1 auto;
  margin: 0;
}

.user-adoption-actions .ds-button {
  flex: 0 0 auto;
  min-width: 190px;
}



/* =========================================================
   USER PET PROFILE CARDS
   ========================================================= */

.user-pet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-5);
  align-items: stretch;
}

.user-pet-grid > .ds-message {
  grid-column: 1 / -1;
}

.user-pet-profile-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.user-pet-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-2);
  padding: var(--ds-space-2);
  padding-bottom: 0;
}

.user-pet-photo {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-soft);
}

.user-pet-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-pet-photo-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: var(--ds-space-3);
  color: var(--ds-muted);
  text-align: center;
}

.user-pet-profile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.user-pet-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-4);
}

.user-pet-card-heading .section-kicker {
  margin-bottom: var(--ds-space-1);
}

.user-pet-card-heading h3 {
  margin: 0;
}

.user-pet-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-2) var(--ds-space-4);
  margin: 0;
}

.user-pet-fact {
  display: grid;
  grid-template-columns: minmax(100px, auto) 1fr;
  gap: var(--ds-space-2);
  align-items: baseline;
  min-width: 0;
  margin: 0;
  line-height: 1.45;
}

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

.user-pet-fact dd {
  min-width: 0;
  margin: 0;
  color: var(--ds-muted);
  overflow-wrap: anywhere;
}

.user-pet-fact-wide {
  grid-column: 1 / -1;
}

.user-missing-pet-location-options {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.user-missing-pet-location-options legend {
  width: 100%;
  margin: 0 0 var(--ds-space-3);
  padding: 0;
  color: var(--ds-heading);
  font-size: 0.925rem;
  font-weight: 700;
}

.user-missing-pet-location-choice-list {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: var(--ds-space-3);
}

.user-missing-pet-location-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3);
  min-width: 0;
  min-height: 78px;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-heading);
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease;
}

.user-missing-pet-location-choice:hover {
  border-color: var(--ds-primary);
  background: var(--ds-surface-soft);
}

.user-missing-pet-location-choice:has(input:checked) {
  border-color: var(--ds-primary);
  background: var(--ds-surface-soft);
  box-shadow:
    inset 0 0 0 1px var(--ds-primary);
}

.user-missing-pet-location-choice input {
  width: 20px;
  height: 20px;
  min-height: 0;
  flex: 0 0 20px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  accent-color: var(--ds-primary);
}

.user-missing-pet-location-choice-copy {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

.user-missing-pet-location-choice-copy strong {
  color: var(--ds-heading);
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.3;
}

.user-missing-pet-location-choice-copy > span {
  color: var(--ds-muted);
  font-size: 0.825rem;
  font-weight: 400;
  line-height: 1.4;
}

#userMissingPetCurrentLocationBox {
  display: grid;
  justify-items: start;
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-4);
}

#userMissingPetCurrentLocationBox[hidden] {
  display: none;
}

#userMissingPetUseLocationButton {
  width: auto;
}

#userMissingPetGpsStatus {
  margin: 0;
  color: var(--ds-muted);
}

#userMissingPetAddressBox {
  margin-top: var(--ds-space-4);
}

#userMissingPetAddressBox[hidden] {
  display: none;
}

#userMissingPetAddressBox + .ds-form-grid,
#userMissingPetCurrentLocationBox + #userMissingPetAddressBox + .ds-form-grid {
  margin-top: var(--ds-space-5);
}

#userMissingPetDate,
#userMissingPetTime {
  color: var(--ds-heading);
}

.user-missing-pet-summary {
  display: grid;
  grid-template-columns:
    minmax(170px, 200px)
    minmax(0, 1fr);
  gap: var(--ds-space-4);
  align-items: start;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.user-missing-pet-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface-soft);
}

.user-missing-pet-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-missing-pet-summary-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
}

.user-missing-pet-summary-content .section-kicker {
  margin: 0;
  color: var(--ds-muted);
}

.user-missing-pet-summary-content > h3 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 20px;
  line-height: 1.1;
}

.user-missing-pet-facts {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-2) var(--ds-space-4);
  margin: var(--ds-space-1) 0 0;
}

.user-missing-pet-facts .user-pet-fact {
  display: grid;
  grid-template-columns:
    minmax(96px, auto)
    minmax(0, 1fr);
  gap: var(--ds-space-2);
  align-items: baseline;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1.4;
}

.user-missing-pet-facts .user-pet-fact dt {
  margin: 0;
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.user-missing-pet-facts .user-pet-fact dd {
  min-width: 0;
  margin: 0;
  color: var(--ds-heading);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.user-missing-pet-facts .user-pet-fact-wide {
  grid-column: 1 / -1;
}


.user-pet-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--ds-space-2);
  margin-top: auto;
  padding-top: var(--ds-space-5);
}

.user-pet-actions .ds-button {
  width: 100%;
}

.user-pet-view-action {
  border-color:
    var(--ds-border-strong);

  background:
    var(--ds-surface-alt);

  color:
    var(--ds-heading);
}

.user-pet-view-action:hover {
  border-color:
    var(--ds-primary);

  background:
    var(--ds-secondary);

  color:
    var(--ds-heading);
}

.user-pet-status-action {
  grid-column: 1 / -1;
  min-height: 42px;
}

.user-pet-status-action .ds-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}







/* =========================================================
   EDIT PET
   ========================================================= */

.user-edit-pet-dialog {
  width: min(1040px, calc(100% - (var(--ds-space-5) * 2)));
  max-width: 1040px;
  max-height: calc(100dvh - (var(--ds-space-5) * 2));
  padding: 0;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-xl);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-lg);
  overflow: hidden;
}

.user-edit-pet-dialog::backdrop {
  background: rgb(31 24 20 / 52%);
  backdrop-filter: blur(2px);
}

.user-edit-pet-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - (var(--ds-space-5) * 2));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ds-surface);
  scrollbar-gutter: stable;
}

.user-edit-pet-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-5);
  margin: 0;
  padding: var(--ds-space-6);
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface);
}

.user-edit-pet-header > div {
  min-width: 0;
}

.user-edit-pet-header h2 {
  margin: 0;
  color: var(--ds-heading);
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  line-height: 1.15;
}

.user-edit-pet-header p {
  max-width: 60ch;
  margin: var(--ds-space-2) 0 0;
  color: var(--ds-muted);
  line-height: 1.55;
}

.user-edit-pet-header .ds-modal-close {
  flex: 0 0 auto;
}

#userEditPetMessage {
  margin: var(--ds-space-5) var(--ds-space-6) 0;
}

.user-edit-pet-section {
  margin: var(--ds-space-5) var(--ds-space-6) 0;
  padding: var(--ds-space-6);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface-soft);
}

.user-edit-pet-section + .user-edit-pet-section {
  margin-top: var(--ds-space-5);
}

.user-edit-pet-section-header {
  margin-bottom: var(--ds-space-5);
  padding-bottom: var(--ds-space-4);
  border-bottom: 1px solid var(--ds-border);
}

.user-edit-pet-section-header h3 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 1.05rem;
  line-height: 1.3;
}

.user-edit-pet-section-header p {
  margin: var(--ds-space-2) 0 0;
  color: var(--ds-muted);
  font-size: 0.925rem;
  line-height: 1.5;
}

.user-edit-pet-form .ds-form-grid {
  gap: var(--ds-space-5);
}

.user-edit-pet-form .ds-form-field {
  min-width: 0;
}

.user-edit-pet-form .ds-form-field > label {
  display: block;
  margin-bottom: var(--ds-space-2);
}

.user-edit-pet-form input:not([type="radio"]):not([type="checkbox"]),
.user-edit-pet-form select,
.user-edit-pet-form textarea {
  width: 100%;
}

.user-edit-pet-form textarea {
  min-height: 116px;
  resize: vertical;
}

.user-edit-pet-form .ds-adopt-pet-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: var(--ds-space-3);
}

.user-edit-pet-form .ds-adopt-pet-actions + .ds-adopt-pet-actions {
  margin-top: var(--ds-space-3);
}

.user-edit-pet-form .ds-adopt-pet-actions .ds-button {
  align-self: stretch;
  white-space: nowrap;
}

.user-edit-pet-form .ds-selection-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  min-height: 2.5rem;
  margin-top: var(--ds-space-3);
  padding: var(--ds-space-3);
  border: 1px dashed var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
}

.user-edit-pet-form .ds-selection-chip {
  max-width: 100%;
}

.user-edit-pet-form .ds-selection-chip span {
  overflow-wrap: anywhere;
}

.user-edit-pet-photo-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--ds-space-5);
  width: 100%;
  margin-top: var(--ds-space-5);
}
.user-edit-pet-photo-fields .ds-form-field {
  display: grid;
  align-content: start;
  gap: var(--ds-space-3);
  width: 100%;
  min-width: 0;
}

.user-edit-pet-photo-fields input[type="file"] {
  width: 100%;
}


.user-edit-additional-photo-gallery {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(88px, 104px)
  );
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-3);
}

.user-edit-additional-photo-gallery[hidden] {
  display: none;
}

.user-edit-additional-photo-preview {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
}

.user-edit-additional-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-edit-additional-photo-remove {
  position: absolute;
  top: var(--ds-space-1);
  right: var(--ds-space-1);
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  background: rgb(25 32 31 / 82%);
  color: #ffffff;
  cursor: pointer;
}

.user-edit-additional-photo-remove:hover {
  background: var(--ds-primary-dark);
}

.user-edit-additional-photo-remove:focus-visible {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.user-edit-additional-photo-remove svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.user-edit-pet-form input[type="file"] {
  width: 100%;
  min-height: 46px;
  padding: var(--ds-space-2);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-muted);
  font: inherit;
  cursor: pointer;
}

.user-edit-pet-form input[type="file"]:hover {
  border-color: var(--ds-primary);
}

.user-edit-pet-form input[type="file"]:focus-visible {
  border-color: var(--ds-primary);
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.user-edit-pet-form input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: var(--ds-space-3);
  padding: var(--ds-space-2) var(--ds-space-4);
  border: 1px solid var(--ds-primary-dark);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-primary);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    transform 120ms ease;
}

.user-edit-pet-form input[type="file"]::file-selector-button:hover {
  background: var(--ds-primary-dark);
  border-color: var(--ds-primary-dark);
}

.user-edit-pet-form input[type="file"]::file-selector-button:active {
  transform: translateY(1px);
}

.user-edit-pet-form img[id^="userEditPetCurrent"] {
  display: block;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
}

.user-edit-pet-form [id$="Empty"] {
  display: grid;
  min-height: 120px;
  place-items: center;
  padding: var(--ds-space-4);
  border: 1px dashed var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  color: var(--ds-muted);
  text-align: center;
}

.user-edit-pet-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-6);
  padding: var(--ds-space-4) var(--ds-space-6);
  border-top: 1px solid var(--ds-border);
  background: var(--ds-surface);
  box-shadow: 0 -8px 20px rgb(0 0 0 / 5%);
}

.user-edit-pet-footer .ds-button {
  min-width: 132px;
}

/* EDIT PET MULTI PICKER */

.user-edit-multi-picker {
  position: relative;
  min-width: 0;
}

.user-edit-multi-picker > select[hidden] {
  display: none;
}

.user-edit-multi-picker-trigger {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.user-edit-multi-picker-trigger:hover {
  border-color: var(--ds-primary);
}

.user-edit-multi-picker-trigger:focus-visible {
  border-color: var(--ds-primary);
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.user-edit-multi-picker-trigger[aria-expanded="true"] {
  border-color: var(--ds-primary);
}

.user-edit-multi-picker-trigger .ds-icon {
  flex: 0 0 auto;
  transition: transform 120ms ease;
}

.user-edit-multi-picker-trigger[aria-expanded="true"] .ds-icon {
  transform: rotate(180deg);
}

.user-edit-multi-picker-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--ds-space-2));
  right: 0;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: var(--ds-space-2);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-md);
}

.user-edit-multi-picker-menu[hidden] {
  display: none;
}

.user-edit-multi-picker-options {
  display: grid;
  gap: 2px;
}

.user-edit-multi-picker-option {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  min-height: 38px;
  padding: var(--ds-space-2) var(--ds-space-3);
  border-radius: var(--ds-radius-sm);
  cursor: pointer;
}

.user-edit-multi-picker-option:hover {
  background: var(--ds-surface-soft);
}

.user-edit-multi-picker-option:has(input:checked) {
  background: var(--ds-surface-soft);
  color: var(--ds-heading);
  font-weight: 600;
}

.user-edit-multi-picker-option:has(input:disabled) {
  opacity: 0.5;
  cursor: default;
}

.user-edit-multi-picker-option input {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--ds-primary);
}

.user-edit-multi-picker-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* END EDIT PET MULTI PICKER */
.user-edit-pet-date-control {
  position: relative;
}

.user-edit-pet-date-control input {
  padding-right: calc(var(--ds-space-6) + var(--ds-space-4));
}

.user-edit-pet-date-clear {
  position: absolute;
  top: 50%;
  right: var(--ds-space-3);
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--ds-radius-sm);
  background: transparent;
  color: var(--ds-muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.user-edit-pet-date-clear:hover {
  background: var(--ds-surface-soft);
  color: var(--ds-heading);
}

.user-edit-pet-date-clear:focus-visible {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.user-edit-pet-date-clear[hidden] {
  display: none;
}
@supports not (height: 100dvh) {
  .user-edit-pet-dialog,
  .user-edit-pet-form {
    max-height: calc(100vh - (var(--ds-space-5) * 2));
  }
}




/* =========================================================
   OWNER LOST PET SEARCH MAP
   ========================================================= */

.user-pet-search-map-action {
  grid-column: 1 / -1;
  background: var(--ds-info);
  border-color: var(--ds-info);
  color: #ffffff;
}
.user-pet-search-map-action:hover,
.user-pet-search-map-action:focus-visible {
  background: color-mix(
    in srgb,
    var(--ds-info) 82%,
    black
  );
  border-color: color-mix(
    in srgb,
    var(--ds-info) 82%,
    black
  );
  color: #ffffff;
}

.user-pet-search-map-action[hidden] {
  display: none;
}

.user-lost-search-dialog {
  width: min(1100px, calc(100% - (var(--ds-space-5) * 2)));
  max-width: 1100px;
  max-height: calc(100dvh - (var(--ds-space-5) * 2));
  margin: auto;
  padding: 0;
}
.user-lost-search-dialog::backdrop {
  background: rgb(31 24 20 / 52%);
  backdrop-filter: blur(2px);
}

.user-lost-search-shell {
  width: 100%;
  max-width: none;
  max-height: calc(100dvh - (var(--ds-space-5) * 2));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ds-surface);
  scrollbar-gutter: stable;
}

.user-lost-search-header {
  position: sticky;
  top: 0;
  z-index: 2;
  isolation: isolate;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-4);
  padding: var(--ds-space-5) var(--ds-space-6);
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface);
}

.user-lost-search-shell .section-kicker {
  margin: 0 0 var(--ds-space-1);
  color: var(--ds-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-lost-search-header > div {
  min-width: 0;
}

.user-lost-search-header h2 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.user-lost-search-header p:not(.section-kicker) {
  margin: var(--ds-space-1) 0 0;
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

#userLostPetSearchMessage {
  margin: var(--ds-space-4) var(--ds-space-6) 0;
}

.user-lost-search-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-5);
  margin: var(--ds-space-5) var(--ds-space-6) var(--ds-space-3);
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.user-lost-search-legend > span {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
}

.user-lost-search-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
}

.user-lost-search-dot-last {
  background: var(--ds-danger);
}

.user-lost-search-dot-sighting {
  background: var(--ds-primary);
}
.user-lost-search-sighting-number {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

.user-lost-search-sighting-number::before {
  display: none;
}

.user-lost-search-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 500px;
  margin: 0 var(--ds-space-6);
  overflow: hidden;
  border: 1px solid var(--ds-border-strong);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface-alt);
  box-shadow: var(--ds-shadow-sm);
}

#userLostPetSearchMapEmpty {
  margin: 0 var(--ds-space-6);
}

.user-lost-search-sightings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  margin: var(--ds-space-5) var(--ds-space-6) var(--ds-space-3);
  padding: 0 0 var(--ds-space-3);
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
}

.user-lost-search-sightings-heading h3 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.user-lost-search-sightings {
  display: grid;
  gap: var(--ds-space-3);
  margin: 0 var(--ds-space-6) var(--ds-space-6);
}

.user-lost-search-sighting-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-3);
  min-width: 0;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-left: 3px solid var(--ds-primary);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.user-lost-search-sighting-card > * {
  min-width: 0;
}

.user-lost-search-sighting-photo {
  width: min(220px, 100%);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
}

.user-lost-search-sighting-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-lost-search-sighting-content {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: var(--ds-space-3);
  min-width: 0;
}

.user-lost-search-sighting-content p {
  display: grid;
  align-content: start;
  gap: var(--ds-space-1);
  min-width: 0;
  margin: 0;
  padding: var(--ds-space-3);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
  color: var(--ds-heading);
  line-height: 1.45;
}

.user-lost-search-sighting-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  min-width: 0;
  padding-bottom: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border);
}

.user-lost-search-sighting-title strong {
  color: var(--ds-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.user-lost-search-sighting-title span {
  flex: 0 0 auto;
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.user-lost-search-sighting-content p strong {
  color: var(--ds-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.user-lost-search-sighting-content p span {
  min-width: 0;
  color: var(--ds-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.user-lost-search-sighting-contact {
  grid-column: auto;
}

.user-lost-search-popup {
  display: grid;
  gap: 4px;
  min-width: 170px;
  color: #182523;
  line-height: 1.4;
}

.user-lost-search-popup > strong {
  font-weight: 700;
}

.user-lost-search-popup > span {
  font-size: 0.85rem;
}

.user-lost-search-popup > p {
  margin: 4px 0 0;
}




.user-page-kicker {
  margin: 0;
  color: var(--ds-primary);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-panel-kicker {
  margin: 0 0 var(--ds-space-1);
  color: var(--ds-primary);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================================
   OWNER USER PET CO-OWNERS
   ========================================================= */

.user-edit-main-photo-preview {
  position: relative;
  width: 104px;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
}

.user-edit-main-photo-preview[hidden] {
  display: none;
}

.user-edit-main-photo-preview > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-edit-main-photo-delete {
  position: absolute;
  top: var(--ds-space-1);
  right: var(--ds-space-1);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 999px;
  background: rgb(31 24 20 / 82%);
  color: #ffffff;
  cursor: pointer;
}

.user-edit-main-photo-delete:hover,
.user-edit-main-photo-delete:focus-visible {
  background: var(--ds-danger-solid);
  border-color: var(--ds-danger-solid);
  color: #ffffff;
}

.user-edit-main-photo-delete:disabled {
  cursor: wait;
  opacity: 0.65;
}

.user-edit-main-photo-delete svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.user-pet-owners-dialog {
  width: min(760px, calc(100% - (var(--ds-space-5) * 2)));
  max-width: 760px;
  max-height: calc(100dvh - (var(--ds-space-6) * 2));
  margin: auto;
  padding: 0;
}

.user-pet-owners-shell {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - (var(--ds-space-6) * 2));
  overflow: hidden;
}

.user-pet-owners-dialog .ds-modal-header {
  flex-shrink: 0;
  align-items: flex-start;
  gap: var(--ds-space-5);
  padding: var(--ds-space-5) var(--ds-space-5) var(--ds-space-4);
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface);
}

.user-pet-owners-dialog .ds-modal-header > div {
  display: grid;
  gap: var(--ds-space-1);
}

.user-pet-owners-dialog .ds-modal-header .section-kicker {
  margin: 0;
  color: var(--ds-primary);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-pet-owners-dialog .ds-modal-header h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.15;
}

.user-pet-owners-dialog .ds-modal-header p:not(.section-kicker) {
  margin: 0;
  color: var(--ds-muted);
  line-height: 1.5;
}

.user-pet-owners-content {
  display: grid;
  gap: 0;
  min-height: 0;
  padding: 0 var(--ds-space-5) var(--ds-space-5);
  overflow-y: auto;
}

#userPetOwnersMessage {
  margin-top: var(--ds-space-4);
}

.user-pet-owners-section {
  display: grid;
  gap: var(--ds-space-3);
  padding: var(--ds-space-5) 0;
}

.user-pet-owners-section + .user-pet-owners-section {
  border-top: 1px solid var(--ds-border);
}

.user-pet-owners-section:last-child {
  padding-bottom: 0;
}

.user-pet-owners-heading {
  display: block;
}

.user-pet-owners-heading h3 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 1rem;
  line-height: 1.3;
}

.user-pet-owners-heading p {
  margin: var(--ds-space-1) 0 0;
  color: var(--ds-muted);
  line-height: 1.5;
}

.user-pet-owner-list {
  display: grid;
  gap: var(--ds-space-2);
}

.user-pet-owner-row,
.user-pet-owner-found {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
}

.user-pet-owner-person {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: start;
  gap: var(--ds-space-1) var(--ds-space-2);
  min-width: 0;
}

.user-pet-owner-person strong {
  min-width: 0;
  color: var(--ds-heading);
  font-weight: 800;
}

.user-pet-owner-person small {
  grid-column: 1 / -1;
  color: var(--ds-muted);
  overflow-wrap: anywhere;
}

.user-pet-owner-person .ds-badge {
  justify-self: start;
}

.user-pet-owner-found {
  margin-top: var(--ds-space-3);
  border-color: color-mix(
    in srgb,
    var(--ds-primary) 30%,
    var(--ds-border)
  );
}

.user-pet-owner-found-label {
  grid-column: 1 / -1;
  color: var(--ds-primary);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-pet-owner-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--ds-space-3);
}

.user-pet-owner-search .ds-field {
  display: grid;
  gap: var(--ds-space-2);
  min-width: 0;
}

.user-pet-owner-search .ds-field > span {
  color: var(--ds-heading);
  font-size: 0.875rem;
  font-weight: 700;
}

.user-pet-owner-search input {
  width: 100%;
  min-height: 42px;
}

.user-pet-owner-search .ds-button {
  min-width: 118px;
}

#userPetOwnerTransferSection.user-pet-owners-section {
  margin-top: var(--ds-space-2);
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-warning);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-warning-soft);
}

#userPetOwnerTransferHeading {
  color: var(--ds-warning);
}

#userPetOwnerPendingList > .ds-message,
#userPetOwnersList > .ds-message {
  margin: 0;
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 1px dashed var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-alt);
  color: var(--ds-muted);
}

.user-pet-owners-action {
  grid-column: 1 / -1;
  min-height: 42px;
  background: color-mix(
    in srgb,
    var(--ds-primary) 12%,
    var(--ds-surface-alt)
  );
  border-color: color-mix(
    in srgb,
    var(--ds-primary) 58%,
    var(--ds-border-strong)
  );
  color: var(--ds-heading);
  font-weight: 700;
}

.user-pet-owners-action:hover,
.user-pet-owners-action:focus-visible {
  background: color-mix(
    in srgb,
    var(--ds-primary) 22%,
    var(--ds-surface-alt)
  );
  border-color: var(--ds-primary);
  color: var(--ds-heading);
}
