/* still-waiting.html only.
   Shared rules (tokens, base, layout, nav, footer, i18n-zh) are linked
   separately and must not be redeclared here. */

/* ── NAV ──
   Everything else comes from components/nav.css; this page only opts into a
   sticky header. The full block used to be copied here, which meant any nav
   change had to be made twice. */
    .nav { position: sticky; top: 0; }

/* ── HERO ── */
    .page-hero {
      padding: var(--gap-sec) var(--pad);
      max-width: calc(var(--max) + var(--pad)*2);
      margin: 0 auto;
      border-bottom: 1px solid var(--light-gray);
      min-height: 400px;
      display: flex; align-items: center; gap: var(--gap-col);
    }

.page-hero-left { flex: 1; position: relative; z-index: 1; }

/* Was flex: 0 0 520px — grow 0 and *shrink 0*. Between 1024 and 1100px that
   rigid column left the title ~284px and the -20% overlap dragged the image
   across the headline. It shrinks now. */
.page-hero-right {
      flex: 0 1 clamp(280px, 40vw, 520px);
      min-width: 0;
      margin-left: -20%;
      display: flex; flex-direction: column; gap: 12px;
      align-items: flex-end;
      -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%);
      mask-image: linear-gradient(to right, transparent 0%, black 30%);
    }

/* Declared ratio plus a viewport cap: the space is reserved before the asset
   arrives, and the image cannot take over the first screen once the hero
   stacks. The markup carried width/height/margin as an inline style, which
   reserved nothing and could not respond. */
.page-hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1449 / 1086;
  max-height: var(--media-h-hero);
  object-fit: cover;
  border-radius: 16px;
  filter: brightness(1.05);
  margin-top: 40px;
}

.page-hero-label { font-size: var(--step--1); font-weight: 600; letter-spacing: -0.03em; text-transform: uppercase; color: var(--gray); margin-bottom: 20px; }

.page-hero-title { font-size: clamp(2rem, 3.756vw + 1.119rem, 4.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.0; margin-bottom: 20px; }

.page-hero-title em { color: var(--purple); font-style: normal; }

.page-hero-sub { font-family: var(--font-soft); font-size: var(--step-1); color: var(--gray); line-height: 1.6; max-width: 560px; }

/* stats */
    /* Three stats needing ~404px in a 352px column, with no wrap. */
    .hero-stats { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 32px; }

.hero-stat-num { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }

.hero-stat-label { font-size: var(--step--1); color: var(--gray); margin-top: 4px; font-family: var(--font-soft); }

/* ── FILTERS ── */
    .filter-section {
      padding: 20px 0;
      display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    }

.filter-label { font-size: var(--step--1); font-weight: 600; color: var(--gray); letter-spacing: 0.04em; text-transform: uppercase; margin-right: 8px; }

.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }

.filter-btn {
      padding: 6px 14px; border-radius: 20px;
      border: none; background: transparent;
      font-size: var(--step--1); font-weight: 500;
      color: var(--gray); cursor: pointer; transition: all .15s;
      font-family: var(--font-main);
      display: inline-flex; align-items: center; gap: 6px;
    }

@media (hover: hover) and (pointer: fine) {
  .filter-btn:hover { color: var(--black); }
}

.filter-btn.active { background: transparent; color: var(--black); text-decoration: underline; text-decoration-color: var(--gray); text-underline-offset: 4px; text-decoration-thickness: 1.5px; border-radius: 0; }

.filter-divider { width: 1px; height: 20px; background: var(--light-gray); margin: 0 4px; }

/* ── PET GRID ── */
    .pets-section {
      padding: var(--gap-sec) var(--pad);
      max-width: calc(var(--max) + var(--pad)*2);
      margin: 0 auto;
    }

.pets-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }

.result-count { font-size: var(--step--1); color: var(--gray); font-family: var(--font-soft); }

.pets-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: var(--gap-grid);
    }

.pet-card {
      border: 1.5px solid var(--light-gray);
      border-radius: 16px; overflow: hidden;
      cursor: pointer;
      transition: border-color .2s, box-shadow .2s, transform .2s;
      background: var(--white);
    }



.pet-card-img { position: relative;
      width: 100%; aspect-ratio: 1/1;
      background: var(--bg-soft);
      overflow: hidden; position: relative;
    }

.pet-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }

