/* Ikhaya frame audit fix
   The compiled stylesheet contains a late photo-true fallback that resets
   .cvph to a square/overflow-visible box while independently rounding the
   image. These rules load last and restore one shared geometry per event type.
*/

/* The image must be clipped by the same shape as its frame. */
.cover .cvph {
  overflow: hidden !important;
}
.cover .cvph > img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: inherit !important;
}

/* The legacy photo-true fallback caps non-Luxe images at 340px while themed
   frames can be wider (up to 360–410px). That leaves a visible halo of empty
   space inside the frame. Fill the frame box for these fixed-shape covers. */
html:not([data-ik-theme^="luxe-"]) .cover.kc .cvph > img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center 24%;
}

/* Memorial / unveiling: pointed arch with rounded lower corners. */
html:not([data-ik-theme^="luxe-"]) .cover.kd.kc:not(.kts) .cvph {
  border-radius: 999px 999px 20px 20px !important;
  overflow: hidden !important;
}

/* Wedding: soft arch. */
html:not([data-ik-theme^="luxe-"]) .cover.kw.kc:not(.kts) .cvph {
  border-radius: 999px 999px 18px 18px !important;
  overflow: hidden !important;
}

/* Birthday / party: tilted rounded print. */
html:not([data-ik-theme^="luxe-"]) .cover.kf.kc:not(.kts) .cvph {
  border-radius: 22px !important;
  overflow: hidden !important;
}

/* Baby shower: soft squircle. */
html:not([data-ik-theme^="luxe-"]) .cover.k-baby_shower.kc:not(.kts) .cvph {
  border-radius: 36% 36% 34% 34% / 32% 32% 38% 38% !important;
  overflow: hidden !important;
}

/* Posters and editorial plates. */
html:not([data-ik-theme^="luxe-"]) .cover.k-gig .cvph {
  border-radius: 14px !important;
  overflow: hidden !important;
}
html:not([data-ik-theme^="luxe-"]) .cover.k-imbizo .cvph,
html:not([data-ik-theme^="luxe-"]) .cover.k-group .cvph,
html:not([data-ik-theme^="luxe-"]) .cover.k-business .cvph {
  border-radius: 18px !important;
  overflow: hidden !important;
}

/* Tombstone: the image and frame share the circular mask. */
.cover.kts .cvph {
  overflow: hidden !important;
}
.cover.kts .cvph > img {
  border-radius: inherit !important;
}

/* Luxe keeps its deliberate clip-path silhouettes. The photo itself is
   already masked by --lx-clip / --lx-br; only the decorative mount may extend
   outside the photo bounds. */
html[data-ik-theme^="luxe-"] .cover.kc:not(.kts):not(.np) .cvph > img {
  clip-path: var(--lx-clip, none) !important;
  border-radius: var(--lx-br, 0) !important;
  max-width: min(76vw, 352px);
  max-height: min(47vh, 412px);
}
