/* ============================================================
   Public pet profile · redesign — page styles
   Loads AFTER ../pwa-redesign/styles/tokens.css (Manrope, DS
   greens, radii, shadows). Header/sidebar/footer visuals live
   in public-chrome.js; everything page-level is here.

   Responsive contract:
   - desktop grid holds at 1280px (content column max 1160px)
   - <768px: single column, PWA-like — sidebar becomes chips,
     hero photo goes full width, sticky bottom CTA appears.
   - No fixed widths wider than 375px anywhere → no horizontal
     scroll on small phones.
   ============================================================ */

/* — Side margins: PLAIN cream, no pattern.
     Production has a paw-doodle pattern here; the redesign deliberately
     drops it — decision 2026-08-07: no such identity elements until the
     identity refresh lands. Plain warm cream keeps the sheet framed. — */
body.public-page {
  background-color: #F9F5EC; /* cream base (close kin of --c-cream-100) */
}

/* Central content sheet — covers the doodles behind the content */
.page-shell {
  max-width: 1160px;
  margin: 0 auto;
  background: var(--c-brand-dark-015);
  min-height: 60vh;
  padding: 20px 24px 48px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.03);
}

/* — Breadcrumb — */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font: 500 12.5px/1.4 var(--font-sans);
  color: var(--c-brand-dark-300);
  margin: 0 0 16px;
}
.breadcrumb a { color: var(--c-brand-dark-500); }
.breadcrumb a:hover { color: var(--c-brand-green-600); }
.breadcrumb .sep { opacity: .55; }
.breadcrumb .current { color: var(--c-brand-dark-700); font-weight: 700; }

/* — Layout: slim left nav + main — */
.layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* — Side nav (markup injected by public-chrome.js) — */
.side-nav {
  background: var(--c-white);
  border: 1px solid var(--c-brand-dark-050);
  border-radius: var(--r-lg);
  padding: 8px;
  position: sticky; top: 84px;
}
.side-nav__pet {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--c-brand-dark-050);
  margin-bottom: 8px;
}
.side-nav__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-brand-green-100);
}
.side-nav__pet-name {
  display: block;
  font: 800 14px/1.2 var(--font-sans);
  color: var(--c-brand-dark-800);
}
.side-nav__pet-sub {
  display: block;
  font: 600 10.5px/1.4 var(--font-sans);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--c-brand-dark-300);
}
.side-nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px;
  border-radius: var(--r-sm);
  font: 700 13.5px/1 var(--font-sans);
  color: var(--c-brand-dark-500);
  transition: background 140ms var(--ease-standard), color 140ms var(--ease-standard);
}
.side-nav__item svg { width: 18px; height: 18px; opacity: .8; }
.side-nav__item:hover { background: var(--c-brand-dark-025); color: var(--c-brand-dark-700); }
.side-nav__item.is-active {
  background: var(--c-brand-green-050);
  color: var(--c-brand-green-600);
}

/* — Cards (DS card language) — */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-brand-dark-050);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ============ HERO ============
   NB: no overflow:hidden here — it clipped the absolutely-positioned
   Contact-owner dropdown (bug 2026-08-07). The photo clips itself to
   the card radius instead. */
.hero { overflow: visible; }
.hero__grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}
.hero__photo {
  position: relative;
  min-height: 300px;
  background: var(--c-brand-green-050);
  border-radius: var(--r-lg) 0 0 var(--r-lg);   /* card corners, left side */
  overflow: hidden;
}
.hero__photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__body { padding: 24px 28px 22px; min-width: 0; }
.hero__topline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.hero__name {
  margin: 0;
  font: 800 32px/1.15 var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--c-brand-dark-900);
  overflow-wrap: anywhere;
}
.verified-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--c-brand-green-050);
  border: 1px solid var(--c-brand-green-200);
  border-radius: var(--r-pill);
  font: 700 11px/1 var(--font-sans);
  color: var(--c-brand-green-700);
  white-space: nowrap;
}
.verified-chip svg { width: 12px; height: 12px; }

