.upload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10003;
  flex-direction: column;
}

.upload-edit-btn,
.upload-cancel-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

.upload-edit-btn {
  background-color: #fff;
  color: #333;
}

.upload-cancel-btn {
  background-color: #f44336;
  color: #fff;
}

.upload-photo-wrapper {
  max-width: 80vw;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* important for gestures */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.upload-photo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);

  /* smooth transform updates for zoom/pan */
  transform-origin: center center;
  transition: transform 0.05s linear;
  will-change: transform;
  display: block;
}
  
.upload-btn-container {
  display: flex;
  gap: 10px;
  margin: 20px 10px 0 10px; /* top, right, bottom, left */
  padding: 10px;
  justify-content: center;
}



.avatar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 999999;        /* force top */
}

.avatar-overlay-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}