/* ============================================================
   Advocate services — shared cover image.
   Loaded by the portal editor and the find-advocates Services tab.
   A service without an uploaded image shows FPA's default photo for
   its category (/images/services/default-*.webp). The tinted fill is
   only seen while the image loads.
   ============================================================ */

.fpa-svc-cover {
  --fpa-svc-tone: #737373;
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: color-mix(in oklab, var(--fpa-svc-tone) 12%, #fafafa);
}

.fpa-svc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 1px inset outline keeps pale photo edges from melting into the page. */
.fpa-svc-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
  pointer-events: none;
}

[data-category="consultation"] { --fpa-svc-tone: #3b82f6; }
[data-category="records_review"] { --fpa-svc-tone: #f59e0b; }
[data-category="meeting_prep"] { --fpa-svc-tone: #8b5cf6; }
[data-category="meeting_attendance"] { --fpa-svc-tone: #22c55e; }
[data-category="evaluation_support"] { --fpa-svc-tone: #06b6d4; }
[data-category="ongoing_advocacy"] { --fpa-svc-tone: #ec4899; }
[data-category="parent_coaching"] { --fpa-svc-tone: #f97316; }
[data-category="other"] { --fpa-svc-tone: #737373; }

html[data-ap-theme="dark"] .fpa-svc-cover {
  background: color-mix(in oklab, var(--fpa-svc-tone) 18%, #252525);
}

html[data-ap-theme="dark"] .fpa-svc-cover::after {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
}