.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--c-brand-dark-025);
  border-radius: var(--r-pill);
  font: 700 12.5px/1.2 var(--font-sans);
  color: var(--c-brand-dark-700);
}
.chip svg { width: 13px; height: 13px; opacity: .7; }

/* Copyable pet ID pill */
.id-pill {
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 100%;
  padding: 9px 8px 9px 14px;
  background: var(--c-brand-dark-900);
  border-radius: var(--r-md);
  color: #fff;
  margin-bottom: 18px;
}
.id-pill__label {
  font: 700 9.5px/1 var(--font-sans);
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.id-pill__value {
  font: 600 14px/1 ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}
.id-pill__copy {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.12);
  color: #fff;
  font: 700 11px/1 var(--font-sans);
  transition: background 140ms var(--ease-standard);
}
.id-pill__copy:hover { background: rgba(255,255,255,.22); }
.id-pill__copy svg { width: 12px; height: 12px; }
.id-pill__copy.is-copied { background: var(--c-brand-green-500); }

/* Contact owner */
.hero__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: relative; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border: 0; border-radius: var(--r-md);
  background: var(--c-brand-green-500);
  color: #fff;
  font: 800 14.5px/1 var(--font-sans);
  cursor: pointer;
  transition: background 140ms var(--ease-standard);
}
.btn-primary:hover { background: var(--c-brand-green-600); }
.btn-primary svg { width: 15px; height: 15px; }
.btn-primary .caret { width: 12px; height: 12px; opacity: .8; }
.hero__note {
  font: 500 12px/1.5 var(--font-sans);
  color: var(--c-brand-dark-300);
}

/* Contact dropdown */
.contact-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 230px;
  background: var(--c-white);
  border: 1px solid var(--c-brand-dark-050);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 30;
  display: none;
}
.contact-menu.is-open { display: block; }
.contact-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font: 700 13px/1.3 var(--font-sans);
  color: var(--c-brand-dark-700);
}
.contact-menu a:hover { background: var(--c-brand-green-050); color: var(--c-brand-green-600); }
.contact-menu a svg { width: 16px; height: 16px; opacity: .75; }
.contact-menu small {
  display: block;
  font: 500 11px/1.4 var(--font-sans);
  color: var(--c-brand-dark-300);
}

/* ============ DETAILS ============ */
.section-card { margin-top: 20px; padding: 22px 28px 24px; }
.section-card__title {
  margin: 0 0 16px;
  font: 800 16px/1.3 var(--font-sans);
  color: var(--c-brand-dark-800);
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
  margin: 0;
}
.details-grid > div {
  border-bottom: 1px dashed var(--c-brand-dark-050);
  padding-bottom: 12px;
}
.details-grid dt {
  font: 700 10.5px/1.4 var(--font-sans);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-brand-dark-300);
  margin: 0 0 3px;
}
.details-grid dd {
  margin: 0;
  font: 700 14.5px/1.4 var(--font-sans);
  color: var(--c-brand-dark-700);
  overflow-wrap: anywhere;
}
.details-grid dd.soft {
  color: var(--c-brand-dark-300);
  font-weight: 500;
}

/* ============ ACQUISITION BLOCK (the new conversion surface) ============ */
.acq {
  margin-top: 20px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--c-brand-green-600) 0%, var(--c-brand-green-700) 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.acq__inner {
  padding: 30px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}
