/* ============================================
   Upload Context Menu — 共用的右鍵/長按上傳選單
   命名一律 ucm-*，避免與工具樣式衝突
============================================ */

/* 上傳區 hover 時顯示「右鍵 / 長按」提示，提升可發現性 */
.ucm-target {
  position: relative;
  /* iOS 長按要徹底避開：原生「複製/儲存圖片」+「選取文字」+「拖曳預覽」選單 */
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent;
  /* 禁止圖片被原生 drag 接管（iOS 會 drag 出複製預覽） */
  -webkit-user-drag: none;
}
.ucm-target *,
.ucm-target img {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none;
}
.ucm-target::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  transition: box-shadow 0.15s;
}
.ucm-target.ucm-pressing::after {
  box-shadow: inset 0 0 0 2px #2563eb;
}

.ucm-menu {
  position: fixed;
  z-index: 99999;
  min-width: 180px;
  background: white;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 14px;
  user-select: none;
  animation: ucm-fade 0.12s ease-out;
}

@keyframes ucm-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ucm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
}
.ucm-item:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.ucm-item:active {
  background: #dbeafe;
}
.ucm-item-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.ucm-item-label {
  flex: 1;
}
.ucm-item-shortcut {
  font-size: 11px;
  color: #9ca3af;
}

.ucm-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}
