.elp-avatar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.elp-avatar-fallback {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.elp-avatar [data-viewer-avatar-image] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #edf2e5;
}
.elp-profile-avatar-editor {
  position: relative;
  flex: 0 0 auto;
}
.elp-profile-avatar-editor .elp-avatar-xl {
  width: 112px;
  height: 112px;
  font-size: 1.8rem;
  border: 4px solid #fff;
  box-shadow: 0 12px 28px rgba(46, 66, 26, .16);
}
.elp-avatar-edit-button {
  position: absolute;
  right: 0;
  bottom: 2px;
  z-index: 4;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #7c9a5c;
  color: #fff;
  box-shadow: 0 8px 18px rgba(51, 75, 28, .22);
  transition: transform .18s ease, background-color .18s ease, opacity .18s ease;
}
.elp-avatar-edit-button:hover { transform: translateY(-1px); background: #678449; }
.elp-avatar-edit-button:disabled { opacity: .58; cursor: wait; }
.elp-profile-summary-row { align-items: center; gap: 20px; }
.elp-profile-summary-copy { min-width: 0; }
.elp-profile-picture-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.elp-profile-picture-actions small { color: #92959c; font-size: .72rem; }
.elp-avatar-upload-state {
  margin-top: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(124, 154, 92, .28);
  border-radius: 12px;
  background: #f5f8ef;
  color: #33451f;
}
.elp-avatar-upload-state[hidden] { display: none !important; }
.elp-avatar-upload-state strong, .elp-avatar-upload-state small { display: block; }
.elp-avatar-upload-state small { margin-top: 2px; color: #758168; }
.elp-avatar-upload-state.is-success { border-color: rgba(59, 148, 87, .28); background: #f0f8f2; }
.elp-avatar-upload-state.is-error { border-color: rgba(193, 72, 72, .28); background: #fff4f4; color: #8a3030; }
.elp-avatar-upload-spinner {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border: 3px solid rgba(124, 154, 92, .22);
  border-top-color: #7c9a5c;
  border-radius: 50%;
  animation: elp-avatar-spin .8s linear infinite;
}
.elp-avatar-upload-state.is-success .elp-avatar-upload-spinner,
.elp-avatar-upload-state.is-error .elp-avatar-upload-spinner { animation: none; border: 0; }
.elp-avatar-upload-state.is-success .elp-avatar-upload-spinner::before { content: '✓'; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #7c9a5c; color: #fff; font-weight: 800; }
.elp-avatar-upload-state.is-error .elp-avatar-upload-spinner::before { content: '!'; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #b54a4a; color: #fff; font-weight: 800; }
@keyframes elp-avatar-spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .elp-profile-summary-row { align-items: flex-start; }
  .elp-profile-avatar-editor .elp-avatar-xl { width: 88px; height: 88px; font-size: 1.35rem; }
  .elp-avatar-edit-button { width: 34px; height: 34px; }
  .elp-profile-picture-actions { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .elp-avatar-upload-spinner { animation-duration: 1.8s; }
  .elp-avatar-edit-button { transition: none; }
}
