/* For Adoption page (/adoption) and the adoption block on the pet page. */

.ad-page {
  padding-top: 28px;
  padding-bottom: 56px;
}
.ad-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.ad-title {
  margin: 0;
  font-size: clamp(26px, 4.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-on-dark);
}

.ad-sec { margin-top: 32px; }
.ad-sec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ad-sec__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-accent-text);
}
.ad-sec__link,
.ad-ask {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-text);
  text-decoration: none;
}
.ad-sec__link:hover,
.ad-ask:hover { text-decoration: underline; }

/* The company dogs scroll sideways; the member list wraps. */
.ad-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 190px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.ad-rail > .ad-tile { scroll-snap-align: start; }
.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
@media (max-width: 520px) {
  .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* A photo tile. The picture fills its top edge to edge, so it draws no
   second frame inside the tile. */
.ad-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--color-layer-stroke);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
  transition: transform 160ms var(--ease-fluent), border-color 160ms var(--ease-fluent);
}
.ad-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.55);
  color: inherit;
}
/* The picture sits out of flow, so a tall photo cannot stretch the square
   past its ratio and every tile in a row keeps the same height. */
.ad-tile__art {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: radial-gradient(circle at 50% 60%, rgba(124, 58, 237, 0.22), transparent 70%);
}
.ad-tile__art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ad-tile__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  min-width: 0;
}
.ad-tile__name,
.ad-tile__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-tile__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-on-dark);
}
.ad-tile__meta {
  font-size: 11.5px;
  color: var(--color-dim-2);
}
.ad-tile__area {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-accent-text);
}
.ad-tile__area svg { flex: 0 0 auto; }

.ad-empty {
  margin: 0;
  padding: 32px 16px;
  border: 1px dashed var(--color-layer-stroke);
  border-radius: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--color-dim-1);
}

/* The pet picker in the sheet: flat rows with a hairline between them,
   because the sheet already draws the surface. */
.ad-lead {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--color-dim-1);
}
.ad-pick {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}
.ad-pick li[hidden] { display: none; }
.ad-pick__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--color-layer-stroke);
  cursor: pointer;
}
.ad-pick li:last-child .ad-pick__row { border-bottom: 0; }
.ad-pick__row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}
.ad-pick__row.is-off {
  opacity: 0.55;
  cursor: default;
}
.ad-pick__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ad-pick__text b {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-on-dark);
}
.ad-pick__text span {
  font-size: 12px;
  color: var(--color-dim-2);
}

@media (prefers-reduced-motion: reduce) {
  .ad-tile { transition: none; }
}
