+ {/* Overflow: reply */}
+
{ onReply?.(); setMoreMenuOpen(false); }}
+ className={cn("w-full px-3 py-2.5 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2", overflowCount >= 10 ? "" : "sm:hidden")}
+ >
+
+ {t('reply')}
+
+ {/* Overflow: reply all */}
+
{ onReplyAll?.(); setMoreMenuOpen(false); }}
+ className={cn("w-full px-3 py-2.5 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2", overflowCount >= 9 ? "" : "sm:hidden")}
+ >
+
+ {t('reply_all')}
+
+ {/* Overflow: forward */}
+
{ onForward?.(); setMoreMenuOpen(false); }}
+ className={cn("w-full px-3 py-2.5 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2", overflowCount >= 8 ? "" : "sm:hidden")}
+ >
+
+ {t('forward')}
+
+ {/* Overflow: archive */}
+
{ onArchive?.(); setMoreMenuOpen(false); }}
+ className={cn("w-full px-3 py-2.5 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2", overflowCount >= 7 ? "" : "sm:hidden")}
+ >
+
+ {t('archive')}
+
+ {/* Overflow: move to folder */}
+ {moveTree.length > 0 && onMoveToMailbox && (
+
= 6 ? "" : "sm:hidden")}>
+
+
{t('move_to')}
+ {(() => {
+ const renderMobileNodes = (nodes: MailboxNode[], depth = 0) => {
+ return nodes.map((node) => {
+ const Icon = getMoveMailboxIcon(node.role);
+ const isTarget = moveTargetIds.has(node.id);
+ return (
+
+ {isTarget ? (
+
{ onMoveToMailbox(node.id); setMoreMenuOpen(false); }}
+ className="w-full px-3 py-2 text-sm text-left hover:bg-muted flex items-center gap-2"
+ style={{ paddingLeft: `${0.75 + depth * 1}rem` }}
+ >
+
+ {node.name}
+
+ ) : (
+
+
+ {node.name}
+
+ )}
+ {node.children.length > 0 && renderMobileNodes(node.children, depth + 1)}
+
+ );
+ });
+ };
+ return renderMobileNodes(moveTree);
+ })()}
+
+
+ )}
+ {/* Overflow: tag submenu */}
+ {colorOptions.length > 0 && (
+
= 5 ? "" : "sm:hidden")}>
+
+
{t('tag')}
+ {colorOptions.map((option) => (
+
{ if (email) onSetColorTag?.(email.id, option.value); setMoreMenuOpen(false); }}
+ className={cn(
+ "w-full px-3 py-2 text-sm text-left hover:bg-muted flex items-center gap-2",
+ currentColor === option.value && "bg-accent font-medium"
+ )}
+ >
+
+ {option.name}
+ {currentColor === option.value && }
+
+ ))}
+ {currentColor && (
+
{ if (email) onSetColorTag?.(email.id, null); setMoreMenuOpen(false); }}
+ className="w-full px-3 py-2 text-sm text-left hover:bg-muted flex items-center gap-2 text-muted-foreground"
+ >
+
+ {t('remove_color')}
+
+ )}
+
+
+ )}
+ {/* Overflow: spam */}
+ {(onMarkAsSpam || onUndoSpam) && (
+
{ (isInJunkFolder ? onUndoSpam : onMarkAsSpam)?.(); setMoreMenuOpen(false); }}
+ className={cn("w-full px-3 py-2.5 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2", overflowCount >= 4 ? "" : "sm:hidden")}
+ >
+ {isInJunkFolder ? (
+
+ ) : (
+
+ )}
+ {isInJunkFolder ? t('spam.not_spam_title') : t('spam.button_title')}
+
+ )}
+ {/* Overflow: toggle read */}
+
{ onMarkAsRead?.(email.id, isUnread); setMoreMenuOpen(false); }}
+ className={cn("w-full px-3 py-2.5 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2", overflowCount >= 3 ? "" : "sm:hidden")}
+ >
+ {isUnread ? : }
+ {isUnread ? t('mark_read') : t('mark_unread')}
+
+ {/* Overflow: print */}
+
{ handlePrint(); setMoreMenuOpen(false); }}
+ className={cn("w-full px-3 py-2.5 sm:py-2 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2", overflowCount >= 2 ? "" : "sm:hidden")}
+ >
+
+ {t('print')}
+
+ {/* Overflow: view source */}
+
{ setShowSourceModal(true); setMoreMenuOpen(false); }}
+ className={cn("w-full px-3 py-2.5 sm:py-2 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2", overflowCount >= 1 ? "" : "sm:hidden")}
+ >
+
+ {t('view_source')}
+
+
+ {/* Export email */}
+
{ handleExportEmail(); setMoreMenuOpen(false); }}
+ className="w-full px-3 py-2.5 sm:py-2 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2"
+ >
+
+ {t('export_email')}
+
+ {/* Import email */}
+
{ handleImportEmail(); setMoreMenuOpen(false); }}
+ className="w-full px-3 py-2.5 sm:py-2 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2"
+ >
+
+ {t('import_email')}
+
+ {onShowShortcuts && (
+
{ onShowShortcuts(); setMoreMenuOpen(false); }}
+ className="w-full px-3 py-2.5 sm:py-2 text-sm text-left hover:bg-muted text-foreground flex items-center gap-2"
+ >
+
+ {t('keyboard_shortcuts')}
+
+ )}
+