.acq__kicker {
  font: 800 10.5px/1 var(--font-sans);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-brand-green-200);
  margin: 0 0 8px;
}
.acq__title {
  margin: 0 0 10px;
  font: 800 22px/1.25 var(--font-sans);
  letter-spacing: -0.01em;
}
.acq__text {
  margin: 0 0 16px;
  font: 500 14px/1.6 var(--font-sans);
  color: rgba(255,255,255,.88);
  max-width: 56ch;
}
.acq__perks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.acq__perk {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-pill);
  font: 700 12px/1.2 var(--font-sans);
  color: #fff;
}
.acq__perk svg { width: 13px; height: 13px; }
.acq__cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-cream {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  border: 0; border-radius: var(--r-md);
  background: #fff;
  color: var(--c-brand-green-700);
  font: 800 14.5px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: transform 140ms var(--ease-emphasis), box-shadow 140ms var(--ease-standard);
}
.btn-cream:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.btn-cream svg { width: 15px; height: 15px; }
.acq__learn {
  font: 700 13px/1 var(--font-sans);
  color: rgba(255,255,255,.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.acq__learn:hover { color: #fff; }
.acq__mascot { align-self: end; display: flex; align-items: flex-end; }
/* Mascot duo — the ONLY identity elements allowed on this banner for
   now (no paw patterns / doodles until the identity refresh, decision
   2026-08-07). Naming, verified 2026-08-07: the CAT is Сіма
   (cat-sima.png, cut from 04_Library/stock/Sima_Sit_with-background.png
   via GrabCut); the dog mascot's name is not fixed yet. */
.acq__mascot img {
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.22));
  margin-bottom: -4px;           /* sit ON the banner edge, like the mock */
}
.acq__mascot-dog { width: 180px; }
.acq__mascot-cat { width: 128px; margin-left: -26px; }  /* companion, slightly behind */

/* Slim CTA strip for sub-pages (Documents / Pedigree) */
.cta-strip {
  margin-top: 20px;
  border-radius: var(--r-lg);
  background: var(--c-brand-green-050);
  border: 1px solid var(--c-brand-green-200);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cta-strip p {
  margin: 0;
  font: 600 13.5px/1.5 var(--font-sans);
  color: var(--c-brand-green-700);
  flex: 1 1 260px;
}
.cta-strip .btn-primary { padding: 11px 18px; font-size: 13.5px; white-space: nowrap; }

/* ============ DOCUMENTS ============ */
.info-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--c-status-info-100);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font: 600 13.5px/1.5 var(--font-sans);
  color: var(--c-status-info-600);
}
.info-banner svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.docs-empty { text-align: center; padding: 36px 20px 40px; }
.docs-empty__icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--c-brand-green-050);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-brand-green-500);
}
.docs-empty__icon svg { width: 28px; height: 28px; }
.docs-empty h3 { margin: 0 0 6px; font: 800 16px/1.3 var(--font-sans); color: var(--c-brand-dark-800); }
.docs-empty p { margin: 0 auto; max-width: 42ch; font: 500 13px/1.6 var(--font-sans); color: var(--c-brand-dark-300); }

.doc-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-brand-dark-050);
  min-width: 0;
}
.doc-row:last-child { border-bottom: 0; padding-bottom: 0; }
.doc-row__icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--c-brand-green-050);
  color: var(--c-brand-green-600);
  display: flex; align-items: center; justify-content: center;
}
.doc-row__icon svg { width: 20px; height: 20px; }
.doc-row__body { min-width: 0; flex: 1; }
.doc-row__name {
  margin: 0;
  font: 800 14px/1.3 var(--font-sans);
  color: var(--c-brand-dark-800);
  overflow-wrap: anywhere;
}
.doc-row__meta { margin: 2px 0 0; font: 500 12px/1.4 var(--font-sans); color: var(--c-brand-dark-300); }
.doc-row__view {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--c-brand-dark-050);
  border-radius: var(--r-sm);
  background: var(--c-white);
  font: 700 12.5px/1 var(--font-sans);
  color: var(--c-brand-dark-700);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 140ms var(--ease-standard), color 140ms var(--ease-standard);
}
.doc-row__view:hover { border-color: var(--c-brand-green-500); color: var(--c-brand-green-600); }
.doc-row__view svg { width: 13px; height: 13px; }

.state-toggle {
  margin-top: 14px;
  font: 600 12px/1.4 var(--font-sans);
  color: var(--c-brand-dark-300);
}
.state-toggle button {
  border: 0; background: none; padding: 0;
  font: 700 12px/1.4 var(--font-sans);
  color: var(--c-brand-green-600);
  text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}