/* Hover latches on a touch screen: the card keeps its lifted shadow and the
   image its zoom until something else is tapped. */
@media (hover: hover) and (pointer: fine) {
  .pet-card:hover { border-color: var(--black); box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-2px); }
  .pet-card:hover .pet-card-img img { transform: scale(1.04); }
  .pet-card-cta:hover { opacity: .8; }
  .btn-outline:hover { border-color: var(--black); }
  .btn-submit:hover { opacity: .8; }
  .btn-cancel:hover { border-color: var(--black); color: var(--black); }
}

.waiting-badge {
      position: absolute; bottom: 12px; left: 12px;
      background: rgba(0,0,0,0.7); color: white;
      font-size: 11px; font-weight: 600;
      padding: 4px 10px; border-radius: 20px;
      backdrop-filter: blur(4px);
    }

.pet-card-body { padding: clamp(14px, 0.94vw + 10.5px, 20px); }

.pet-name { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }

.pet-meta { font-size: var(--step--1); color: var(--gray); font-family: var(--font-soft); margin-bottom: 12px; line-height: 1.5; }

.pet-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

.pet-tag {
      font-size: 11px; font-weight: 500;
      padding: 3px 8px; border-radius: 10px;
      background: var(--bg-soft); color: var(--gray);
    }

.pet-card-cta {
      width: 100%; padding: 10px; min-height: var(--tap);
      background: var(--light-gray); color: var(--black);
      border: none; border-radius: 8px;
      font-size: var(--step--1); font-weight: 600;
      cursor: pointer; font-family: var(--font-main);
      transition: opacity .15s;
    }


/* ── EMPTY STATE ── */
    .empty-state {
      display: none;
      text-align: center; padding: var(--gap-sec) var(--pad);
      max-width: calc(var(--max) + var(--pad)*2);
      margin: 0 auto;
    }

.empty-icon { font-size: 64px; margin-bottom: 24px; }

.empty-title { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }

.empty-sub { font-size: var(--step-1); color: var(--gray); font-family: var(--font-soft); line-height: 1.6; margin-bottom: 40px; }

.empty-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn-outline { background: transparent; color: var(--black); padding: 12px 24px; min-height: var(--tap); font-size: var(--step-0); border: 1.5px solid var(--light-gray); border-radius: 8px; cursor: pointer; font-family: var(--font-main); font-weight: 500; transition: all .15s; }


/* ── LEGAL NOTICE ── */
    /* A bordered card, so it sits inside the page gutter rather than spanning
       it: width minus two gutters, then centred and capped. The markup carried
       an inline copy of this that set margin-left/right to var(--pad) while the
       class set them to auto — the two disagreed and the inline one won. */
    .legal-notice {
      width: calc(100% - var(--pad) * 2);
      max-width: var(--max);
      margin: 0 auto var(--gap-sec);
      background: var(--bg-soft);
      border: 1.5px solid var(--light-gray);
      border-radius: 12px;
      padding: var(--card-pad);
      display: flex; gap: 16px; align-items: flex-start;
    }

.legal-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }

.legal-text { font-size: var(--step--1); color: var(--gray); line-height: 1.7; font-family: var(--font-soft); }

.legal-text strong { color: var(--black); font-weight: 600; }

/* ── DIVIDER ── */
    .full-divider { height: 1px; background: var(--light-gray); width: 100%; }

/* Footer rules live in components/footer.css. */

/* ── MODAL ──
   Shared rules live in src/styles/components/modal.css. Only the pieces this
   page adds stay here. */

.form-group { margin-bottom: 20px; }

.form-label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.04em; color: var(--black); margin-bottom: 8px; display: block; }

.form-label span { font-weight: 400; color: var(--gray); margin-left: 4px; }

.form-input { width: 100%; padding: 11px 14px; min-height: var(--tap); border: 1.5px solid var(--light-gray); border-radius: 8px; font-size: var(--text-input); color: var(--black); font-family: var(--font-main); outline: none; transition: border-color .15s; background: var(--white); }

.form-input:focus { border-color: var(--black); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--light-gray); border-radius: 8px; font-size: var(--text-input); color: var(--black); font-family: var(--font-main); outline: none; transition: border-color .15s; resize: vertical; min-height: 80px; }

.form-textarea:focus { border-color: var(--black); }

.checkbox-group { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }

