/**
 * Profile avatars: colored placeholder + initials only when there is no photo.
 * Real photos should not show the placeholder background behind the image.
 */
.kinma-avatar--has-photo,
.profile-picture-circle--has-photo,
.tree-person-avatar:has(> img),
.tree-person-avatar:has(> img[data-tree-lazy-src]),
.nav-profile-avatar:has(> img),
.mobile-top-nav-avatar:has(> img),
.chat-nav-profile-avatar:has(> img),
.settings-control-btn.profile-btn:has(> img),
.chat-message-avatar--has-img,
.chat-message-avatar--has-img:has(.chat-message-avatar-img),
.chat-popup-window-tab-avatar--has-img,
.chat-popup-window-tab-avatar--has-img:has(.chat-popup-window-tab-avatar-img),
.media-profiles-profile-avatar:has(> img),
.media-profile-avatar:has(> img),
.ge-avatar:has(> img),
.profile-selector-avatar-new:has(> img),
.notification-avatar:has(> img),
.chat-group-overlay-member-avatar.kinma-avatar--has-photo,
.chat-contact-avatar.kinma-avatar--has-photo,
.chat-user-avatar.kinma-avatar--has-photo,
.chat-header-activity-avatar.kinma-avatar--has-photo,
.chat-header-profile-overlay-avatar.kinma-avatar--has-photo,
.chat-call-contact-avatar.kinma-avatar--has-photo,
.incoming-call-avatar.kinma-avatar--has-photo {
    background-color: transparent !important;
}

/*
 * Some chat avatars render the real photo through background-image instead of
 * an <img>.  Do not reset the background shorthand for those nodes: doing so
 * also removes the photo URL as soon as kinma-avatar--has-photo is applied.
 */
.chat-contact-avatar > img,
.chat-user-avatar > img,
.chat-nav-profile-avatar > img,
.chat-header-profile-overlay-avatar > img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}