/* ============ PEDIGREE ============ */
.copy-field { display: flex; gap: 10px; flex-wrap: wrap; }
.copy-field__box {
  flex: 1 1 240px; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  background: var(--c-brand-dark-025);
  border: 1px solid var(--c-brand-dark-050);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.copy-field__box svg { width: 16px; height: 16px; color: var(--c-brand-dark-300); flex-shrink: 0; }
.copy-field__url {
  font: 600 13px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--c-brand-dark-700);
  overflow-wrap: anywhere;
}
.copy-field .btn-primary { flex-shrink: 0; }

.pedigree-card {
  margin-top: 20px;
  border: 1.5px solid var(--c-brand-green-200);
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.pedigree-card__photo {
  width: 76px; height: 76px; flex-shrink: 0;
  border-radius: var(--r-md);
  object-fit: cover;
}
.pedigree-card__body { min-width: 0; flex: 1 1 200px; }
.pedigree-card__name { margin: 0 0 4px; font: 800 17px/1.2 var(--font-sans); color: var(--c-brand-dark-900); }
.pedigree-card__id {
  font: 600 12px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--c-brand-dark-500);
  overflow-wrap: anywhere;
}
.pedigree-card .chip { flex-shrink: 0; }
.pedigree-note { margin: 14px 0 0; font: 500 12.5px/1.6 var(--font-sans); color: var(--c-brand-dark-300); }


/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 260px minmax(0, 1fr); }
  .acq__inner { grid-template-columns: minmax(0, 1fr) auto; }
  .acq__mascot-dog { width: 126px; }
  .acq__mascot-cat { width: 90px; margin-left: -18px; }
}

@media (max-width: 767px) {
  .page-shell { padding: 14px 16px 40px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  /* Sidebar → horizontal chips under the breadcrumb */
  .side-nav {
    position: static;
    display: flex; gap: 8px;
    padding: 0; border: 0; background: none; border-radius: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav__pet { display: none; }
  .side-nav__item {
    flex-shrink: 0;
    background: var(--c-white);
    border: 1px solid var(--c-brand-dark-050);
    border-radius: var(--r-pill);
    padding: 9px 16px;
  }
  .side-nav__item.is-active {
    background: var(--c-brand-green-500);
    border-color: var(--c-brand-green-500);
    color: #fff;
  }
  .side-nav__item svg { display: none; }

  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__photo { min-height: 0; height: 260px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .hero__photo img { position: static; height: 100%; }
  .hero__body { padding: 18px 18px 20px; }
  .hero__name { font-size: 26px; }
  .section-card { padding: 18px 18px 20px; }
  .details-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* Acquisition block ≤767px: SINGLE column — the tablet rule
     (minmax(0,1fr) auto) kept a ~200px mascot column here and crushed
     the copy into ~120px (bug 2026-08-09). Text gets the full width;
     the mascot duo drops under the CTA row, right-aligned and smaller,
     sitting on the banner's bottom edge. */
  .acq__inner { grid-template-columns: minmax(0, 1fr); padding: 24px 20px 0; }
  .acq__title { font-size: 19px; }
  /* Mobile duo sizing (user feedback 2026-08-10): 108/76px left too much
     air under the copy. Centre the duo and let it nearly fill the usable
     width (375 − 2×20 padding = 335px; 190 + 134 − 22 overlap ≈ 302px). */
  .acq__mascot { justify-content: center; margin-top: 8px; }
  .acq__mascot-dog { width: 190px; }
  .acq__mascot-cat { width: 134px; margin-left: -22px; }
}

/* «I found this pet» — the one RED action on this page (decision
   2026-08-08): it is an urgent alert, not a regular CTA, and must not
   compete with the green Contact owner next to it. Uses the DS danger
   scale (tokens: --c-status-danger-500/600), not an ad-hoc hex. */
.btn-found {
  background: var(--c-status-danger-500);
  box-shadow: 0 6px 16px rgba(217, 56, 56, .35);
}
.btn-found:hover { background: var(--c-status-danger-600); }