.checkbox-group input { margin-top: 2px; flex-shrink: 0; width: 20px; height: 20px; accent-color: var(--black); cursor: pointer; }

.checkbox-label { font-size: var(--step--1); color: var(--gray); line-height: 1.6; font-family: var(--font-soft); }

.checkbox-label strong { color: var(--black); }

.btn-submit { flex: 1; padding: 13px; min-height: var(--tap); background: var(--black); color: var(--white); border: none; border-radius: 8px; font-size: var(--step-0); font-weight: 600; cursor: pointer; font-family: var(--font-main); transition: opacity .15s; }


.btn-cancel { padding: 13px 20px; min-height: var(--tap); background: transparent; color: var(--gray); border: 1.5px solid var(--light-gray); border-radius: 8px; font-size: var(--step-0); cursor: pointer; font-family: var(--font-main); transition: all .15s; }


.success-msg { display: none; background: #f0faf4; border: 1px solid #a8d5b5; border-radius: 8px; padding: 14px 16px; font-size: var(--step--1); color: #2d7a4a; margin-top: 16px; line-height: 1.6; }

/* pet detail modal */
    .pet-detail-photos { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-bottom: 24px; }

.pet-detail-main-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }

.pet-detail-side { display: flex; flex-direction: column; gap: 8px; }

.pet-detail-thumb { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; background: var(--bg-soft); }

.pet-detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }

.pet-detail-field { background: var(--bg-soft); border-radius: 8px; padding: 12px 16px; }

.pet-detail-field-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray); margin-bottom: 4px; }

.pet-detail-field-value { font-size: var(--step-0); font-weight: 600; }

.pet-detail-story { font-family: var(--font-soft); font-size: var(--step-0); color: var(--gray); line-height: 1.7; margin-bottom: 20px; }

.legal-warning { background: #fff8f0; border: 1.5px solid #f0d0a0; border-radius: 8px; padding: 14px 16px; font-size: var(--step--1); color: #8a5a00; line-height: 1.6; margin-bottom: 20px; }

/* zh overrides */
    [lang="zh"] .page-hero-title { letter-spacing: 0; line-height: 1.1; }

[lang="zh"] .page-hero-sub { line-height: 1.2; }

[lang="zh"] .pet-name { letter-spacing: 0; }

/* ── TABLET LANDSCAPE ── */
@media (max-width: 1279px) {
  .pets-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── TABLET PORTRAIT ── */
@media (max-width: 1023px) {
  .pets-grid { grid-template-columns: repeat(2, 1fr); }

  .page-hero { flex-direction: column; align-items: stretch; gap: var(--gap-grid); min-height: 0; }
  /* Both of these are desktop-overlap tricks that assume the image sits to the
     right of the text. Stacked they are just damage: the negative margin pulls
     the image off the left edge, and the mask fades away its left 30% for no
     reason. The old 900px block reset neither. */
  .page-hero-right {
    flex: none;
    width: 100%;
    margin-left: 0;
    align-items: stretch;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .form-row { grid-template-columns: 1fr; }
  .pet-detail-photos { grid-template-columns: 1fr; }

  /* One blurred backdrop per visible card, always on, over an image. */
  .waiting-badge { backdrop-filter: none; background: rgba(0,0,0,0.72); }

  .filter-btn { min-height: var(--tap); padding: 6px 12px; }
  /* Once the groups wrap, a 1px vertical rule turns up stranded at the end of
     a line. */
  .filter-divider { display: none; }
}

/* ── PHONE LANDSCAPE / SMALL TABLET ── */
@media (max-width: 767px) {
  .pet-detail-info { grid-template-columns: 1fr; }
  .legal-notice { flex-direction: column; gap: 10px; }
}

/* ── PHONE ── */
@media (max-width: 479px) {
  .pets-grid { gap: 12px; }
  .pet-tags { margin-bottom: 12px; }
}

/* ── Classes replacing styles that were inline in JS template strings ── */

.pet-card-sample {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.45);
  color: white;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
}

.pet-photo-main,
.pet-photo-thumb {
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pet-photo-main {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 10px;
  font-size: 48px;
}
.pet-photo-thumb {
  flex: 1;
  border-radius: 8px;
  font-size: 24px;
}

/* Submitted state for the adoption form's submit button. */
.btn-submit.is-submitted { background: #3a9460; }
